LCOV - code coverage report
Current view: top level - build-coverage/swig/python/extensions - gdal_wrap.cpp (source / functions) Hit Total Coverage
Test: gdal_filtered.info Lines: 23491 29909 78.5 %
Date: 2024-05-14 13:00:50 Functions: 847 927 91.4 %

          Line data    Source code
       1             : /* ----------------------------------------------------------------------------
       2             :  * This file was automatically generated by SWIG (http://www.swig.org).
       3             :  * Version 4.0.1
       4             :  *
       5             :  * This file is not intended to be easily readable and contains a number of
       6             :  * coding conventions designed to improve portability and efficiency. Do not make
       7             :  * changes to this file unless you know what you are doing--modify the SWIG
       8             :  * interface file instead.
       9             :  * ----------------------------------------------------------------------------- */
      10             : 
      11             : 
      12             : #ifndef SWIGPYTHON
      13             : #define SWIGPYTHON
      14             : #define SED_HACKS
      15             : #endif
      16             : 
      17             : #define SWIG_PYTHON_THREADS
      18             : #define SWIG_PYTHON_DIRECTOR_NO_VTABLE
      19             : 
      20             : 
      21             : #ifdef __cplusplus
      22             : /* SwigValueWrapper is described in swig.swg */
      23             : template<typename T> class SwigValueWrapper {
      24             :   struct SwigMovePointer {
      25             :     T *ptr;
      26             :     SwigMovePointer(T *p) : ptr(p) { }
      27             :     ~SwigMovePointer() { delete ptr; }
      28             :     SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
      29             :   } pointer;
      30             :   SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
      31             :   SwigValueWrapper(const SwigValueWrapper<T>& rhs);
      32             : public:
      33             :   SwigValueWrapper() : pointer(0) { }
      34             :   SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; }
      35             :   operator T&() const { return *pointer.ptr; }
      36             :   T *operator&() { return pointer.ptr; }
      37             : };
      38             : 
      39             : template <typename T> T SwigValueInit() {
      40             :   return T();
      41             : }
      42             : #endif
      43             : 
      44             : /* -----------------------------------------------------------------------------
      45             :  *  This section contains generic SWIG labels for method/variable
      46             :  *  declarations/attributes, and other compiler dependent labels.
      47             :  * ----------------------------------------------------------------------------- */
      48             : 
      49             : /* template workaround for compilers that cannot correctly implement the C++ standard */
      50             : #ifndef SWIGTEMPLATEDISAMBIGUATOR
      51             : # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
      52             : #  define SWIGTEMPLATEDISAMBIGUATOR template
      53             : # elif defined(__HP_aCC)
      54             : /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
      55             : /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
      56             : #  define SWIGTEMPLATEDISAMBIGUATOR template
      57             : # else
      58             : #  define SWIGTEMPLATEDISAMBIGUATOR
      59             : # endif
      60             : #endif
      61             : 
      62             : /* inline attribute */
      63             : #ifndef SWIGINLINE
      64             : # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
      65             : #   define SWIGINLINE inline
      66             : # else
      67             : #   define SWIGINLINE
      68             : # endif
      69             : #endif
      70             : 
      71             : /* attribute recognised by some compilers to avoid 'unused' warnings */
      72             : #ifndef SWIGUNUSED
      73             : # if defined(__GNUC__)
      74             : #   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
      75             : #     define SWIGUNUSED __attribute__ ((__unused__))
      76             : #   else
      77             : #     define SWIGUNUSED
      78             : #   endif
      79             : # elif defined(__ICC)
      80             : #   define SWIGUNUSED __attribute__ ((__unused__))
      81             : # else
      82             : #   define SWIGUNUSED
      83             : # endif
      84             : #endif
      85             : 
      86             : #ifndef SWIG_MSC_UNSUPPRESS_4505
      87             : # if defined(_MSC_VER)
      88             : #   pragma warning(disable : 4505) /* unreferenced local function has been removed */
      89             : # endif
      90             : #endif
      91             : 
      92             : #ifndef SWIGUNUSEDPARM
      93             : # ifdef __cplusplus
      94             : #   define SWIGUNUSEDPARM(p)
      95             : # else
      96             : #   define SWIGUNUSEDPARM(p) p SWIGUNUSED
      97             : # endif
      98             : #endif
      99             : 
     100             : /* internal SWIG method */
     101             : #ifndef SWIGINTERN
     102             : # define SWIGINTERN static SWIGUNUSED
     103             : #endif
     104             : 
     105             : /* internal inline SWIG method */
     106             : #ifndef SWIGINTERNINLINE
     107             : # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
     108             : #endif
     109             : 
     110             : /* exporting methods */
     111             : #if defined(__GNUC__)
     112             : #  if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
     113             : #    ifndef GCC_HASCLASSVISIBILITY
     114             : #      define GCC_HASCLASSVISIBILITY
     115             : #    endif
     116             : #  endif
     117             : #endif
     118             : 
     119             : #ifndef SWIGEXPORT
     120             : # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
     121             : #   if defined(STATIC_LINKED)
     122             : #     define SWIGEXPORT
     123             : #   else
     124             : #     define SWIGEXPORT __declspec(dllexport)
     125             : #   endif
     126             : # else
     127             : #   if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
     128             : #     define SWIGEXPORT __attribute__ ((visibility("default")))
     129             : #   else
     130             : #     define SWIGEXPORT
     131             : #   endif
     132             : # endif
     133             : #endif
     134             : 
     135             : /* calling conventions for Windows */
     136             : #ifndef SWIGSTDCALL
     137             : # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
     138             : #   define SWIGSTDCALL __stdcall
     139             : # else
     140             : #   define SWIGSTDCALL
     141             : # endif
     142             : #endif
     143             : 
     144             : /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
     145             : #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
     146             : # define _CRT_SECURE_NO_DEPRECATE
     147             : #endif
     148             : 
     149             : /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
     150             : #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
     151             : # define _SCL_SECURE_NO_DEPRECATE
     152             : #endif
     153             : 
     154             : /* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */
     155             : #if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES)
     156             : # define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0
     157             : #endif
     158             : 
     159             : /* Intel's compiler complains if a variable which was never initialised is
     160             :  * cast to void, which is a common idiom which we use to indicate that we
     161             :  * are aware a variable isn't used.  So we just silence that warning.
     162             :  * See: https://github.com/swig/swig/issues/192 for more discussion.
     163             :  */
     164             : #ifdef __INTEL_COMPILER
     165             : # pragma warning disable 592
     166             : #endif
     167             : 
     168             : 
     169             : #if defined(__GNUC__) && defined(_WIN32) && !defined(SWIG_PYTHON_NO_HYPOT_WORKAROUND)
     170             : /* Workaround for '::hypot' has not been declared', see https://bugs.python.org/issue11566 */
     171             : # include <math.h>
     172             : #endif
     173             : 
     174             : #if defined(_DEBUG) && defined(SWIG_PYTHON_INTERPRETER_NO_DEBUG)
     175             : /* Use debug wrappers with the Python release dll */
     176             : # undef _DEBUG
     177             : # include <Python.h>
     178             : # define _DEBUG 1
     179             : #else
     180             : # include <Python.h>
     181             : #endif
     182             : 
     183             : /* -----------------------------------------------------------------------------
     184             :  * swigrun.swg
     185             :  *
     186             :  * This file contains generic C API SWIG runtime support for pointer
     187             :  * type checking.
     188             :  * ----------------------------------------------------------------------------- */
     189             : 
     190             : /* This should only be incremented when either the layout of swig_type_info changes,
     191             :    or for whatever reason, the runtime changes incompatibly */
     192             : #define SWIG_RUNTIME_VERSION "4"
     193             : 
     194             : /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
     195             : #ifdef SWIG_TYPE_TABLE
     196             : # define SWIG_QUOTE_STRING(x) #x
     197             : # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
     198             : # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
     199             : #else
     200             : # define SWIG_TYPE_TABLE_NAME
     201             : #endif
     202             : 
     203             : /*
     204             :   You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
     205             :   creating a static or dynamic library from the SWIG runtime code.
     206             :   In 99.9% of the cases, SWIG just needs to declare them as 'static'.
     207             : 
     208             :   But only do this if strictly necessary, ie, if you have problems
     209             :   with your compiler or suchlike.
     210             : */
     211             : 
     212             : #ifndef SWIGRUNTIME
     213             : # define SWIGRUNTIME SWIGINTERN
     214             : #endif
     215             : 
     216             : #ifndef SWIGRUNTIMEINLINE
     217             : # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
     218             : #endif
     219             : 
     220             : /*  Generic buffer size */
     221             : #ifndef SWIG_BUFFER_SIZE
     222             : # define SWIG_BUFFER_SIZE 1024
     223             : #endif
     224             : 
     225             : /* Flags for pointer conversions */
     226             : #define SWIG_POINTER_DISOWN        0x1
     227             : #define SWIG_CAST_NEW_MEMORY       0x2
     228             : #define SWIG_POINTER_NO_NULL       0x4
     229             : 
     230             : /* Flags for new pointer objects */
     231             : #define SWIG_POINTER_OWN           0x1
     232             : 
     233             : 
     234             : /*
     235             :    Flags/methods for returning states.
     236             : 
     237             :    The SWIG conversion methods, as ConvertPtr, return an integer
     238             :    that tells if the conversion was successful or not. And if not,
     239             :    an error code can be returned (see swigerrors.swg for the codes).
     240             : 
     241             :    Use the following macros/flags to set or process the returning
     242             :    states.
     243             : 
     244             :    In old versions of SWIG, code such as the following was usually written:
     245             : 
     246             :      if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
     247             :        // success code
     248             :      } else {
     249             :        //fail code
     250             :      }
     251             : 
     252             :    Now you can be more explicit:
     253             : 
     254             :     int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
     255             :     if (SWIG_IsOK(res)) {
     256             :       // success code
     257             :     } else {
     258             :       // fail code
     259             :     }
     260             : 
     261             :    which is the same really, but now you can also do
     262             : 
     263             :     Type *ptr;
     264             :     int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
     265             :     if (SWIG_IsOK(res)) {
     266             :       // success code
     267             :       if (SWIG_IsNewObj(res) {
     268             :         ...
     269             :   delete *ptr;
     270             :       } else {
     271             :         ...
     272             :       }
     273             :     } else {
     274             :       // fail code
     275             :     }
     276             : 
     277             :    I.e., now SWIG_ConvertPtr can return new objects and you can
     278             :    identify the case and take care of the deallocation. Of course that
     279             :    also requires SWIG_ConvertPtr to return new result values, such as
     280             : 
     281             :       int SWIG_ConvertPtr(obj, ptr,...) {
     282             :         if (<obj is ok>) {
     283             :           if (<need new object>) {
     284             :             *ptr = <ptr to new allocated object>;
     285             :             return SWIG_NEWOBJ;
     286             :           } else {
     287             :             *ptr = <ptr to old object>;
     288             :             return SWIG_OLDOBJ;
     289             :           }
     290             :         } else {
     291             :           return SWIG_BADOBJ;
     292             :         }
     293             :       }
     294             : 
     295             :    Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
     296             :    more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
     297             :    SWIG errors code.
     298             : 
     299             :    Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
     300             :    allows to return the 'cast rank', for example, if you have this
     301             : 
     302             :        int food(double)
     303             :        int fooi(int);
     304             : 
     305             :    and you call
     306             : 
     307             :       food(1)   // cast rank '1'  (1 -> 1.0)
     308             :       fooi(1)   // cast rank '0'
     309             : 
     310             :    just use the SWIG_AddCast()/SWIG_CheckState()
     311             : */
     312             : 
     313             : #define SWIG_OK                    (0)
     314             : #define SWIG_ERROR                 (-1)
     315             : #define SWIG_IsOK(r)               (r >= 0)
     316             : #define SWIG_ArgError(r)           ((r != SWIG_ERROR) ? r : SWIG_TypeError)
     317             : 
     318             : /* The CastRankLimit says how many bits are used for the cast rank */
     319             : #define SWIG_CASTRANKLIMIT         (1 << 8)
     320             : /* The NewMask denotes the object was created (using new/malloc) */
     321             : #define SWIG_NEWOBJMASK            (SWIG_CASTRANKLIMIT  << 1)
     322             : /* The TmpMask is for in/out typemaps that use temporal objects */
     323             : #define SWIG_TMPOBJMASK            (SWIG_NEWOBJMASK << 1)
     324             : /* Simple returning values */
     325             : #define SWIG_BADOBJ                (SWIG_ERROR)
     326             : #define SWIG_OLDOBJ                (SWIG_OK)
     327             : #define SWIG_NEWOBJ                (SWIG_OK | SWIG_NEWOBJMASK)
     328             : #define SWIG_TMPOBJ                (SWIG_OK | SWIG_TMPOBJMASK)
     329             : /* Check, add and del mask methods */
     330             : #define SWIG_AddNewMask(r)         (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
     331             : #define SWIG_DelNewMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
     332             : #define SWIG_IsNewObj(r)           (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
     333             : #define SWIG_AddTmpMask(r)         (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
     334             : #define SWIG_DelTmpMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
     335             : #define SWIG_IsTmpObj(r)           (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
     336             : 
     337             : /* Cast-Rank Mode */
     338             : #if defined(SWIG_CASTRANK_MODE)
     339             : #  ifndef SWIG_TypeRank
     340             : #    define SWIG_TypeRank             unsigned long
     341             : #  endif
     342             : #  ifndef SWIG_MAXCASTRANK            /* Default cast allowed */
     343             : #    define SWIG_MAXCASTRANK          (2)
     344             : #  endif
     345             : #  define SWIG_CASTRANKMASK          ((SWIG_CASTRANKLIMIT) -1)
     346             : #  define SWIG_CastRank(r)           (r & SWIG_CASTRANKMASK)
     347             : SWIGINTERNINLINE int SWIG_AddCast(int r) {
     348             :   return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
     349             : }
     350             : SWIGINTERNINLINE int SWIG_CheckState(int r) {
     351             :   return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
     352             : }
     353             : #else /* no cast-rank mode */
     354             : #  define SWIG_AddCast(r) (r)
     355             : #  define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
     356             : #endif
     357             : 
     358             : 
     359             : #include <string.h>
     360             : 
     361             : #ifdef __cplusplus
     362             : extern "C" {
     363             : #endif
     364             : 
     365             : typedef void *(*swig_converter_func)(void *, int *);
     366             : typedef struct swig_type_info *(*swig_dycast_func)(void **);
     367             : 
     368             : /* Structure to store information on one type */
     369             : typedef struct swig_type_info {
     370             :   const char             *name;     /* mangled name of this type */
     371             :   const char             *str;      /* human readable name of this type */
     372             :   swig_dycast_func        dcast;    /* dynamic cast function down a hierarchy */
     373             :   struct swig_cast_info  *cast;     /* linked list of types that can cast into this type */
     374             :   void                   *clientdata;   /* language specific type data */
     375             :   int                    owndata;   /* flag if the structure owns the clientdata */
     376             : } swig_type_info;
     377             : 
     378             : /* Structure to store a type and conversion function used for casting */
     379             : typedef struct swig_cast_info {
     380             :   swig_type_info         *type;     /* pointer to type that is equivalent to this type */
     381             :   swig_converter_func     converter;    /* function to cast the void pointers */
     382             :   struct swig_cast_info  *next;     /* pointer to next cast in linked list */
     383             :   struct swig_cast_info  *prev;     /* pointer to the previous cast */
     384             : } swig_cast_info;
     385             : 
     386             : /* Structure used to store module information
     387             :  * Each module generates one structure like this, and the runtime collects
     388             :  * all of these structures and stores them in a circularly linked list.*/
     389             : typedef struct swig_module_info {
     390             :   swig_type_info         **types;   /* Array of pointers to swig_type_info structures that are in this module */
     391             :   size_t                 size;            /* Number of types in this module */
     392             :   struct swig_module_info *next;    /* Pointer to next element in circularly linked list */
     393             :   swig_type_info         **type_initial;  /* Array of initially generated type structures */
     394             :   swig_cast_info         **cast_initial;  /* Array of initially generated casting structures */
     395             :   void                    *clientdata;    /* Language specific module data */
     396             : } swig_module_info;
     397             : 
     398             : /*
     399             :   Compare two type names skipping the space characters, therefore
     400             :   "char*" == "char *" and "Class<int>" == "Class<int >", etc.
     401             : 
     402             :   Return 0 when the two name types are equivalent, as in
     403             :   strncmp, but skipping ' '.
     404             : */
     405             : SWIGRUNTIME int
     406           0 : SWIG_TypeNameComp(const char *f1, const char *l1,
     407             :       const char *f2, const char *l2) {
     408           0 :   for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
     409           0 :     while ((*f1 == ' ') && (f1 != l1)) ++f1;
     410           0 :     while ((*f2 == ' ') && (f2 != l2)) ++f2;
     411           0 :     if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
     412             :   }
     413           0 :   return (int)((l1 - f1) - (l2 - f2));
     414             : }
     415             : 
     416             : /*
     417             :   Check type equivalence in a name list like <name1>|<name2>|...
     418             :   Return 0 if equal, -1 if nb < tb, 1 if nb > tb
     419             : */
     420             : SWIGRUNTIME int
     421           0 : SWIG_TypeCmp(const char *nb, const char *tb) {
     422           0 :   int equiv = 1;
     423           0 :   const char* te = tb + strlen(tb);
     424           0 :   const char* ne = nb;
     425           0 :   while (equiv != 0 && *ne) {
     426           0 :     for (nb = ne; *ne; ++ne) {
     427           0 :       if (*ne == '|') break;
     428             :     }
     429           0 :     equiv = SWIG_TypeNameComp(nb, ne, tb, te);
     430           0 :     if (*ne) ++ne;
     431             :   }
     432           0 :   return equiv;
     433             : }
     434             : 
     435             : /*
     436             :   Check type equivalence in a name list like <name1>|<name2>|...
     437             :   Return 0 if not equal, 1 if equal
     438             : */
     439             : SWIGRUNTIME int
     440           0 : SWIG_TypeEquiv(const char *nb, const char *tb) {
     441           0 :   return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
     442             : }
     443             : 
     444             : /*
     445             :   Check the typename
     446             : */
     447             : SWIGRUNTIME swig_cast_info *
     448       66979 : SWIG_TypeCheck(const char *c, swig_type_info *ty) {
     449       66979 :   if (ty) {
     450       66979 :     swig_cast_info *iter = ty->cast;
     451       70670 :     while (iter) {
     452       70669 :       if (strcmp(iter->type->name, c) == 0) {
     453       66978 :         if (iter == ty->cast)
     454             :           return iter;
     455             :         /* Move iter to the top of the linked list */
     456        2634 :         iter->prev->next = iter->next;
     457        2634 :         if (iter->next)
     458        2524 :           iter->next->prev = iter->prev;
     459        2634 :         iter->next = ty->cast;
     460        2634 :         iter->prev = 0;
     461        2634 :         if (ty->cast) ty->cast->prev = iter;
     462        2634 :         ty->cast = iter;
     463        2634 :         return iter;
     464             :       }
     465        3691 :       iter = iter->next;
     466             :     }
     467             :   }
     468             :   return 0;
     469             : }
     470             : 
     471             : /*
     472             :   Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
     473             : */
     474             : SWIGRUNTIME swig_cast_info *
     475             : SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) {
     476             :   if (ty) {
     477             :     swig_cast_info *iter = ty->cast;
     478             :     while (iter) {
     479             :       if (iter->type == from) {
     480             :         if (iter == ty->cast)
     481             :           return iter;
     482             :         /* Move iter to the top of the linked list */
     483             :         iter->prev->next = iter->next;
     484             :         if (iter->next)
     485             :           iter->next->prev = iter->prev;
     486             :         iter->next = ty->cast;
     487             :         iter->prev = 0;
     488             :         if (ty->cast) ty->cast->prev = iter;
     489             :         ty->cast = iter;
     490             :         return iter;
     491             :       }
     492             :       iter = iter->next;
     493             :     }
     494             :   }
     495             :   return 0;
     496             : }
     497             : 
     498             : /*
     499             :   Cast a pointer up an inheritance hierarchy
     500             : */
     501             : SWIGRUNTIMEINLINE void *
     502       66978 : SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
     503       66978 :   return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
     504             : }
     505             : 
     506             : /*
     507             :    Dynamic pointer casting. Down an inheritance hierarchy
     508             : */
     509             : SWIGRUNTIME swig_type_info *
     510             : SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
     511             :   swig_type_info *lastty = ty;
     512             :   if (!ty || !ty->dcast) return ty;
     513             :   while (ty && (ty->dcast)) {
     514             :     ty = (*ty->dcast)(ptr);
     515             :     if (ty) lastty = ty;
     516             :   }
     517             :   return lastty;
     518             : }
     519             : 
     520             : /*
     521             :   Return the name associated with this type
     522             : */
     523             : SWIGRUNTIMEINLINE const char *
     524             : SWIG_TypeName(const swig_type_info *ty) {
     525             :   return ty->name;
     526             : }
     527             : 
     528             : /*
     529             :   Return the pretty name associated with this type,
     530             :   that is an unmangled type name in a form presentable to the user.
     531             : */
     532             : SWIGRUNTIME const char *
     533           0 : SWIG_TypePrettyName(const swig_type_info *type) {
     534             :   /* The "str" field contains the equivalent pretty names of the
     535             :      type, separated by vertical-bar characters.  We choose
     536             :      to print the last name, as it is often (?) the most
     537             :      specific. */
     538           0 :   if (!type) return NULL;
     539           0 :   if (type->str != NULL) {
     540             :     const char *last_name = type->str;
     541             :     const char *s;
     542           0 :     for (s = type->str; *s; s++)
     543           0 :       if (*s == '|') last_name = s+1;
     544             :     return last_name;
     545             :   }
     546             :   else
     547           0 :     return type->name;
     548             : }
     549             : 
     550             : /*
     551             :    Set the clientdata field for a type
     552             : */
     553             : SWIGRUNTIME void
     554             : SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
     555             :   swig_cast_info *cast = ti->cast;
     556             :   /* if (ti->clientdata == clientdata) return; */
     557             :   ti->clientdata = clientdata;
     558             : 
     559             :   while (cast) {
     560             :     if (!cast->converter) {
     561             :       swig_type_info *tc = cast->type;
     562             :       if (!tc->clientdata) {
     563             :   SWIG_TypeClientData(tc, clientdata);
     564             :       }
     565             :     }
     566             :     cast = cast->next;
     567             :   }
     568             : }
     569             : SWIGRUNTIME void
     570       10298 : SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
     571       10298 :   SWIG_TypeClientData(ti, clientdata);
     572       10298 :   ti->owndata = 1;
     573             : }
     574             : 
     575             : /*
     576             :   Search for a swig_type_info structure only by mangled name
     577             :   Search is a O(log #types)
     578             : 
     579             :   We start searching at module start, and finish searching when start == end.
     580             :   Note: if start == end at the beginning of the function, we go all the way around
     581             :   the circular list.
     582             : */
     583             : SWIGRUNTIME swig_type_info *
     584          36 : SWIG_MangledTypeQueryModule(swig_module_info *start,
     585             :                             swig_module_info *end,
     586             :                 const char *name) {
     587          36 :   swig_module_info *iter = start;
     588          36 :   do {
     589          36 :     if (iter->size) {
     590          36 :       size_t l = 0;
     591          36 :       size_t r = iter->size - 1;
     592         180 :       do {
     593             :   /* since l+r >= 0, we can (>> 1) instead (/ 2) */
     594         180 :   size_t i = (l + r) >> 1;
     595         180 :   const char *iname = iter->types[i]->name;
     596         180 :   if (iname) {
     597         180 :     int compare = strcmp(name, iname);
     598         180 :     if (compare == 0) {
     599          36 :       return iter->types[i];
     600         144 :     } else if (compare < 0) {
     601          36 :       if (i) {
     602          36 :         r = i - 1;
     603             :       } else {
     604             :         break;
     605             :       }
     606         108 :     } else if (compare > 0) {
     607         108 :       l = i + 1;
     608             :     }
     609             :   } else {
     610             :     break; /* should never happen */
     611             :   }
     612         144 :       } while (l <= r);
     613             :     }
     614           0 :     iter = iter->next;
     615           0 :   } while (iter != end);
     616             :   return 0;
     617             : }
     618             : 
     619             : /*
     620             :   Search for a swig_type_info structure for either a mangled name or a human readable name.
     621             :   It first searches the mangled names of the types, which is a O(log #types)
     622             :   If a type is not found it then searches the human readable names, which is O(#types).
     623             : 
     624             :   We start searching at module start, and finish searching when start == end.
     625             :   Note: if start == end at the beginning of the function, we go all the way around
     626             :   the circular list.
     627             : */
     628             : SWIGRUNTIME swig_type_info *
     629          36 : SWIG_TypeQueryModule(swig_module_info *start,
     630             :                      swig_module_info *end,
     631             :          const char *name) {
     632             :   /* STEP 1: Search the name field using binary search */
     633          36 :   swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
     634          36 :   if (ret) {
     635             :     return ret;
     636             :   } else {
     637             :     /* STEP 2: If the type hasn't been found, do a complete search
     638             :        of the str field (the human readable name) */
     639             :     swig_module_info *iter = start;
     640           0 :     do {
     641           0 :       size_t i = 0;
     642           0 :       for (; i < iter->size; ++i) {
     643           0 :   if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
     644           0 :     return iter->types[i];
     645             :       }
     646           0 :       iter = iter->next;
     647           0 :     } while (iter != end);
     648             :   }
     649             : 
     650             :   /* neither found a match */
     651             :   return 0;
     652             : }
     653             : 
     654             : /*
     655             :    Pack binary data into a string
     656             : */
     657             : SWIGRUNTIME char *
     658           0 : SWIG_PackData(char *c, void *ptr, size_t sz) {
     659           0 :   static const char hex[17] = "0123456789abcdef";
     660           0 :   const unsigned char *u = (unsigned char *) ptr;
     661           0 :   const unsigned char *eu =  u + sz;
     662           0 :   for (; u != eu; ++u) {
     663           0 :     unsigned char uu = *u;
     664           0 :     *(c++) = hex[(uu & 0xf0) >> 4];
     665           0 :     *(c++) = hex[uu & 0xf];
     666             :   }
     667           0 :   return c;
     668             : }
     669             : 
     670             : /*
     671             :    Unpack binary data from a string
     672             : */
     673             : SWIGRUNTIME const char *
     674             : SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
     675             :   unsigned char *u = (unsigned char *) ptr;
     676             :   const unsigned char *eu = u + sz;
     677             :   for (; u != eu; ++u) {
     678             :     char d = *(c++);
     679             :     unsigned char uu;
     680             :     if ((d >= '0') && (d <= '9'))
     681             :       uu = (unsigned char)((d - '0') << 4);
     682             :     else if ((d >= 'a') && (d <= 'f'))
     683             :       uu = (unsigned char)((d - ('a'-10)) << 4);
     684             :     else
     685             :       return (char *) 0;
     686             :     d = *(c++);
     687             :     if ((d >= '0') && (d <= '9'))
     688             :       uu |= (unsigned char)(d - '0');
     689             :     else if ((d >= 'a') && (d <= 'f'))
     690             :       uu |= (unsigned char)(d - ('a'-10));
     691             :     else
     692             :       return (char *) 0;
     693             :     *u = uu;
     694             :   }
     695             :   return c;
     696             : }
     697             : 
     698             : /*
     699             :    Pack 'void *' into a string buffer.
     700             : */
     701             : SWIGRUNTIME char *
     702           0 : SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
     703           0 :   char *r = buff;
     704           0 :   if ((2*sizeof(void *) + 2) > bsz) return 0;
     705           0 :   *(r++) = '_';
     706           0 :   r = SWIG_PackData(r,&ptr,sizeof(void *));
     707           0 :   if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
     708           0 :   strcpy(r,name);
     709           0 :   return buff;
     710             : }
     711             : 
     712             : SWIGRUNTIME const char *
     713             : SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
     714             :   if (*c != '_') {
     715             :     if (strcmp(c,"NULL") == 0) {
     716             :       *ptr = (void *) 0;
     717             :       return name;
     718             :     } else {
     719             :       return 0;
     720             :     }
     721             :   }
     722             :   return SWIG_UnpackData(++c,ptr,sizeof(void *));
     723             : }
     724             : 
     725             : SWIGRUNTIME char *
     726           0 : SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
     727           0 :   char *r = buff;
     728           0 :   size_t lname = (name ? strlen(name) : 0);
     729           0 :   if ((2*sz + 2 + lname) > bsz) return 0;
     730           0 :   *(r++) = '_';
     731           0 :   r = SWIG_PackData(r,ptr,sz);
     732           0 :   if (lname) {
     733           0 :     strncpy(r,name,lname+1);
     734             :   } else {
     735           0 :     *r = 0;
     736             :   }
     737             :   return buff;
     738             : }
     739             : 
     740             : SWIGRUNTIME const char *
     741             : SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
     742             :   if (*c != '_') {
     743             :     if (strcmp(c,"NULL") == 0) {
     744             :       memset(ptr,0,sz);
     745             :       return name;
     746             :     } else {
     747             :       return 0;
     748             :     }
     749             :   }
     750             :   return SWIG_UnpackData(++c,ptr,sz);
     751             : }
     752             : 
     753             : #ifdef __cplusplus
     754             : }
     755             : #endif
     756             : 
     757             : /*  Errors in SWIG */
     758             : #define  SWIG_UnknownError         -1
     759             : #define  SWIG_IOError            -2
     760             : #define  SWIG_RuntimeError       -3
     761             : #define  SWIG_IndexError         -4
     762             : #define  SWIG_TypeError          -5
     763             : #define  SWIG_DivisionByZero     -6
     764             : #define  SWIG_OverflowError      -7
     765             : #define  SWIG_SyntaxError        -8
     766             : #define  SWIG_ValueError         -9
     767             : #define  SWIG_SystemError        -10
     768             : #define  SWIG_AttributeError     -11
     769             : #define  SWIG_MemoryError        -12
     770             : #define  SWIG_NullReferenceError   -13
     771             : 
     772             : 
     773             : 
     774             : /* Compatibility macros for Python 3 */
     775             : #if PY_VERSION_HEX >= 0x03000000
     776             : 
     777             : #define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type)
     778             : #define PyInt_Check(x) PyLong_Check(x)
     779             : #define PyInt_AsLong(x) PyLong_AsLong(x)
     780             : #define PyInt_FromLong(x) PyLong_FromLong(x)
     781             : #define PyInt_FromSize_t(x) PyLong_FromSize_t(x)
     782             : #define PyString_Check(name) PyBytes_Check(name)
     783             : #define PyString_FromString(x) PyUnicode_FromString(x)
     784             : #define PyString_Format(fmt, args)  PyUnicode_Format(fmt, args)
     785             : #define PyString_AsString(str) PyBytes_AsString(str)
     786             : #define PyString_Size(str) PyBytes_Size(str)  
     787             : #define PyString_InternFromString(key) PyUnicode_InternFromString(key)
     788             : #define Py_TPFLAGS_HAVE_CLASS Py_TPFLAGS_BASETYPE
     789             : #define PyString_AS_STRING(x) PyUnicode_AS_STRING(x)
     790             : #define _PyLong_FromSsize_t(x) PyLong_FromSsize_t(x)
     791             : 
     792             : #endif
     793             : 
     794             : #ifndef Py_TYPE
     795             : #  define Py_TYPE(op) ((op)->ob_type)
     796             : #endif
     797             : 
     798             : /* SWIG APIs for compatibility of both Python 2 & 3 */
     799             : 
     800             : #if PY_VERSION_HEX >= 0x03000000
     801             : #  define SWIG_Python_str_FromFormat PyUnicode_FromFormat
     802             : #else
     803             : #  define SWIG_Python_str_FromFormat PyString_FromFormat
     804             : #endif
     805             : 
     806             : 
     807             : /* Warning: This function will allocate a new string in Python 3,
     808             :  * so please call SWIG_Python_str_DelForPy3(x) to free the space.
     809             :  */
     810             : SWIGINTERN char*
     811             : SWIG_Python_str_AsChar(PyObject *str)
     812             : {
     813             : #if PY_VERSION_HEX >= 0x03000000
     814             :   char *newstr = 0;
     815             :   str = PyUnicode_AsUTF8String(str);
     816             :   if (str) {
     817             :     char *cstr;
     818             :     Py_ssize_t len;
     819             :     PyBytes_AsStringAndSize(str, &cstr, &len);
     820             :     newstr = (char *) malloc(len+1);
     821             :     memcpy(newstr, cstr, len+1);
     822             :     Py_XDECREF(str);
     823             :   }
     824             :   return newstr;
     825             : #else
     826             :   return PyString_AsString(str);
     827             : #endif
     828             : }
     829             : 
     830             : #if PY_VERSION_HEX >= 0x03000000
     831             : #  define SWIG_Python_str_DelForPy3(x) free( (void*) (x) )
     832             : #else
     833             : #  define SWIG_Python_str_DelForPy3(x) 
     834             : #endif
     835             : 
     836             : 
     837             : SWIGINTERN PyObject*
     838         307 : SWIG_Python_str_FromChar(const char *c)
     839             : {
     840             : #if PY_VERSION_HEX >= 0x03000000
     841         307 :   return PyUnicode_FromString(c); 
     842             : #else
     843             :   return PyString_FromString(c);
     844             : #endif
     845             : }
     846             : 
     847             : #ifndef PyObject_DEL
     848             : # define PyObject_DEL PyObject_Del
     849             : #endif
     850             : 
     851             : // SWIGPY_USE_CAPSULE is no longer used within SWIG itself, but some user
     852             : // interface files check for it.
     853             : # define SWIGPY_USE_CAPSULE
     854             : # define SWIGPY_CAPSULE_NAME ("swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME)
     855             : 
     856             : #if PY_VERSION_HEX < 0x03020000
     857             : #define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type)
     858             : #define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name)
     859             : #define Py_hash_t long
     860             : #endif
     861             : 
     862             : /* -----------------------------------------------------------------------------
     863             :  * error manipulation
     864             :  * ----------------------------------------------------------------------------- */
     865             : 
     866             : SWIGRUNTIME PyObject*
     867         893 : SWIG_Python_ErrorType(int code) {
     868         893 :   PyObject* type = 0;
     869          22 :   switch(code) {
     870           0 :   case SWIG_MemoryError:
     871           0 :     type = PyExc_MemoryError;
     872           0 :     break;
     873           0 :   case SWIG_IOError:
     874           0 :     type = PyExc_IOError;
     875           0 :     break;
     876         846 :   case SWIG_RuntimeError:
     877         846 :     type = PyExc_RuntimeError;
     878           0 :     break;
     879           0 :   case SWIG_IndexError:
     880           0 :     type = PyExc_IndexError;
     881           0 :     break;
     882          22 :   case SWIG_TypeError:
     883          22 :     type = PyExc_TypeError;
     884          22 :     break;
     885           0 :   case SWIG_DivisionByZero:
     886           0 :     type = PyExc_ZeroDivisionError;
     887           0 :     break;
     888           0 :   case SWIG_OverflowError:
     889           0 :     type = PyExc_OverflowError;
     890           0 :     break;
     891           0 :   case SWIG_SyntaxError:
     892           0 :     type = PyExc_SyntaxError;
     893           0 :     break;
     894          25 :   case SWIG_ValueError:
     895          25 :     type = PyExc_ValueError;
     896           0 :     break;
     897           0 :   case SWIG_SystemError:
     898           0 :     type = PyExc_SystemError;
     899           0 :     break;
     900           0 :   case SWIG_AttributeError:
     901           0 :     type = PyExc_AttributeError;
     902           0 :     break;
     903           0 :   default:
     904           0 :     type = PyExc_RuntimeError;
     905             :   }
     906         893 :   return type;
     907             : }
     908             : 
     909             : 
     910             : SWIGRUNTIME void
     911             : SWIG_Python_AddErrorMsg(const char* mesg)
     912             : {
     913             :   PyObject *type = 0;
     914             :   PyObject *value = 0;
     915             :   PyObject *traceback = 0;
     916             : 
     917             :   if (PyErr_Occurred())
     918             :     PyErr_Fetch(&type, &value, &traceback);
     919             :   if (value) {
     920             :     PyObject *old_str = PyObject_Str(value);
     921             :     const char *tmp = SWIG_Python_str_AsChar(old_str);
     922             :     PyErr_Clear();
     923             :     Py_XINCREF(type);
     924             :     if (tmp)
     925             :       PyErr_Format(type, "%s %s", tmp, mesg);
     926             :     else
     927             :       PyErr_Format(type, "%s", mesg);
     928             :     SWIG_Python_str_DelForPy3(tmp);
     929             :     Py_DECREF(old_str);
     930             :     Py_DECREF(value);
     931             :   } else {
     932             :     PyErr_SetString(PyExc_RuntimeError, mesg);
     933             :   }
     934             : }
     935             : 
     936             : SWIGRUNTIME int
     937           1 : SWIG_Python_TypeErrorOccurred(PyObject *obj)
     938             : {
     939           1 :   PyObject *error;
     940           1 :   if (obj)
     941             :     return 0;
     942           1 :   error = PyErr_Occurred();
     943           1 :   return error && PyErr_GivenExceptionMatches(error, PyExc_TypeError);
     944             : }
     945             : 
     946             : SWIGRUNTIME void
     947           1 : SWIG_Python_RaiseOrModifyTypeError(const char *message)
     948             : {
     949           1 :   if (SWIG_Python_TypeErrorOccurred(NULL)) {
     950             :     /* Use existing TypeError to preserve stacktrace and enhance with given message */
     951           0 :     PyObject *newvalue;
     952           0 :     PyObject *type = NULL, *value = NULL, *traceback = NULL;
     953           0 :     PyErr_Fetch(&type, &value, &traceback);
     954             : #if PY_VERSION_HEX >= 0x03000000
     955           0 :     newvalue = PyUnicode_FromFormat("%S\nAdditional information:\n%s", value, message);
     956             : #else
     957             :     newvalue = PyString_FromFormat("%s\nAdditional information:\n%s", PyString_AsString(value), message);
     958             : #endif
     959           0 :     Py_XDECREF(value);
     960           0 :     PyErr_Restore(type, newvalue, traceback);
     961             :   } else {
     962             :     /* Raise TypeError using given message */
     963           1 :     PyErr_SetString(PyExc_TypeError, message);
     964             :   }
     965           1 : }
     966             : 
     967             : #if defined(SWIG_PYTHON_NO_THREADS)
     968             : #  if defined(SWIG_PYTHON_THREADS)
     969             : #    undef SWIG_PYTHON_THREADS
     970             : #  endif
     971             : #endif
     972             : #if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */
     973             : #  if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL)
     974             : #    define SWIG_PYTHON_USE_GIL
     975             : #  endif
     976             : #  if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */
     977             : #    ifndef SWIG_PYTHON_INITIALIZE_THREADS
     978             : #     define SWIG_PYTHON_INITIALIZE_THREADS  PyEval_InitThreads() 
     979             : #    endif
     980             : #    ifdef __cplusplus /* C++ code */
     981             :        class SWIG_Python_Thread_Block {
     982             :          bool status;
     983             :          PyGILState_STATE state;
     984             :        public:
     985           0 :          void end() { if (status) { PyGILState_Release(state); status = false;} }
     986      816672 :          SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {}
     987       28225 :          ~SWIG_Python_Thread_Block() { end(); }
     988             :        };
     989             :        class SWIG_Python_Thread_Allow {
     990             :          bool status;
     991             :          PyThreadState *save;
     992             :        public:
     993     7090250 :          void end() { if (status) { PyEval_RestoreThread(save); status = false; }}
     994     7090250 :          SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {}
     995           0 :          ~SWIG_Python_Thread_Allow() { end(); }
     996             :        };
     997             : #      define SWIG_PYTHON_THREAD_BEGIN_BLOCK   SWIG_Python_Thread_Block _swig_thread_block
     998             : #      define SWIG_PYTHON_THREAD_END_BLOCK     _swig_thread_block.end()
     999             : #      define SWIG_PYTHON_THREAD_BEGIN_ALLOW   SWIG_Python_Thread_Allow _swig_thread_allow
    1000             : #      define SWIG_PYTHON_THREAD_END_ALLOW     _swig_thread_allow.end()
    1001             : #    else /* C code */
    1002             : #      define SWIG_PYTHON_THREAD_BEGIN_BLOCK   PyGILState_STATE _swig_thread_block = PyGILState_Ensure()
    1003             : #      define SWIG_PYTHON_THREAD_END_BLOCK     PyGILState_Release(_swig_thread_block)
    1004             : #      define SWIG_PYTHON_THREAD_BEGIN_ALLOW   PyThreadState *_swig_thread_allow = PyEval_SaveThread()
    1005             : #      define SWIG_PYTHON_THREAD_END_ALLOW     PyEval_RestoreThread(_swig_thread_allow)
    1006             : #    endif
    1007             : #  else /* Old thread way, not implemented, user must provide it */
    1008             : #    if !defined(SWIG_PYTHON_INITIALIZE_THREADS)
    1009             : #      define SWIG_PYTHON_INITIALIZE_THREADS
    1010             : #    endif
    1011             : #    if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK)
    1012             : #      define SWIG_PYTHON_THREAD_BEGIN_BLOCK
    1013             : #    endif
    1014             : #    if !defined(SWIG_PYTHON_THREAD_END_BLOCK)
    1015             : #      define SWIG_PYTHON_THREAD_END_BLOCK
    1016             : #    endif
    1017             : #    if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW)
    1018             : #      define SWIG_PYTHON_THREAD_BEGIN_ALLOW
    1019             : #    endif
    1020             : #    if !defined(SWIG_PYTHON_THREAD_END_ALLOW)
    1021             : #      define SWIG_PYTHON_THREAD_END_ALLOW
    1022             : #    endif
    1023             : #  endif
    1024             : #else /* No thread support */
    1025             : #  define SWIG_PYTHON_INITIALIZE_THREADS
    1026             : #  define SWIG_PYTHON_THREAD_BEGIN_BLOCK
    1027             : #  define SWIG_PYTHON_THREAD_END_BLOCK
    1028             : #  define SWIG_PYTHON_THREAD_BEGIN_ALLOW
    1029             : #  define SWIG_PYTHON_THREAD_END_ALLOW
    1030             : #endif
    1031             : 
    1032             : /* -----------------------------------------------------------------------------
    1033             :  * Python API portion that goes into the runtime
    1034             :  * ----------------------------------------------------------------------------- */
    1035             : 
    1036             : #ifdef __cplusplus
    1037             : extern "C" {
    1038             : #endif
    1039             : 
    1040             : /* -----------------------------------------------------------------------------
    1041             :  * Constant declarations
    1042             :  * ----------------------------------------------------------------------------- */
    1043             : 
    1044             : /* Constant Types */
    1045             : #define SWIG_PY_POINTER 4
    1046             : #define SWIG_PY_BINARY  5
    1047             : 
    1048             : /* Constant information structure */
    1049             : typedef struct swig_const_info {
    1050             :   int type;
    1051             :   const char *name;
    1052             :   long lvalue;
    1053             :   double dvalue;
    1054             :   void   *pvalue;
    1055             :   swig_type_info **ptype;
    1056             : } swig_const_info;
    1057             : 
    1058             : #ifdef __cplusplus
    1059             : }
    1060             : #endif
    1061             : 
    1062             : 
    1063             : /* -----------------------------------------------------------------------------
    1064             :  * pyrun.swg
    1065             :  *
    1066             :  * This file contains the runtime support for Python modules
    1067             :  * and includes code for managing global variables and pointer
    1068             :  * type checking.
    1069             :  *
    1070             :  * ----------------------------------------------------------------------------- */
    1071             : 
    1072             : #if PY_VERSION_HEX < 0x02070000 /* 2.7.0 */
    1073             : # error "This version of SWIG only supports Python >= 2.7"
    1074             : #endif
    1075             : 
    1076             : #if PY_VERSION_HEX >= 0x03000000 && PY_VERSION_HEX < 0x03020000
    1077             : # error "This version of SWIG only supports Python 3 >= 3.2"
    1078             : #endif
    1079             : 
    1080             : /* Common SWIG API */
    1081             : 
    1082             : /* for raw pointers */
    1083             : #define SWIG_Python_ConvertPtr(obj, pptr, type, flags)  SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
    1084             : #define SWIG_ConvertPtr(obj, pptr, type, flags)         SWIG_Python_ConvertPtr(obj, pptr, type, flags)
    1085             : #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own)  SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own)
    1086             : 
    1087             : #ifdef SWIGPYTHON_BUILTIN
    1088             : #define SWIG_NewPointerObj(ptr, type, flags)            SWIG_Python_NewPointerObj(self, ptr, type, flags)
    1089             : #else
    1090             : #define SWIG_NewPointerObj(ptr, type, flags)            SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
    1091             : #endif
    1092             : 
    1093             : #define SWIG_InternalNewPointerObj(ptr, type, flags)  SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
    1094             : 
    1095             : #define SWIG_CheckImplicit(ty)                          SWIG_Python_CheckImplicit(ty) 
    1096             : #define SWIG_AcquirePtr(ptr, src)                       SWIG_Python_AcquirePtr(ptr, src)
    1097             : #define swig_owntype                                    int
    1098             : 
    1099             : /* for raw packed data */
    1100             : #define SWIG_ConvertPacked(obj, ptr, sz, ty)            SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
    1101             : #define SWIG_NewPackedObj(ptr, sz, type)                SWIG_Python_NewPackedObj(ptr, sz, type)
    1102             : 
    1103             : /* for class or struct pointers */
    1104             : #define SWIG_ConvertInstance(obj, pptr, type, flags)    SWIG_ConvertPtr(obj, pptr, type, flags)
    1105             : #define SWIG_NewInstanceObj(ptr, type, flags)           SWIG_NewPointerObj(ptr, type, flags)
    1106             : 
    1107             : /* for C or C++ function pointers */
    1108             : #define SWIG_ConvertFunctionPtr(obj, pptr, type)        SWIG_Python_ConvertFunctionPtr(obj, pptr, type)
    1109             : #define SWIG_NewFunctionPtrObj(ptr, type)               SWIG_Python_NewPointerObj(NULL, ptr, type, 0)
    1110             : 
    1111             : /* for C++ member pointers, ie, member methods */
    1112             : #define SWIG_ConvertMember(obj, ptr, sz, ty)            SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
    1113             : #define SWIG_NewMemberObj(ptr, sz, type)                SWIG_Python_NewPackedObj(ptr, sz, type)
    1114             : 
    1115             : 
    1116             : /* Runtime API */
    1117             : 
    1118             : #define SWIG_GetModule(clientdata)                      SWIG_Python_GetModule(clientdata)
    1119             : #define SWIG_SetModule(clientdata, pointer)             SWIG_Python_SetModule(pointer)
    1120             : #define SWIG_NewClientData(obj)                         SwigPyClientData_New(obj)
    1121             : 
    1122             : #define SWIG_SetErrorObj                                SWIG_Python_SetErrorObj                            
    1123             : #define SWIG_SetErrorMsg                          SWIG_Python_SetErrorMsg          
    1124             : #define SWIG_ErrorType(code)                      SWIG_Python_ErrorType(code)                        
    1125             : #define SWIG_Error(code, msg)               SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg) 
    1126             : #define SWIG_fail                           goto fail            
    1127             : 
    1128             : 
    1129             : /* Runtime API implementation */
    1130             : 
    1131             : /* Error manipulation */
    1132             : 
    1133             : SWIGINTERN void 
    1134             : SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) {
    1135             :   SWIG_PYTHON_THREAD_BEGIN_BLOCK; 
    1136             :   PyErr_SetObject(errtype, obj);
    1137             :   Py_DECREF(obj);
    1138             :   SWIG_PYTHON_THREAD_END_BLOCK;
    1139             : }
    1140             : 
    1141             : SWIGINTERN void 
    1142         896 : SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
    1143         896 :   SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    1144         896 :   PyErr_SetString(errtype, msg);
    1145         896 :   SWIG_PYTHON_THREAD_END_BLOCK;
    1146         896 : }
    1147             : 
    1148             : #define SWIG_Python_Raise(obj, type, desc)  SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj)
    1149             : 
    1150             : /* Set a constant value */
    1151             : 
    1152             : #if defined(SWIGPYTHON_BUILTIN)
    1153             : 
    1154             : SWIGINTERN void
    1155             : SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) {
    1156             :   PyObject *s = PyString_InternFromString(key);
    1157             :   PyList_Append(seq, s);
    1158             :   Py_DECREF(s);
    1159             : }
    1160             : 
    1161             : SWIGINTERN void
    1162             : SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) {   
    1163             :   PyDict_SetItemString(d, name, obj);
    1164             :   Py_DECREF(obj);
    1165             :   if (public_interface)
    1166             :     SwigPyBuiltin_AddPublicSymbol(public_interface, name);
    1167             : }
    1168             : 
    1169             : #else
    1170             : 
    1171             : SWIGINTERN void
    1172        5420 : SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {   
    1173        5420 :   PyDict_SetItemString(d, name, obj);
    1174        5420 :   Py_DECREF(obj);                            
    1175        5420 : }
    1176             : 
    1177             : #endif
    1178             : 
    1179             : /* Append a value to the result obj */
    1180             : 
    1181             : SWIGINTERN PyObject*
    1182      427967 : SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
    1183      427967 :   if (!result) {
    1184             :     result = obj;
    1185      427696 :   } else if (result == Py_None) {
    1186      415993 :     Py_DECREF(result);
    1187             :     result = obj;
    1188             :   } else {
    1189       11703 :     if (!PyList_Check(result)) {
    1190       11109 :       PyObject *o2 = result;
    1191       11109 :       result = PyList_New(1);
    1192       11109 :       PyList_SetItem(result, 0, o2);
    1193             :     }
    1194       11703 :     PyList_Append(result,obj);
    1195       11703 :     Py_DECREF(obj);
    1196             :   }
    1197      427967 :   return result;
    1198             : }
    1199             : 
    1200             : /* Unpack the argument tuple */
    1201             : 
    1202             : SWIGINTERN Py_ssize_t
    1203     1158470 : SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
    1204             : {
    1205     1158470 :   if (!args) {
    1206       91576 :     if (!min && !max) {
    1207             :       return 1;
    1208             :     } else {
    1209           0 :       PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none", 
    1210             :        name, (min == max ? "" : "at least "), (int)min);
    1211           0 :       return 0;
    1212             :     }
    1213             :   }  
    1214     1066900 :   if (!PyTuple_Check(args)) {
    1215       10298 :     if (min <= 1 && max >= 1) {
    1216       10298 :       Py_ssize_t i;
    1217       10298 :       objs[0] = args;
    1218       10298 :       for (i = 1; i < max; ++i) {
    1219           0 :   objs[i] = 0;
    1220             :       }
    1221             :       return 2;
    1222             :     }
    1223           0 :     PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple");
    1224           0 :     return 0;
    1225             :   } else {
    1226     1056600 :     Py_ssize_t l = PyTuple_GET_SIZE(args);
    1227     1056600 :     if (l < min) {
    1228           0 :       PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", 
    1229             :        name, (min == max ? "" : "at least "), (int)min, (int)l);
    1230           0 :       return 0;
    1231     1056600 :     } else if (l > max) {
    1232           0 :       PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", 
    1233             :        name, (min == max ? "" : "at most "), (int)max, (int)l);
    1234           0 :       return 0;
    1235             :     } else {
    1236             :       Py_ssize_t i;
    1237     3908400 :       for (i = 0; i < l; ++i) {
    1238     2851800 :   objs[i] = PyTuple_GET_ITEM(args, i);
    1239             :       }
    1240     1339820 :       for (; l < max; ++l) {
    1241      283224 :   objs[l] = 0;
    1242             :       }
    1243     1056600 :       return i + 1;
    1244             :     }    
    1245             :   }
    1246             : }
    1247             : 
    1248             : /* A functor is a function object with one single object argument */
    1249             : #define SWIG_Python_CallFunctor(functor, obj)         PyObject_CallFunctionObjArgs(functor, obj, NULL);
    1250             : 
    1251             : /*
    1252             :   Helper for static pointer initialization for both C and C++ code, for example
    1253             :   static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...);
    1254             : */
    1255             : #ifdef __cplusplus
    1256             : #define SWIG_STATIC_POINTER(var)  var
    1257             : #else
    1258             : #define SWIG_STATIC_POINTER(var)  var = 0; if (!var) var
    1259             : #endif
    1260             : 
    1261             : /* -----------------------------------------------------------------------------
    1262             :  * Pointer declarations
    1263             :  * ----------------------------------------------------------------------------- */
    1264             : 
    1265             : /* Flags for new pointer objects */
    1266             : #define SWIG_POINTER_NOSHADOW       (SWIG_POINTER_OWN      << 1)
    1267             : #define SWIG_POINTER_NEW            (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN)
    1268             : 
    1269             : #define SWIG_POINTER_IMPLICIT_CONV  (SWIG_POINTER_DISOWN   << 1)
    1270             : 
    1271             : #define SWIG_BUILTIN_TP_INIT      (SWIG_POINTER_OWN << 2)
    1272             : #define SWIG_BUILTIN_INIT     (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN)
    1273             : 
    1274             : #ifdef __cplusplus
    1275             : extern "C" {
    1276             : #endif
    1277             : 
    1278             : /* The python void return value */
    1279             : 
    1280             : SWIGRUNTIMEINLINE PyObject * 
    1281      643019 : SWIG_Py_Void(void)
    1282             : {
    1283      643019 :   PyObject *none = Py_None;
    1284           0 :   Py_INCREF(none);
    1285       84343 :   return none;
    1286             : }
    1287             : 
    1288             : /* SwigPyClientData */
    1289             : 
    1290             : typedef struct {
    1291             :   PyObject *klass;
    1292             :   PyObject *newraw;
    1293             :   PyObject *newargs;
    1294             :   PyObject *destroy;
    1295             :   int delargs;
    1296             :   int implicitconv;
    1297             :   PyTypeObject *pytype;
    1298             : } SwigPyClientData;
    1299             : 
    1300             : SWIGRUNTIMEINLINE int 
    1301             : SWIG_Python_CheckImplicit(swig_type_info *ty)
    1302             : {
    1303             :   SwigPyClientData *data = (SwigPyClientData *)ty->clientdata;
    1304             :   int fail = data ? data->implicitconv : 0;
    1305             :   if (fail)
    1306             :     PyErr_SetString(PyExc_TypeError, "Implicit conversion is prohibited for explicit constructors.");
    1307             :   return fail;
    1308             : }
    1309             : 
    1310             : SWIGRUNTIMEINLINE PyObject *
    1311             : SWIG_Python_ExceptionType(swig_type_info *desc) {
    1312             :   SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0;
    1313             :   PyObject *klass = data ? data->klass : 0;
    1314             :   return (klass ? klass : PyExc_RuntimeError);
    1315             : }
    1316             : 
    1317             : 
    1318             : SWIGRUNTIME SwigPyClientData * 
    1319       10298 : SwigPyClientData_New(PyObject* obj)
    1320             : {
    1321       10298 :   if (!obj) {
    1322             :     return 0;
    1323             :   } else {
    1324       10298 :     SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData));
    1325             :     /* the klass element */
    1326       10298 :     data->klass = obj;
    1327       10298 :     Py_INCREF(data->klass);
    1328             :     /* the newraw method and newargs arguments used to create a new raw instance */
    1329       10298 :     if (PyClass_Check(obj)) {
    1330       10298 :       data->newraw = 0;
    1331       10298 :       data->newargs = obj;
    1332       10298 :       Py_INCREF(obj);
    1333             :     } else {
    1334           0 :       data->newraw = PyObject_GetAttrString(data->klass, "__new__");
    1335           0 :       if (data->newraw) {
    1336           0 :   Py_INCREF(data->newraw);
    1337           0 :   data->newargs = PyTuple_New(1);
    1338           0 :   PyTuple_SetItem(data->newargs, 0, obj);
    1339             :       } else {
    1340           0 :   data->newargs = obj;
    1341             :       }
    1342           0 :       Py_INCREF(data->newargs);
    1343             :     }
    1344             :     /* the destroy method, aka as the C++ delete method */
    1345       10298 :     data->destroy = PyObject_GetAttrString(data->klass, "__swig_destroy__");
    1346       10298 :     if (PyErr_Occurred()) {
    1347        1355 :       PyErr_Clear();
    1348        1355 :       data->destroy = 0;
    1349             :     }
    1350       10298 :     if (data->destroy) {
    1351        8943 :       int flags;
    1352        8943 :       Py_INCREF(data->destroy);
    1353        8943 :       flags = PyCFunction_GET_FLAGS(data->destroy);
    1354        8943 :       data->delargs = !(flags & (METH_O));
    1355             :     } else {
    1356        1355 :       data->delargs = 0;
    1357             :     }
    1358       10298 :     data->implicitconv = 0;
    1359       10298 :     data->pytype = 0;
    1360       10298 :     return data;
    1361             :   }
    1362             : }
    1363             : 
    1364             : SWIGRUNTIME void 
    1365       12195 : SwigPyClientData_Del(SwigPyClientData *data) {
    1366       12195 :   Py_XDECREF(data->newraw);
    1367       12195 :   Py_XDECREF(data->newargs);
    1368       12195 :   Py_XDECREF(data->destroy);
    1369       12195 : }
    1370             : 
    1371             : /* =============== SwigPyObject =====================*/
    1372             : 
    1373             : typedef struct {
    1374             :   PyObject_HEAD
    1375             :   void *ptr;
    1376             :   swig_type_info *ty;
    1377             :   int own;
    1378             :   PyObject *next;
    1379             : #ifdef SWIGPYTHON_BUILTIN
    1380             :   PyObject *dict;
    1381             : #endif
    1382             : } SwigPyObject;
    1383             : 
    1384             : 
    1385             : #ifdef SWIGPYTHON_BUILTIN
    1386             : 
    1387             : SWIGRUNTIME PyObject *
    1388             : SwigPyObject_get___dict__(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
    1389             : {
    1390             :   SwigPyObject *sobj = (SwigPyObject *)v;
    1391             : 
    1392             :   if (!sobj->dict)
    1393             :     sobj->dict = PyDict_New();
    1394             : 
    1395             :   Py_INCREF(sobj->dict);
    1396             :   return sobj->dict;
    1397             : }
    1398             : 
    1399             : #endif
    1400             : 
    1401             : SWIGRUNTIME PyObject *
    1402           0 : SwigPyObject_long(SwigPyObject *v)
    1403             : {
    1404           0 :   return PyLong_FromVoidPtr(v->ptr);
    1405             : }
    1406             : 
    1407             : SWIGRUNTIME PyObject *
    1408             : SwigPyObject_format(const char* fmt, SwigPyObject *v)
    1409             : {
    1410             :   PyObject *res = NULL;
    1411             :   PyObject *args = PyTuple_New(1);
    1412             :   if (args) {
    1413             :     if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) {
    1414             :       PyObject *ofmt = SWIG_Python_str_FromChar(fmt);
    1415             :       if (ofmt) {
    1416             : #if PY_VERSION_HEX >= 0x03000000
    1417             :   res = PyUnicode_Format(ofmt,args);
    1418             : #else
    1419             :   res = PyString_Format(ofmt,args);
    1420             : #endif
    1421             :   Py_DECREF(ofmt);
    1422             :       }
    1423             :       Py_DECREF(args);
    1424             :     }
    1425             :   }
    1426             :   return res;
    1427             : }
    1428             : 
    1429             : SWIGRUNTIME PyObject *
    1430             : SwigPyObject_oct(SwigPyObject *v)
    1431             : {
    1432             :   return SwigPyObject_format("%o",v);
    1433             : }
    1434             : 
    1435             : SWIGRUNTIME PyObject *
    1436             : SwigPyObject_hex(SwigPyObject *v)
    1437             : {
    1438             :   return SwigPyObject_format("%x",v);
    1439             : }
    1440             : 
    1441             : SWIGRUNTIME PyObject *
    1442           0 : SwigPyObject_repr(SwigPyObject *v)
    1443             : {
    1444           0 :   const char *name = SWIG_TypePrettyName(v->ty);
    1445           0 :   PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", (name ? name : "unknown"), (void *)v);
    1446           0 :   if (v->next) {
    1447           0 :     PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next);
    1448             : # if PY_VERSION_HEX >= 0x03000000
    1449           0 :     PyObject *joined = PyUnicode_Concat(repr, nrep);
    1450           0 :     Py_DecRef(repr);
    1451           0 :     Py_DecRef(nrep);
    1452           0 :     repr = joined;
    1453             : # else
    1454             :     PyString_ConcatAndDel(&repr,nrep);
    1455             : # endif
    1456             :   }
    1457           0 :   return repr;  
    1458             : }
    1459             : 
    1460             : /* We need a version taking two PyObject* parameters so it's a valid
    1461             :  * PyCFunction to use in swigobject_methods[]. */
    1462             : SWIGRUNTIME PyObject *
    1463           0 : SwigPyObject_repr2(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
    1464             : {
    1465           0 :   return SwigPyObject_repr((SwigPyObject*)v);
    1466             : }
    1467             : 
    1468             : SWIGRUNTIME int
    1469           2 : SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w)
    1470             : {
    1471           2 :   void *i = v->ptr;
    1472           2 :   void *j = w->ptr;
    1473           2 :   return (i < j) ? -1 : ((i > j) ? 1 : 0);
    1474             : }
    1475             : 
    1476             : /* Added for Python 3.x, would it also be useful for Python 2.x? */
    1477             : SWIGRUNTIME PyObject*
    1478           2 : SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op)
    1479             : {
    1480           2 :   PyObject* res;
    1481           2 :   if( op != Py_EQ && op != Py_NE ) {
    1482           0 :     Py_INCREF(Py_NotImplemented);
    1483           0 :     return Py_NotImplemented;
    1484             :   }
    1485           4 :   res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0);
    1486           2 :   return res;  
    1487             : }
    1488             : 
    1489             : 
    1490             : SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void);
    1491             : 
    1492             : #ifdef SWIGPYTHON_BUILTIN
    1493             : static swig_type_info *SwigPyObject_stype = 0;
    1494             : SWIGRUNTIME PyTypeObject*
    1495             : SwigPyObject_type(void) {
    1496             :     SwigPyClientData *cd;
    1497             :     assert(SwigPyObject_stype);
    1498             :     cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
    1499             :     assert(cd);
    1500             :     assert(cd->pytype);
    1501             :     return cd->pytype;
    1502             : }
    1503             : #else
    1504             : SWIGRUNTIME PyTypeObject*
    1505     7360780 : SwigPyObject_type(void) {
    1506     7360780 :   static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce();
    1507     7360780 :   return type;
    1508             : }
    1509             : #endif
    1510             : 
    1511             : SWIGRUNTIMEINLINE int
    1512             : SwigPyObject_Check(PyObject *op) {
    1513             : #ifdef SWIGPYTHON_BUILTIN
    1514             :   PyTypeObject *target_tp = SwigPyObject_type();
    1515             :   if (PyType_IsSubtype(op->ob_type, target_tp))
    1516             :     return 1;
    1517             :   return (strcmp(op->ob_type->tp_name, "SwigPyObject") == 0);
    1518             : #else
    1519             :   return (Py_TYPE(op) == SwigPyObject_type())
    1520             :     || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0);
    1521             : #endif
    1522             : }
    1523             : 
    1524             : SWIGRUNTIME PyObject *
    1525             : SwigPyObject_New(void *ptr, swig_type_info *ty, int own);
    1526             : 
    1527             : SWIGRUNTIME void
    1528      418593 : SwigPyObject_dealloc(PyObject *v)
    1529             : {
    1530      418593 :   SwigPyObject *sobj = (SwigPyObject *) v;
    1531      418593 :   PyObject *next = sobj->next;
    1532      418593 :   if (sobj->own == SWIG_POINTER_OWN) {
    1533       68317 :     swig_type_info *ty = sobj->ty;
    1534       68317 :     SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
    1535       68317 :     PyObject *destroy = data ? data->destroy : 0;
    1536       68317 :     if (destroy) {
    1537             :       /* destroy is always a VARARGS method */
    1538       68317 :       PyObject *res;
    1539             : 
    1540             :       /* PyObject_CallFunction() has the potential to silently drop
    1541             :          the active exception.  In cases of unnamed temporary
    1542             :          variable or where we just finished iterating over a generator
    1543             :          StopIteration will be active right now, and this needs to
    1544             :          remain true upon return from SwigPyObject_dealloc.  So save
    1545             :          and restore. */
    1546             :       
    1547       68317 :       PyObject *type = NULL, *value = NULL, *traceback = NULL;
    1548       68317 :       PyErr_Fetch(&type, &value, &traceback);
    1549             : 
    1550       68317 :       if (data->delargs) {
    1551             :         /* we need to create a temporary object to carry the destroy operation */
    1552           0 :         PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0);
    1553           0 :         res = SWIG_Python_CallFunctor(destroy, tmp);
    1554           0 :         Py_DECREF(tmp);
    1555             :       } else {
    1556       68317 :         PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
    1557       68317 :         PyObject *mself = PyCFunction_GET_SELF(destroy);
    1558       68317 :         res = ((*meth)(mself, v));
    1559             :       }
    1560       68317 :       if (!res)
    1561           0 :         PyErr_WriteUnraisable(destroy);
    1562             : 
    1563       68317 :       PyErr_Restore(type, value, traceback);
    1564             : 
    1565      136634 :       Py_XDECREF(res);
    1566             :     } 
    1567             : #if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
    1568             :     else {
    1569           0 :       const char *name = SWIG_TypePrettyName(ty);
    1570           0 :       printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown"));
    1571             :     }
    1572             : #endif
    1573             :   } 
    1574      418593 :   Py_XDECREF(next);
    1575      418593 :   PyObject_DEL(v);
    1576      418593 : }
    1577             : 
    1578             : SWIGRUNTIME PyObject* 
    1579           0 : SwigPyObject_append(PyObject* v, PyObject* next)
    1580             : {
    1581           0 :   SwigPyObject *sobj = (SwigPyObject *) v;
    1582           0 :   if (!SwigPyObject_Check(next)) {
    1583           0 :     PyErr_SetString(PyExc_TypeError, "Attempt to append a non SwigPyObject");
    1584           0 :     return NULL;
    1585             :   }
    1586           0 :   sobj->next = next;
    1587           0 :   Py_INCREF(next);
    1588           0 :   return SWIG_Py_Void();
    1589             : }
    1590             : 
    1591             : SWIGRUNTIME PyObject* 
    1592           0 : SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
    1593             : {
    1594           0 :   SwigPyObject *sobj = (SwigPyObject *) v;
    1595           0 :   if (sobj->next) {    
    1596           0 :     Py_INCREF(sobj->next);
    1597           0 :     return sobj->next;
    1598             :   } else {
    1599           0 :     return SWIG_Py_Void();
    1600             :   }
    1601             : }
    1602             : 
    1603             : SWIGINTERN PyObject*
    1604        2821 : SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
    1605             : {
    1606        2821 :   SwigPyObject *sobj = (SwigPyObject *)v;
    1607        2821 :   sobj->own = 0;
    1608        2821 :   return SWIG_Py_Void();
    1609             : }
    1610             : 
    1611             : SWIGINTERN PyObject*
    1612           0 : SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
    1613             : {
    1614           0 :   SwigPyObject *sobj = (SwigPyObject *)v;
    1615           0 :   sobj->own = SWIG_POINTER_OWN;
    1616           0 :   return SWIG_Py_Void();
    1617             : }
    1618             : 
    1619             : SWIGINTERN PyObject*
    1620        2821 : SwigPyObject_own(PyObject *v, PyObject *args)
    1621             : {
    1622        2821 :   PyObject *val = 0;
    1623        2821 :   if (!PyArg_UnpackTuple(args, "own", 0, 1, &val)) {
    1624             :     return NULL;
    1625             :   } else {
    1626        2821 :     SwigPyObject *sobj = (SwigPyObject *)v;
    1627        2821 :     PyObject *obj = PyBool_FromLong(sobj->own);
    1628        2821 :     if (val) {
    1629        2821 :       if (PyObject_IsTrue(val)) {
    1630           0 :         SwigPyObject_acquire(v,args);
    1631             :       } else {
    1632        2821 :         SwigPyObject_disown(v,args);
    1633             :       }
    1634             :     } 
    1635        2821 :     return obj;
    1636             :   }
    1637             : }
    1638             : 
    1639             : static PyMethodDef
    1640             : swigobject_methods[] = {
    1641             :   {"disown",  SwigPyObject_disown,  METH_NOARGS,  "releases ownership of the pointer"},
    1642             :   {"acquire", SwigPyObject_acquire, METH_NOARGS,  "acquires ownership of the pointer"},
    1643             :   {"own",     SwigPyObject_own,     METH_VARARGS, "returns/sets ownership of the pointer"},
    1644             :   {"append",  SwigPyObject_append,  METH_O,       "appends another 'this' object"},
    1645             :   {"next",    SwigPyObject_next,    METH_NOARGS,  "returns the next 'this' object"},
    1646             :   {"__repr__",SwigPyObject_repr2,   METH_NOARGS,  "returns object representation"},
    1647             :   {0, 0, 0, 0}  
    1648             : };
    1649             : 
    1650             : SWIGRUNTIME PyTypeObject*
    1651         271 : SwigPyObject_TypeOnce(void) {
    1652         271 :   static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";
    1653             : 
    1654         271 :   static PyNumberMethods SwigPyObject_as_number = {
    1655             :     (binaryfunc)0, /*nb_add*/
    1656             :     (binaryfunc)0, /*nb_subtract*/
    1657             :     (binaryfunc)0, /*nb_multiply*/
    1658             :     /* nb_divide removed in Python 3 */
    1659             : #if PY_VERSION_HEX < 0x03000000
    1660             :     (binaryfunc)0, /*nb_divide*/
    1661             : #endif
    1662             :     (binaryfunc)0, /*nb_remainder*/
    1663             :     (binaryfunc)0, /*nb_divmod*/
    1664             :     (ternaryfunc)0,/*nb_power*/
    1665             :     (unaryfunc)0,  /*nb_negative*/
    1666             :     (unaryfunc)0,  /*nb_positive*/
    1667             :     (unaryfunc)0,  /*nb_absolute*/
    1668             :     (inquiry)0,    /*nb_nonzero*/
    1669             :     0,       /*nb_invert*/
    1670             :     0,       /*nb_lshift*/
    1671             :     0,       /*nb_rshift*/
    1672             :     0,       /*nb_and*/
    1673             :     0,       /*nb_xor*/
    1674             :     0,       /*nb_or*/
    1675             : #if PY_VERSION_HEX < 0x03000000
    1676             :     0,   /*nb_coerce*/
    1677             : #endif
    1678             :     (unaryfunc)SwigPyObject_long, /*nb_int*/
    1679             : #if PY_VERSION_HEX < 0x03000000
    1680             :     (unaryfunc)SwigPyObject_long, /*nb_long*/
    1681             : #else
    1682             :     0, /*nb_reserved*/
    1683             : #endif
    1684             :     (unaryfunc)0,                 /*nb_float*/
    1685             : #if PY_VERSION_HEX < 0x03000000
    1686             :     (unaryfunc)SwigPyObject_oct,  /*nb_oct*/
    1687             :     (unaryfunc)SwigPyObject_hex,  /*nb_hex*/
    1688             : #endif
    1689             : #if PY_VERSION_HEX >= 0x03050000 /* 3.5 */
    1690             :     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_matrix_multiply */
    1691             : #elif PY_VERSION_HEX >= 0x03000000 /* 3.0 */
    1692             :     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */
    1693             : #else
    1694             :     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */
    1695             : #endif
    1696             :   };
    1697             : 
    1698         271 :   static PyTypeObject swigpyobject_type;
    1699         271 :   static int type_init = 0;
    1700         271 :   if (!type_init) {
    1701         271 :     const PyTypeObject tmp = {
    1702             : #if PY_VERSION_HEX >= 0x03000000
    1703             :       PyVarObject_HEAD_INIT(NULL, 0)
    1704             : #else
    1705             :       PyObject_HEAD_INIT(NULL)
    1706             :       0,                                    /* ob_size */
    1707             : #endif
    1708             :       "SwigPyObject",                       /* tp_name */
    1709             :       sizeof(SwigPyObject),                 /* tp_basicsize */
    1710             :       0,                                    /* tp_itemsize */
    1711             :       (destructor)SwigPyObject_dealloc,     /* tp_dealloc */
    1712             :       0,                                    /* tp_print */
    1713             :       (getattrfunc)0,                       /* tp_getattr */
    1714             :       (setattrfunc)0,                       /* tp_setattr */
    1715             : #if PY_VERSION_HEX >= 0x03000000
    1716             :       0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */
    1717             : #else
    1718             :       (cmpfunc)SwigPyObject_compare,        /* tp_compare */
    1719             : #endif
    1720             :       (reprfunc)SwigPyObject_repr,          /* tp_repr */
    1721             :       &SwigPyObject_as_number,              /* tp_as_number */
    1722             :       0,                                    /* tp_as_sequence */
    1723             :       0,                                    /* tp_as_mapping */
    1724             :       (hashfunc)0,                          /* tp_hash */
    1725             :       (ternaryfunc)0,                       /* tp_call */
    1726             :       0,                                    /* tp_str */
    1727             :       PyObject_GenericGetAttr,              /* tp_getattro */
    1728             :       0,                                    /* tp_setattro */
    1729             :       0,                                    /* tp_as_buffer */
    1730             :       Py_TPFLAGS_DEFAULT,                   /* tp_flags */
    1731             :       swigobject_doc,                       /* tp_doc */
    1732             :       0,                                    /* tp_traverse */
    1733             :       0,                                    /* tp_clear */
    1734             :       (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */
    1735             :       0,                                    /* tp_weaklistoffset */
    1736             :       0,                                    /* tp_iter */
    1737             :       0,                                    /* tp_iternext */
    1738             :       swigobject_methods,                   /* tp_methods */
    1739             :       0,                                    /* tp_members */
    1740             :       0,                                    /* tp_getset */
    1741             :       0,                                    /* tp_base */
    1742             :       0,                                    /* tp_dict */
    1743             :       0,                                    /* tp_descr_get */
    1744             :       0,                                    /* tp_descr_set */
    1745             :       0,                                    /* tp_dictoffset */
    1746             :       0,                                    /* tp_init */
    1747             :       0,                                    /* tp_alloc */
    1748             :       0,                                    /* tp_new */
    1749             :       0,                                    /* tp_free */
    1750             :       0,                                    /* tp_is_gc */
    1751             :       0,                                    /* tp_bases */
    1752             :       0,                                    /* tp_mro */
    1753             :       0,                                    /* tp_cache */
    1754             :       0,                                    /* tp_subclasses */
    1755             :       0,                                    /* tp_weaklist */
    1756             :       0,                                    /* tp_del */
    1757             :       0,                                    /* tp_version_tag */
    1758             : #if PY_VERSION_HEX >= 0x03040000
    1759             :       0,                                    /* tp_finalize */
    1760             : #endif
    1761             : #ifdef COUNT_ALLOCS
    1762             :       0,                                    /* tp_allocs */
    1763             :       0,                                    /* tp_frees */
    1764             :       0,                                    /* tp_maxalloc */
    1765             :       0,                                    /* tp_prev */
    1766             :       0                                     /* tp_next */
    1767             : #endif
    1768             :     };
    1769         271 :     swigpyobject_type = tmp;
    1770         271 :     type_init = 1;
    1771         271 :     if (PyType_Ready(&swigpyobject_type) < 0)
    1772           0 :       return NULL;
    1773             :   }
    1774             :   return &swigpyobject_type;
    1775             : }
    1776             : 
    1777             : SWIGRUNTIME PyObject *
    1778      418650 : SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
    1779             : {
    1780      418650 :   SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type());
    1781      418650 :   if (sobj) {
    1782      418650 :     sobj->ptr  = ptr;
    1783      418650 :     sobj->ty   = ty;
    1784      418650 :     sobj->own  = own;
    1785      418650 :     sobj->next = 0;
    1786             :   }
    1787      418650 :   return (PyObject *)sobj;
    1788             : }
    1789             : 
    1790             : /* -----------------------------------------------------------------------------
    1791             :  * Implements a simple Swig Packed type, and use it instead of string
    1792             :  * ----------------------------------------------------------------------------- */
    1793             : 
    1794             : typedef struct {
    1795             :   PyObject_HEAD
    1796             :   void *pack;
    1797             :   swig_type_info *ty;
    1798             :   size_t size;
    1799             : } SwigPyPacked;
    1800             : 
    1801             : SWIGRUNTIME PyObject *
    1802           0 : SwigPyPacked_repr(SwigPyPacked *v)
    1803             : {
    1804           0 :   char result[SWIG_BUFFER_SIZE];
    1805           0 :   if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
    1806           0 :     return SWIG_Python_str_FromFormat("<Swig Packed at %s%s>", result, v->ty->name);
    1807             :   } else {
    1808           0 :     return SWIG_Python_str_FromFormat("<Swig Packed %s>", v->ty->name);
    1809             :   }  
    1810             : }
    1811             : 
    1812             : SWIGRUNTIME PyObject *
    1813           0 : SwigPyPacked_str(SwigPyPacked *v)
    1814             : {
    1815           0 :   char result[SWIG_BUFFER_SIZE];
    1816           0 :   if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){
    1817           0 :     return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name);
    1818             :   } else {
    1819           0 :     return SWIG_Python_str_FromChar(v->ty->name);
    1820             :   }  
    1821             : }
    1822             : 
    1823             : SWIGRUNTIME int
    1824             : SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w)
    1825             : {
    1826             :   size_t i = v->size;
    1827             :   size_t j = w->size;
    1828             :   int s = (i < j) ? -1 : ((i > j) ? 1 : 0);
    1829             :   return s ? s : strncmp((const char *)v->pack, (const char *)w->pack, 2*v->size);
    1830             : }
    1831             : 
    1832             : SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void);
    1833             : 
    1834             : SWIGRUNTIME PyTypeObject*
    1835         271 : SwigPyPacked_type(void) {
    1836         271 :   static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce();
    1837         271 :   return type;
    1838             : }
    1839             : 
    1840             : SWIGRUNTIMEINLINE int
    1841             : SwigPyPacked_Check(PyObject *op) {
    1842             :   return ((op)->ob_type == SwigPyPacked_TypeOnce()) 
    1843             :     || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0);
    1844             : }
    1845             : 
    1846             : SWIGRUNTIME void
    1847           0 : SwigPyPacked_dealloc(PyObject *v)
    1848             : {
    1849           0 :   if (SwigPyPacked_Check(v)) {
    1850           0 :     SwigPyPacked *sobj = (SwigPyPacked *) v;
    1851           0 :     free(sobj->pack);
    1852             :   }
    1853           0 :   PyObject_DEL(v);
    1854           0 : }
    1855             : 
    1856             : SWIGRUNTIME PyTypeObject*
    1857         271 : SwigPyPacked_TypeOnce(void) {
    1858         271 :   static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer";
    1859         271 :   static PyTypeObject swigpypacked_type;
    1860         271 :   static int type_init = 0;
    1861         271 :   if (!type_init) {
    1862         271 :     const PyTypeObject tmp = {
    1863             : #if PY_VERSION_HEX>=0x03000000
    1864             :       PyVarObject_HEAD_INIT(NULL, 0)
    1865             : #else
    1866             :       PyObject_HEAD_INIT(NULL)
    1867             :       0,                                    /* ob_size */
    1868             : #endif
    1869             :       "SwigPyPacked",                       /* tp_name */
    1870             :       sizeof(SwigPyPacked),                 /* tp_basicsize */
    1871             :       0,                                    /* tp_itemsize */
    1872             :       (destructor)SwigPyPacked_dealloc,     /* tp_dealloc */
    1873             :       0,                                    /* tp_print */
    1874             :       (getattrfunc)0,                       /* tp_getattr */
    1875             :       (setattrfunc)0,                       /* tp_setattr */
    1876             : #if PY_VERSION_HEX>=0x03000000
    1877             :       0, /* tp_reserved in 3.0.1 */
    1878             : #else
    1879             :       (cmpfunc)SwigPyPacked_compare,        /* tp_compare */
    1880             : #endif
    1881             :       (reprfunc)SwigPyPacked_repr,          /* tp_repr */
    1882             :       0,                                    /* tp_as_number */
    1883             :       0,                                    /* tp_as_sequence */
    1884             :       0,                                    /* tp_as_mapping */
    1885             :       (hashfunc)0,                          /* tp_hash */
    1886             :       (ternaryfunc)0,                       /* tp_call */
    1887             :       (reprfunc)SwigPyPacked_str,           /* tp_str */
    1888             :       PyObject_GenericGetAttr,              /* tp_getattro */
    1889             :       0,                                    /* tp_setattro */
    1890             :       0,                                    /* tp_as_buffer */
    1891             :       Py_TPFLAGS_DEFAULT,                   /* tp_flags */
    1892             :       swigpacked_doc,                       /* tp_doc */
    1893             :       0,                                    /* tp_traverse */
    1894             :       0,                                    /* tp_clear */
    1895             :       0,                                    /* tp_richcompare */
    1896             :       0,                                    /* tp_weaklistoffset */
    1897             :       0,                                    /* tp_iter */
    1898             :       0,                                    /* tp_iternext */
    1899             :       0,                                    /* tp_methods */
    1900             :       0,                                    /* tp_members */
    1901             :       0,                                    /* tp_getset */
    1902             :       0,                                    /* tp_base */
    1903             :       0,                                    /* tp_dict */
    1904             :       0,                                    /* tp_descr_get */
    1905             :       0,                                    /* tp_descr_set */
    1906             :       0,                                    /* tp_dictoffset */
    1907             :       0,                                    /* tp_init */
    1908             :       0,                                    /* tp_alloc */
    1909             :       0,                                    /* tp_new */
    1910             :       0,                                    /* tp_free */
    1911             :       0,                                    /* tp_is_gc */
    1912             :       0,                                    /* tp_bases */
    1913             :       0,                                    /* tp_mro */
    1914             :       0,                                    /* tp_cache */
    1915             :       0,                                    /* tp_subclasses */
    1916             :       0,                                    /* tp_weaklist */
    1917             :       0,                                    /* tp_del */
    1918             :       0,                                    /* tp_version_tag */
    1919             : #if PY_VERSION_HEX >= 0x03040000
    1920             :       0,                                    /* tp_finalize */
    1921             : #endif
    1922             : #ifdef COUNT_ALLOCS
    1923             :       0,                                    /* tp_allocs */
    1924             :       0,                                    /* tp_frees */
    1925             :       0,                                    /* tp_maxalloc */
    1926             :       0,                                    /* tp_prev */
    1927             :       0                                     /* tp_next */
    1928             : #endif
    1929             :     };
    1930         271 :     swigpypacked_type = tmp;
    1931         271 :     type_init = 1;
    1932         271 :     if (PyType_Ready(&swigpypacked_type) < 0)
    1933           0 :       return NULL;
    1934             :   }
    1935             :   return &swigpypacked_type;
    1936             : }
    1937             : 
    1938             : SWIGRUNTIME PyObject *
    1939           0 : SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty)
    1940             : {
    1941           0 :   SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type());
    1942           0 :   if (sobj) {
    1943           0 :     void *pack = malloc(size);
    1944           0 :     if (pack) {
    1945           0 :       memcpy(pack, ptr, size);
    1946           0 :       sobj->pack = pack;
    1947           0 :       sobj->ty   = ty;
    1948           0 :       sobj->size = size;
    1949             :     } else {
    1950           0 :       PyObject_DEL((PyObject *) sobj);
    1951           0 :       sobj = 0;
    1952             :     }
    1953             :   }
    1954           0 :   return (PyObject *) sobj;
    1955             : }
    1956             : 
    1957             : SWIGRUNTIME swig_type_info *
    1958             : SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
    1959             : {
    1960             :   if (SwigPyPacked_Check(obj)) {
    1961             :     SwigPyPacked *sobj = (SwigPyPacked *)obj;
    1962             :     if (sobj->size != size) return 0;
    1963             :     memcpy(ptr, sobj->pack, size);
    1964             :     return sobj->ty;
    1965             :   } else {
    1966             :     return 0;
    1967             :   }
    1968             : }
    1969             : 
    1970             : /* -----------------------------------------------------------------------------
    1971             :  * pointers/data manipulation
    1972             :  * ----------------------------------------------------------------------------- */
    1973             : 
    1974             : static PyObject *Swig_This_global = NULL;
    1975             : 
    1976             : SWIGRUNTIME PyObject *
    1977     3230680 : SWIG_This(void)
    1978             : {
    1979     3230680 :   if (Swig_This_global == NULL)
    1980         271 :     Swig_This_global = SWIG_Python_str_FromChar("this");
    1981     3230680 :   return Swig_This_global;
    1982             : }
    1983             : 
    1984             : /* #define SWIG_PYTHON_SLOW_GETSET_THIS */
    1985             : 
    1986             : /* TODO: I don't know how to implement the fast getset in Python 3 right now */
    1987             : #if PY_VERSION_HEX>=0x03000000
    1988             : #define SWIG_PYTHON_SLOW_GETSET_THIS 
    1989             : #endif
    1990             : 
    1991             : SWIGRUNTIME SwigPyObject *
    1992     3299320 : SWIG_Python_GetSwigThis(PyObject *pyobj) 
    1993             : {
    1994     3299340 :   PyObject *obj;
    1995             : 
    1996     3299340 :   if (SwigPyObject_Check(pyobj))
    1997             :     return (SwigPyObject *) pyobj;
    1998             : 
    1999             : #ifdef SWIGPYTHON_BUILTIN
    2000             :   (void)obj;
    2001             : # ifdef PyWeakref_CheckProxy
    2002             :   if (PyWeakref_CheckProxy(pyobj)) {
    2003             :     pyobj = PyWeakref_GET_OBJECT(pyobj);
    2004             :     if (pyobj && SwigPyObject_Check(pyobj))
    2005             :       return (SwigPyObject*) pyobj;
    2006             :   }
    2007             : # endif
    2008             :   return NULL;
    2009             : #else
    2010             : 
    2011     3227250 :   obj = 0;
    2012             : 
    2013             : #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
    2014             :   if (PyInstance_Check(pyobj)) {
    2015             :     obj = _PyInstance_Lookup(pyobj, SWIG_This());      
    2016             :   } else {
    2017             :     PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
    2018             :     if (dictptr != NULL) {
    2019             :       PyObject *dict = *dictptr;
    2020             :       obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0;
    2021             :     } else {
    2022             : #ifdef PyWeakref_CheckProxy
    2023             :       if (PyWeakref_CheckProxy(pyobj)) {
    2024             :   PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
    2025             :   return wobj ? SWIG_Python_GetSwigThis(wobj) : 0;
    2026             :       }
    2027             : #endif
    2028             :       obj = PyObject_GetAttr(pyobj,SWIG_This());
    2029             :       if (obj) {
    2030             :   Py_DECREF(obj);
    2031             :       } else {
    2032             :   if (PyErr_Occurred()) PyErr_Clear();
    2033             :   return 0;
    2034             :       }
    2035             :     }
    2036             :   }
    2037             : #else
    2038     3227250 :   obj = PyObject_GetAttr(pyobj,SWIG_This());
    2039     3227250 :   if (obj) {
    2040     3223870 :     Py_DECREF(obj);
    2041             :   } else {
    2042        3376 :     if (PyErr_Occurred()) PyErr_Clear();
    2043        3376 :     return 0;
    2044             :   }
    2045             : #endif
    2046     3223870 :   if (obj && !SwigPyObject_Check(obj)) {
    2047             :     /* a PyObject is called 'this', try to get the 'real this'
    2048             :        SwigPyObject from it */ 
    2049             :     return SWIG_Python_GetSwigThis(obj);
    2050             :   }
    2051             :   return (SwigPyObject *)obj;
    2052             : #endif
    2053             : }
    2054             : 
    2055             : /* Acquire a pointer value */
    2056             : 
    2057             : SWIGRUNTIME int
    2058             : SWIG_Python_AcquirePtr(PyObject *obj, int own) {
    2059             :   if (own == SWIG_POINTER_OWN) {
    2060             :     SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj);
    2061             :     if (sobj) {
    2062             :       int oldown = sobj->own;
    2063             :       sobj->own = own;
    2064             :       return oldown;
    2065             :     }
    2066             :   }
    2067             :   return 0;
    2068             : }
    2069             : 
    2070             : /* Convert a pointer value */
    2071             : 
    2072             : SWIGRUNTIME int
    2073     3314320 : SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
    2074     3314320 :   int res;
    2075     3314320 :   SwigPyObject *sobj;
    2076     3314320 :   int implicit_conv = (flags & SWIG_POINTER_IMPLICIT_CONV) != 0;
    2077             : 
    2078     3314320 :   if (!obj)
    2079             :     return SWIG_ERROR;
    2080     3314320 :   if (obj == Py_None && !implicit_conv) {
    2081       17889 :     if (ptr)
    2082       17889 :       *ptr = 0;
    2083       35778 :     return (flags & SWIG_POINTER_NO_NULL) ? SWIG_NullReferenceError : SWIG_OK;
    2084             :   }
    2085             : 
    2086     3296440 :   res = SWIG_ERROR;
    2087             : 
    2088     3296440 :   sobj = SWIG_Python_GetSwigThis(obj);
    2089     3296440 :   if (own)
    2090           0 :     *own = 0;
    2091     3296440 :   while (sobj) {
    2092     3295950 :     void *vptr = sobj->ptr;
    2093     3295950 :     if (ty) {
    2094     3295950 :       swig_type_info *to = sobj->ty;
    2095     3295950 :       if (to == ty) {
    2096             :         /* no type cast needed */
    2097     3228970 :         if (ptr) *ptr = vptr;
    2098             :         break;
    2099             :       } else {
    2100       66979 :         swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
    2101       66979 :         if (!tc) {
    2102           1 :           sobj = (SwigPyObject *)sobj->next;
    2103             :         } else {
    2104       66978 :           if (ptr) {
    2105       66978 :             int newmemory = 0;
    2106       66978 :             *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
    2107       66978 :             if (newmemory == SWIG_CAST_NEW_MEMORY) {
    2108           0 :               assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */
    2109           0 :               if (own)
    2110           0 :                 *own = *own | SWIG_CAST_NEW_MEMORY;
    2111             :             }
    2112             :           }
    2113             :           break;
    2114             :         }
    2115             :       }
    2116             :     } else {
    2117           0 :       if (ptr) *ptr = vptr;
    2118             :       break;
    2119             :     }
    2120             :   }
    2121     3296440 :   if (sobj) {
    2122     3295940 :     if (own)
    2123           0 :       *own = *own | sobj->own;
    2124     3295940 :     if (flags & SWIG_POINTER_DISOWN) {
    2125       74430 :       sobj->own = 0;
    2126             :     }
    2127             :     res = SWIG_OK;
    2128             :   } else {
    2129         491 :     if (implicit_conv) {
    2130           0 :       SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
    2131           0 :       if (data && !data->implicitconv) {
    2132           0 :         PyObject *klass = data->klass;
    2133           0 :         if (klass) {
    2134           0 :           PyObject *impconv;
    2135           0 :           data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/
    2136           0 :           impconv = SWIG_Python_CallFunctor(klass, obj);
    2137           0 :           data->implicitconv = 0;
    2138           0 :           if (PyErr_Occurred()) {
    2139           0 :             PyErr_Clear();
    2140           0 :             impconv = 0;
    2141             :           }
    2142           0 :           if (impconv) {
    2143           0 :             SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv);
    2144           0 :             if (iobj) {
    2145           0 :               void *vptr;
    2146           0 :               res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0);
    2147           0 :               if (SWIG_IsOK(res)) {
    2148           0 :                 if (ptr) {
    2149           0 :                   *ptr = vptr;
    2150             :                   /* transfer the ownership to 'ptr' */
    2151           0 :                   iobj->own = 0;
    2152           0 :                   res = SWIG_AddCast(res);
    2153           0 :                   res = SWIG_AddNewMask(res);
    2154             :                 } else {
    2155             :                   res = SWIG_AddCast(res);        
    2156             :                 }
    2157             :               }
    2158             :             }
    2159           0 :             Py_DECREF(impconv);
    2160             :           }
    2161             :         }
    2162             :       }
    2163           0 :       if (!SWIG_IsOK(res) && obj == Py_None) {
    2164           0 :         if (ptr)
    2165           0 :           *ptr = 0;
    2166           0 :         if (PyErr_Occurred())
    2167           0 :           PyErr_Clear();
    2168             :         res = SWIG_OK;
    2169             :       }
    2170             :     }
    2171             :   }
    2172             :   return res;
    2173             : }
    2174             : 
    2175             : /* Convert a function ptr value */
    2176             : 
    2177             : SWIGRUNTIME int
    2178             : SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) {
    2179             :   if (!PyCFunction_Check(obj)) {
    2180             :     return SWIG_ConvertPtr(obj, ptr, ty, 0);
    2181             :   } else {
    2182             :     void *vptr = 0;
    2183             :     swig_cast_info *tc;
    2184             : 
    2185             :     /* here we get the method pointer for callbacks */
    2186             :     const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
    2187             :     const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0;
    2188             :     if (desc)
    2189             :       desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0;
    2190             :     if (!desc)
    2191             :       return SWIG_ERROR;
    2192             :     tc = SWIG_TypeCheck(desc,ty);
    2193             :     if (tc) {
    2194             :       int newmemory = 0;
    2195             :       *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
    2196             :       assert(!newmemory); /* newmemory handling not yet implemented */
    2197             :     } else {
    2198             :       return SWIG_ERROR;
    2199             :     }
    2200             :     return SWIG_OK;
    2201             :   }
    2202             : }
    2203             : 
    2204             : /* Convert a packed pointer value */
    2205             : 
    2206             : SWIGRUNTIME int
    2207             : SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) {
    2208             :   swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz);
    2209             :   if (!to) return SWIG_ERROR;
    2210             :   if (ty) {
    2211             :     if (to != ty) {
    2212             :       /* check type cast? */
    2213             :       swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
    2214             :       if (!tc) return SWIG_ERROR;
    2215             :     }
    2216             :   }
    2217             :   return SWIG_OK;
    2218             : }  
    2219             : 
    2220             : /* -----------------------------------------------------------------------------
    2221             :  * Create a new pointer object
    2222             :  * ----------------------------------------------------------------------------- */
    2223             : 
    2224             : /*
    2225             :   Create a new instance object, without calling __init__, and set the
    2226             :   'this' attribute.
    2227             : */
    2228             : 
    2229             : SWIGRUNTIME PyObject* 
    2230             : SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
    2231             : {
    2232             :   PyObject *inst = 0;
    2233             :   PyObject *newraw = data->newraw;
    2234             :   if (newraw) {
    2235             :     inst = PyObject_Call(newraw, data->newargs, NULL);
    2236             :     if (inst) {
    2237             : #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
    2238             :       PyObject **dictptr = _PyObject_GetDictPtr(inst);
    2239             :       if (dictptr != NULL) {
    2240             :   PyObject *dict = *dictptr;
    2241             :   if (dict == NULL) {
    2242             :     dict = PyDict_New();
    2243             :     *dictptr = dict;
    2244             :     PyDict_SetItem(dict, SWIG_This(), swig_this);
    2245             :   }
    2246             :       }
    2247             : #else
    2248             :       PyObject *key = SWIG_This();
    2249             :       PyObject_SetAttr(inst, key, swig_this);
    2250             : #endif
    2251             :     }
    2252             :   } else {
    2253             : #if PY_VERSION_HEX >= 0x03000000
    2254             :     PyObject *empty_args = PyTuple_New(0);
    2255             :     if (empty_args) {
    2256             :       PyObject *empty_kwargs = PyDict_New();
    2257             :       if (empty_kwargs) {
    2258             :         inst = ((PyTypeObject *)data->newargs)->tp_new((PyTypeObject *)data->newargs, empty_args, empty_kwargs);
    2259             :         Py_DECREF(empty_kwargs);
    2260             :         if (inst) {
    2261             :           PyObject_SetAttr(inst, SWIG_This(), swig_this);
    2262             :           Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG;
    2263             :         }
    2264             :       }
    2265             :       Py_DECREF(empty_args);
    2266             :     }
    2267             : #else
    2268             :     PyObject *dict = PyDict_New();
    2269             :     if (dict) {
    2270             :       PyDict_SetItem(dict, SWIG_This(), swig_this);
    2271             :       inst = PyInstance_NewRaw(data->newargs, dict);
    2272             :       Py_DECREF(dict);
    2273             :     }
    2274             : #endif
    2275             :   }
    2276             :   return inst;
    2277             : }
    2278             : 
    2279             : SWIGRUNTIME void
    2280        2886 : SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
    2281             : {
    2282        2886 :  PyObject *dict;
    2283             : #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
    2284             :  PyObject **dictptr = _PyObject_GetDictPtr(inst);
    2285             :  if (dictptr != NULL) {
    2286             :    dict = *dictptr;
    2287             :    if (dict == NULL) {
    2288             :      dict = PyDict_New();
    2289             :      *dictptr = dict;
    2290             :    }
    2291             :    PyDict_SetItem(dict, SWIG_This(), swig_this);
    2292             :    return;
    2293             :  }
    2294             : #endif
    2295        2886 :  dict = PyObject_GetAttrString(inst, "__dict__");
    2296        2886 :  PyDict_SetItem(dict, SWIG_This(), swig_this);
    2297        2886 :  Py_DECREF(dict);
    2298        2886 : } 
    2299             : 
    2300             : 
    2301             : SWIGINTERN PyObject *
    2302        2886 : SWIG_Python_InitShadowInstance(PyObject *args) {
    2303        2886 :   PyObject *obj[2];
    2304        2886 :   if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) {
    2305             :     return NULL;
    2306             :   } else {
    2307        2886 :     SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
    2308        2886 :     if (sthis) {
    2309           0 :       SwigPyObject_append((PyObject*) sthis, obj[1]);
    2310             :     } else {
    2311        2886 :       SWIG_Python_SetSwigThis(obj[0], obj[1]);
    2312             :     }
    2313        2886 :     return SWIG_Py_Void();
    2314             :   }
    2315             : }
    2316             : 
    2317             : /* Create a new pointer object */
    2318             : 
    2319             : SWIGRUNTIME PyObject *
    2320      435906 : SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) {
    2321      435906 :   SwigPyClientData *clientdata;
    2322      435906 :   PyObject * robj;
    2323      435906 :   int own;
    2324             : 
    2325      435906 :   if (!ptr)
    2326       17256 :     return SWIG_Py_Void();
    2327             : 
    2328      418650 :   clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
    2329      418650 :   own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
    2330      418650 :   if (clientdata && clientdata->pytype) {
    2331           0 :     SwigPyObject *newobj;
    2332           0 :     if (flags & SWIG_BUILTIN_TP_INIT) {
    2333           0 :       newobj = (SwigPyObject*) self;
    2334           0 :       if (newobj->ptr) {
    2335           0 :         PyObject *next_self = clientdata->pytype->tp_alloc(clientdata->pytype, 0);
    2336           0 :         while (newobj->next)
    2337             :     newobj = (SwigPyObject *) newobj->next;
    2338           0 :         newobj->next = next_self;
    2339           0 :         newobj = (SwigPyObject *)next_self;
    2340             : #ifdef SWIGPYTHON_BUILTIN
    2341             :         newobj->dict = 0;
    2342             : #endif
    2343             :       }
    2344             :     } else {
    2345           0 :       newobj = PyObject_New(SwigPyObject, clientdata->pytype);
    2346             : #ifdef SWIGPYTHON_BUILTIN
    2347             :       newobj->dict = 0;
    2348             : #endif
    2349             :     }
    2350           0 :     if (newobj) {
    2351           0 :       newobj->ptr = ptr;
    2352           0 :       newobj->ty = type;
    2353           0 :       newobj->own = own;
    2354           0 :       newobj->next = 0;
    2355           0 :       return (PyObject*) newobj;
    2356             :     }
    2357           0 :     return SWIG_Py_Void();
    2358             :   }
    2359             : 
    2360      418650 :   assert(!(flags & SWIG_BUILTIN_TP_INIT));
    2361             : 
    2362      418650 :   robj = SwigPyObject_New(ptr, type, own);
    2363      418650 :   if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
    2364      415464 :     PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
    2365      415464 :     Py_DECREF(robj);
    2366             :     robj = inst;
    2367             :   }
    2368             :   return robj;
    2369             : }
    2370             : 
    2371             : /* Create a new packed object */
    2372             : 
    2373             : SWIGRUNTIMEINLINE PyObject *
    2374           0 : SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) {
    2375           0 :   return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void();
    2376             : }
    2377             : 
    2378             : /* -----------------------------------------------------------------------------*
    2379             :  *  Get type list 
    2380             :  * -----------------------------------------------------------------------------*/
    2381             : 
    2382             : #ifdef SWIG_LINK_RUNTIME
    2383             : void *SWIG_ReturnGlobalTypeList(void *);
    2384             : #endif
    2385             : 
    2386             : SWIGRUNTIME swig_module_info *
    2387             : SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata)) {
    2388             :   static void *type_pointer = (void *)0;
    2389             :   /* first check if module already created */
    2390             :   if (!type_pointer) {
    2391             : #ifdef SWIG_LINK_RUNTIME
    2392             :     type_pointer = SWIG_ReturnGlobalTypeList((void *)0);
    2393             : #else
    2394             :     type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0);
    2395             :     if (PyErr_Occurred()) {
    2396             :       PyErr_Clear();
    2397             :       type_pointer = (void *)0;
    2398             :     }
    2399             : #endif
    2400             :   }
    2401             :   return (swig_module_info *) type_pointer;
    2402             : }
    2403             : 
    2404             : SWIGRUNTIME void
    2405         271 : SWIG_Python_DestroyModule(PyObject *obj)
    2406             : {
    2407         271 :   swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME);
    2408         271 :   swig_type_info **types = swig_module->types;
    2409         271 :   size_t i;
    2410       22222 :   for (i =0; i < swig_module->size; ++i) {
    2411       21951 :     swig_type_info *ty = types[i];
    2412       21951 :     if (ty->owndata) {
    2413       12195 :       SwigPyClientData *data = (SwigPyClientData *) ty->clientdata;
    2414       12195 :       if (data) SwigPyClientData_Del(data);
    2415             :     }
    2416             :   }
    2417         271 :   Py_DECREF(SWIG_This());
    2418         271 :   Swig_This_global = NULL;
    2419         271 : }
    2420             : 
    2421             : SWIGRUNTIME void
    2422         271 : SWIG_Python_SetModule(swig_module_info *swig_module) {
    2423             : #if PY_VERSION_HEX >= 0x03000000
    2424             :  /* Add a dummy module object into sys.modules */
    2425         271 :   PyObject *module = PyImport_AddModule("swig_runtime_data" SWIG_RUNTIME_VERSION);
    2426             : #else
    2427             :   static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */
    2428             :   PyObject *module = Py_InitModule("swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table);
    2429             : #endif
    2430         271 :   PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule);
    2431         271 :   if (pointer && module) {
    2432         271 :     PyModule_AddObject(module, "type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer);
    2433             :   } else {
    2434           0 :     Py_XDECREF(pointer);
    2435             :   }
    2436         271 : }
    2437             : 
    2438             : /* The python cached type query */
    2439             : SWIGRUNTIME PyObject *
    2440         307 : SWIG_Python_TypeCache(void) {
    2441         307 :   static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New();
    2442         307 :   return cache;
    2443             : }
    2444             : 
    2445             : SWIGRUNTIME swig_type_info *
    2446          36 : SWIG_Python_TypeQuery(const char *type)
    2447             : {
    2448          36 :   PyObject *cache = SWIG_Python_TypeCache();
    2449          36 :   PyObject *key = SWIG_Python_str_FromChar(type); 
    2450          36 :   PyObject *obj = PyDict_GetItem(cache, key);
    2451          36 :   swig_type_info *descriptor;
    2452          36 :   if (obj) {
    2453           0 :     descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL);
    2454             :   } else {
    2455          36 :     swig_module_info *swig_module = SWIG_GetModule(0);
    2456          36 :     descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
    2457          36 :     if (descriptor) {
    2458          36 :       obj = PyCapsule_New((void*) descriptor, NULL, NULL);
    2459          36 :       PyDict_SetItem(cache, key, obj);
    2460          36 :       Py_DECREF(obj);
    2461             :     }
    2462             :   }
    2463          36 :   Py_DECREF(key);
    2464          36 :   return descriptor;
    2465             : }
    2466             : 
    2467             : /* 
    2468             :    For backward compatibility only
    2469             : */
    2470             : #define SWIG_POINTER_EXCEPTION  0
    2471             : #define SWIG_arg_fail(arg)      SWIG_Python_ArgFail(arg)
    2472             : #define SWIG_MustGetPtr(p, type, argnum, flags)  SWIG_Python_MustGetPtr(p, type, argnum, flags)
    2473             : 
    2474             : SWIGRUNTIME int
    2475             : SWIG_Python_AddErrMesg(const char* mesg, int infront)
    2476             : {  
    2477             :   if (PyErr_Occurred()) {
    2478             :     PyObject *type = 0;
    2479             :     PyObject *value = 0;
    2480             :     PyObject *traceback = 0;
    2481             :     PyErr_Fetch(&type, &value, &traceback);
    2482             :     if (value) {
    2483             :       PyObject *old_str = PyObject_Str(value);
    2484             :       const char *tmp = SWIG_Python_str_AsChar(old_str);
    2485             :       const char *errmesg = tmp ? tmp : "Invalid error message";
    2486             :       Py_XINCREF(type);
    2487             :       PyErr_Clear();
    2488             :       if (infront) {
    2489             :   PyErr_Format(type, "%s %s", mesg, errmesg);
    2490             :       } else {
    2491             :   PyErr_Format(type, "%s %s", errmesg, mesg);
    2492             :       }
    2493             :       SWIG_Python_str_DelForPy3(tmp);
    2494             :       Py_DECREF(old_str);
    2495             :     }
    2496             :     return 1;
    2497             :   } else {
    2498             :     return 0;
    2499             :   }
    2500             : }
    2501             :   
    2502             : SWIGRUNTIME int
    2503             : SWIG_Python_ArgFail(int argnum)
    2504             : {
    2505             :   if (PyErr_Occurred()) {
    2506             :     /* add information about failing argument */
    2507             :     char mesg[256];
    2508             :     PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum);
    2509             :     return SWIG_Python_AddErrMesg(mesg, 1);
    2510             :   } else {
    2511             :     return 0;
    2512             :   }
    2513             : }
    2514             : 
    2515             : SWIGRUNTIMEINLINE const char *
    2516             : SwigPyObject_GetDesc(PyObject *self)
    2517             : {
    2518             :   SwigPyObject *v = (SwigPyObject *)self;
    2519             :   swig_type_info *ty = v ? v->ty : 0;
    2520             :   return ty ? ty->str : "";
    2521             : }
    2522             : 
    2523             : SWIGRUNTIME void
    2524             : SWIG_Python_TypeError(const char *type, PyObject *obj)
    2525             : {
    2526             :   if (type) {
    2527             : #if defined(SWIG_COBJECT_TYPES)
    2528             :     if (obj && SwigPyObject_Check(obj)) {
    2529             :       const char *otype = (const char *) SwigPyObject_GetDesc(obj);
    2530             :       if (otype) {
    2531             :   PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received",
    2532             :          type, otype);
    2533             :   return;
    2534             :       }
    2535             :     } else 
    2536             : #endif      
    2537             :     {
    2538             :       const char *otype = (obj ? obj->ob_type->tp_name : 0); 
    2539             :       if (otype) {
    2540             :   PyObject *str = PyObject_Str(obj);
    2541             :   const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0;
    2542             :   if (cstr) {
    2543             :     PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received",
    2544             :            type, otype, cstr);
    2545             :           SWIG_Python_str_DelForPy3(cstr);
    2546             :   } else {
    2547             :     PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received",
    2548             :            type, otype);
    2549             :   }
    2550             :   Py_XDECREF(str);
    2551             :   return;
    2552             :       }
    2553             :     }   
    2554             :     PyErr_Format(PyExc_TypeError, "a '%s' is expected", type);
    2555             :   } else {
    2556             :     PyErr_Format(PyExc_TypeError, "unexpected type is received");
    2557             :   }
    2558             : }
    2559             : 
    2560             : 
    2561             : /* Convert a pointer value, signal an exception on a type mismatch */
    2562             : SWIGRUNTIME void *
    2563             : SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags) {
    2564             :   void *result;
    2565             :   if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
    2566             :     PyErr_Clear();
    2567             : #if SWIG_POINTER_EXCEPTION
    2568             :     if (flags) {
    2569             :       SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj);
    2570             :       SWIG_Python_ArgFail(argnum);
    2571             :     }
    2572             : #endif
    2573             :   }
    2574             :   return result;
    2575             : }
    2576             : 
    2577             : #ifdef SWIGPYTHON_BUILTIN
    2578             : SWIGRUNTIME int
    2579             : SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
    2580             :   PyTypeObject *tp = obj->ob_type;
    2581             :   PyObject *descr;
    2582             :   PyObject *encoded_name;
    2583             :   descrsetfunc f;
    2584             :   int res = -1;
    2585             : 
    2586             : # ifdef Py_USING_UNICODE
    2587             :   if (PyString_Check(name)) {
    2588             :     name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL);
    2589             :     if (!name)
    2590             :       return -1;
    2591             :   } else if (!PyUnicode_Check(name))
    2592             : # else
    2593             :   if (!PyString_Check(name))
    2594             : # endif
    2595             :   {
    2596             :     PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name);
    2597             :     return -1;
    2598             :   } else {
    2599             :     Py_INCREF(name);
    2600             :   }
    2601             : 
    2602             :   if (!tp->tp_dict) {
    2603             :     if (PyType_Ready(tp) < 0)
    2604             :       goto done;
    2605             :   }
    2606             : 
    2607             :   descr = _PyType_Lookup(tp, name);
    2608             :   f = NULL;
    2609             :   if (descr != NULL)
    2610             :     f = descr->ob_type->tp_descr_set;
    2611             :   if (!f) {
    2612             :     if (PyString_Check(name)) {
    2613             :       encoded_name = name;
    2614             :       Py_INCREF(name);
    2615             :     } else {
    2616             :       encoded_name = PyUnicode_AsUTF8String(name);
    2617             :       if (!encoded_name)
    2618             :         return -1;
    2619             :     }
    2620             :     PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name));
    2621             :     Py_DECREF(encoded_name);
    2622             :   } else {
    2623             :     res = f(descr, obj, value);
    2624             :   }
    2625             :   
    2626             :   done:
    2627             :   Py_DECREF(name);
    2628             :   return res;
    2629             : }
    2630             : #endif
    2631             : 
    2632             : 
    2633             : #ifdef __cplusplus
    2634             : }
    2635             : #endif
    2636             : 
    2637             : 
    2638             : 
    2639             : #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) 
    2640             : 
    2641             : #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else 
    2642             : 
    2643             : 
    2644             : 
    2645             : #ifdef __cplusplus
    2646             : extern "C" {
    2647             : #endif
    2648             : 
    2649             : /* Method creation and docstring support functions */
    2650             : 
    2651             : SWIGINTERN PyMethodDef *SWIG_PythonGetProxyDoc(const char *name);
    2652             : SWIGINTERN PyObject *SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func);
    2653             : SWIGINTERN PyObject *SWIG_PyStaticMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func);
    2654             : 
    2655             : #ifdef __cplusplus
    2656             : }
    2657             : #endif
    2658             : 
    2659             : 
    2660             :   #define SWIG_exception(code, msg) do { SWIG_Error(code, msg); SWIG_fail;; } while(0) 
    2661             : 
    2662             : 
    2663             : /* -------- TYPES TABLE (BEGIN) -------- */
    2664             : 
    2665             : #define SWIGTYPE_p_CPLErrorHandler swig_types[0]
    2666             : #define SWIGTYPE_p_CPLVirtualMemShadow swig_types[1]
    2667             : #define SWIGTYPE_p_CPLXMLNode swig_types[2]
    2668             : #define SWIGTYPE_p_DirEntry swig_types[3]
    2669             : #define SWIGTYPE_p_GByte swig_types[4]
    2670             : #define SWIGTYPE_p_GDALAsyncReaderShadow swig_types[5]
    2671             : #define SWIGTYPE_p_GDALAttributeHS swig_types[6]
    2672             : #define SWIGTYPE_p_GDALBuildVRTOptions swig_types[7]
    2673             : #define SWIGTYPE_p_GDALColorEntry swig_types[8]
    2674             : #define SWIGTYPE_p_GDALColorTableShadow swig_types[9]
    2675             : #define SWIGTYPE_p_GDALDEMProcessingOptions swig_types[10]
    2676             : #define SWIGTYPE_p_GDALDatasetShadow swig_types[11]
    2677             : #define SWIGTYPE_p_GDALDimensionHS swig_types[12]
    2678             : #define SWIGTYPE_p_GDALDriverShadow swig_types[13]
    2679             : #define SWIGTYPE_p_GDALEDTComponentHS swig_types[14]
    2680             : #define SWIGTYPE_p_GDALExtendedDataTypeClass swig_types[15]
    2681             : #define SWIGTYPE_p_GDALExtendedDataTypeHS swig_types[16]
    2682             : #define SWIGTYPE_p_GDALExtendedDataTypeSubType swig_types[17]
    2683             : #define SWIGTYPE_p_GDALFootprintOptions swig_types[18]
    2684             : #define SWIGTYPE_p_GDALGridOptions swig_types[19]
    2685             : #define SWIGTYPE_p_GDALGroupHS swig_types[20]
    2686             : #define SWIGTYPE_p_GDALInfoOptions swig_types[21]
    2687             : #define SWIGTYPE_p_GDALMDArrayHS swig_types[22]
    2688             : #define SWIGTYPE_p_GDALMajorObjectShadow swig_types[23]
    2689             : #define SWIGTYPE_p_GDALMultiDimInfoOptions swig_types[24]
    2690             : #define SWIGTYPE_p_GDALMultiDimTranslateOptions swig_types[25]
    2691             : #define SWIGTYPE_p_GDALNearblackOptions swig_types[26]
    2692             : #define SWIGTYPE_p_GDALProgressFunc swig_types[27]
    2693             : #define SWIGTYPE_p_GDALRasterAttributeTableShadow swig_types[28]
    2694             : #define SWIGTYPE_p_GDALRasterBandShadow swig_types[29]
    2695             : #define SWIGTYPE_p_GDALRasterizeOptions swig_types[30]
    2696             : #define SWIGTYPE_p_GDALRelationshipShadow swig_types[31]
    2697             : #define SWIGTYPE_p_GDALSubdatasetInfo swig_types[32]
    2698             : #define SWIGTYPE_p_GDALTileIndexOptions swig_types[33]
    2699             : #define SWIGTYPE_p_GDALTransformerInfoShadow swig_types[34]
    2700             : #define SWIGTYPE_p_GDALTranslateOptions swig_types[35]
    2701             : #define SWIGTYPE_p_GDALVectorInfoOptions swig_types[36]
    2702             : #define SWIGTYPE_p_GDALVectorTranslateOptions swig_types[37]
    2703             : #define SWIGTYPE_p_GDALViewshedMode swig_types[38]
    2704             : #define SWIGTYPE_p_GDALViewshedOutputType swig_types[39]
    2705             : #define SWIGTYPE_p_GDALWarpAppOptions swig_types[40]
    2706             : #define SWIGTYPE_p_GDAL_GCP swig_types[41]
    2707             : #define SWIGTYPE_p_GIntBig swig_types[42]
    2708             : #define SWIGTYPE_p_GUIntBig swig_types[43]
    2709             : #define SWIGTYPE_p_OGRFeatureShadow swig_types[44]
    2710             : #define SWIGTYPE_p_OGRFieldDomainShadow swig_types[45]
    2711             : #define SWIGTYPE_p_OGRGeomFieldDefnShadow swig_types[46]
    2712             : #define SWIGTYPE_p_OGRGeometryShadow swig_types[47]
    2713             : #define SWIGTYPE_p_OGRLayerShadow swig_types[48]
    2714             : #define SWIGTYPE_p_OGRStyleTableShadow swig_types[49]
    2715             : #define SWIGTYPE_p_OSRSpatialReferenceShadow swig_types[50]
    2716             : #define SWIGTYPE_p_StatBuf swig_types[51]
    2717             : #define SWIGTYPE_p_Statistics swig_types[52]
    2718             : #define SWIGTYPE_p_SuggestedWarpOutputRes swig_types[53]
    2719             : #define SWIGTYPE_p_VSIDIR swig_types[54]
    2720             : #define SWIGTYPE_p_VSILFILE swig_types[55]
    2721             : #define SWIGTYPE_p_bool swig_types[56]
    2722             : #define SWIGTYPE_p_char swig_types[57]
    2723             : #define SWIGTYPE_p_double swig_types[58]
    2724             : #define SWIGTYPE_p_f_double_p_q_const__char_p_void__int swig_types[59]
    2725             : #define SWIGTYPE_p_int swig_types[60]
    2726             : #define SWIGTYPE_p_p_GByte swig_types[61]
    2727             : #define SWIGTYPE_p_p_GDALDatasetShadow swig_types[62]
    2728             : #define SWIGTYPE_p_p_GDALDimensionHS swig_types[63]
    2729             : #define SWIGTYPE_p_p_GDALEDTComponentHS swig_types[64]
    2730             : #define SWIGTYPE_p_p_GDALMDArrayHS swig_types[65]
    2731             : #define SWIGTYPE_p_p_GDALRasterBandShadow swig_types[66]
    2732             : #define SWIGTYPE_p_p_GDAL_GCP swig_types[67]
    2733             : #define SWIGTYPE_p_p_GUIntBig swig_types[68]
    2734             : #define SWIGTYPE_p_p_OGRLayerShadow swig_types[69]
    2735             : #define SWIGTYPE_p_p_OSRSpatialReferenceShadow swig_types[70]
    2736             : #define SWIGTYPE_p_p_char swig_types[71]
    2737             : #define SWIGTYPE_p_p_double swig_types[72]
    2738             : #define SWIGTYPE_p_p_int swig_types[73]
    2739             : #define SWIGTYPE_p_p_p_GDALAttributeHS swig_types[74]
    2740             : #define SWIGTYPE_p_p_p_GDALDimensionHS swig_types[75]
    2741             : #define SWIGTYPE_p_p_p_GDALEDTComponentHS swig_types[76]
    2742             : #define SWIGTYPE_p_p_p_GDALMDArrayHS swig_types[77]
    2743             : #define SWIGTYPE_p_p_void swig_types[78]
    2744             : #define SWIGTYPE_p_size_t swig_types[79]
    2745             : #define SWIGTYPE_p_vsi_l_offset swig_types[80]
    2746             : static swig_type_info *swig_types[82];
    2747             : static swig_module_info swig_module = {swig_types, 81, 0, 0, 0, 0};
    2748             : #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
    2749             : #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
    2750             : 
    2751             : /* -------- TYPES TABLE (END) -------- */
    2752             : 
    2753             : #ifdef SWIG_TypeQuery
    2754             : # undef SWIG_TypeQuery
    2755             : #endif
    2756             : #define SWIG_TypeQuery SWIG_Python_TypeQuery
    2757             : 
    2758             : /*-----------------------------------------------
    2759             :               @(target):= _gdal.so
    2760             :   ------------------------------------------------*/
    2761             : #if PY_VERSION_HEX >= 0x03000000
    2762             : #  define SWIG_init    PyInit__gdal
    2763             : 
    2764             : #else
    2765             : #  define SWIG_init    init_gdal
    2766             : 
    2767             : #endif
    2768             : #define SWIG_name    "_gdal"
    2769             : 
    2770             : #define SWIGVERSION 0x040001 
    2771             : #define SWIG_VERSION SWIGVERSION
    2772             : 
    2773             : 
    2774             : #define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a)) 
    2775             : #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a)) 
    2776             : 
    2777             : 
    2778             : #include <stdexcept>
    2779             : 
    2780             : 
    2781             : namespace swig {
    2782             :   class SwigPtr_PyObject {
    2783             :   protected:
    2784             :     PyObject *_obj;
    2785             : 
    2786             :   public:
    2787             :     SwigPtr_PyObject() :_obj(0)
    2788             :     {
    2789             :     }
    2790             : 
    2791             :     SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj)
    2792             :     {
    2793             :       SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    2794             :       Py_XINCREF(_obj);      
    2795             :       SWIG_PYTHON_THREAD_END_BLOCK;
    2796             :     }
    2797             :     
    2798             :     SwigPtr_PyObject(PyObject *obj, bool initial_ref = true) :_obj(obj)
    2799             :     {
    2800             :       if (initial_ref) {
    2801             :         SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    2802             :         Py_XINCREF(_obj);
    2803             :         SWIG_PYTHON_THREAD_END_BLOCK;
    2804             :       }
    2805             :     }
    2806             :     
    2807             :     SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item) 
    2808             :     {
    2809             :       SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    2810             :       Py_XINCREF(item._obj);
    2811             :       Py_XDECREF(_obj);
    2812             :       _obj = item._obj;
    2813             :       SWIG_PYTHON_THREAD_END_BLOCK;
    2814             :       return *this;      
    2815             :     }
    2816             :     
    2817             :     ~SwigPtr_PyObject() 
    2818             :     {
    2819             :       SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    2820             :       Py_XDECREF(_obj);
    2821             :       SWIG_PYTHON_THREAD_END_BLOCK;
    2822             :     }
    2823             :     
    2824             :     operator PyObject *() const
    2825             :     {
    2826             :       return _obj;
    2827             :     }
    2828             : 
    2829             :     PyObject *operator->() const
    2830             :     {
    2831             :       return _obj;
    2832             :     }
    2833             :   };
    2834             : }
    2835             : 
    2836             : 
    2837             : namespace swig {
    2838             :   struct SwigVar_PyObject : SwigPtr_PyObject {
    2839             :     SwigVar_PyObject(PyObject* obj = 0) : SwigPtr_PyObject(obj, false) { }
    2840             :     
    2841             :     SwigVar_PyObject & operator = (PyObject* obj)
    2842             :     {
    2843             :       Py_XDECREF(_obj);
    2844             :       _obj = obj;
    2845             :       return *this;      
    2846             :     }
    2847             :   };
    2848             : }
    2849             : 
    2850             : 
    2851             : #include <iostream>
    2852             : #include <vector>
    2853             : using namespace std;
    2854             : 
    2855             : #define CPL_SUPRESS_CPLUSPLUS
    2856             : 
    2857             : // Suppress deprecation warning for GDALApplyVerticalShiftGrid
    2858             : #define CPL_WARN_DEPRECATED_GDALApplyVerticalShiftGrid(x)
    2859             : 
    2860             : #include "cpl_port.h"
    2861             : #include "cpl_string.h"
    2862             : #include "cpl_multiproc.h"
    2863             : #include "cpl_http.h"
    2864             : #include "cpl_vsi_error.h"
    2865             : 
    2866             : #include "gdal.h"
    2867             : #include "gdal_alg.h"
    2868             : #include "gdalwarper.h"
    2869             : #include "ogr_srs_api.h"
    2870             : 
    2871             : // From gdal_priv.h
    2872             : void CPL_DLL GDALEnablePixelTypeSignedByteWarning(GDALRasterBandH hBand, bool b);
    2873             : 
    2874             : typedef void GDALMajorObjectShadow;
    2875             : typedef void GDALDriverShadow;
    2876             : typedef void GDALDatasetShadow;
    2877             : typedef void GDALRasterBandShadow;
    2878             : typedef void GDALColorTableShadow;
    2879             : typedef void GDALRasterAttributeTableShadow;
    2880             : typedef void GDALSubdatasetInfoShadow;
    2881             : typedef void GDALTransformerInfoShadow;
    2882             : typedef void GDALAsyncReaderShadow;
    2883             : typedef void GDALRelationshipShadow;
    2884             : 
    2885             : typedef GDALExtendedDataTypeHS GDALExtendedDataTypeHS;
    2886             : typedef GDALEDTComponentHS GDALEDTComponentHS;
    2887             : typedef GDALGroupHS GDALGroupHS;
    2888             : typedef GDALMDArrayHS GDALMDArrayHS;
    2889             : typedef GDALAttributeHS GDALAttributeHS;
    2890             : typedef GDALDimensionHS GDALDimensionHS;
    2891             : 
    2892             : 
    2893             : 
    2894             : #ifdef DEBUG
    2895             : typedef struct OGRSpatialReferenceHS OSRSpatialReferenceShadow;
    2896             : typedef struct OGRLayerHS OGRLayerShadow;
    2897             : typedef struct OGRFeatureHS OGRFeatureShadow;
    2898             : typedef struct OGRGeometryHS OGRGeometryShadow;
    2899             : #else
    2900             : typedef void OSRSpatialReferenceShadow;
    2901             : typedef void OGRLayerShadow;
    2902             : typedef void OGRFeatureShadow;
    2903             : typedef void OGRGeometryShadow;
    2904             : #endif
    2905             : 
    2906             : typedef struct OGRStyleTableHS OGRStyleTableShadow;
    2907             : typedef struct OGRFieldDomainHS OGRFieldDomainShadow;
    2908             : typedef struct OGRGeomFieldDefnHS OGRGeomFieldDefnShadow;
    2909             : 
    2910             : 
    2911             : /* use this to not return the int returned by GDAL */
    2912             : typedef int RETURN_NONE;
    2913             : /* return value that is used for VSI methods that return -1 on error (and set errno) */
    2914             : typedef int VSI_RETVAL;
    2915             : 
    2916             : 
    2917          65 : static int getAlignment(GDALDataType ntype)
    2918             : {
    2919          65 :     switch(ntype)
    2920             :     {
    2921             :         case GDT_Unknown:
    2922             :             break; // shouldn't happen
    2923             :         case GDT_Byte:
    2924             :         case GDT_Int8:
    2925             :             return 1;
    2926             :         case GDT_Int16:
    2927             :         case GDT_UInt16:
    2928             :             return 2;
    2929             :         case GDT_Int32:
    2930             :         case GDT_UInt32:
    2931             :         case GDT_Float32:
    2932             :             return 4;
    2933             :         case GDT_Float64:
    2934             :         case GDT_Int64:
    2935             :         case GDT_UInt64:
    2936             :             return 8;
    2937             :         case GDT_CInt16:
    2938             :             return 2;
    2939             :         case GDT_CInt32:
    2940             :         case GDT_CFloat32:
    2941             :             return 4;
    2942             :         case GDT_CFloat64:
    2943             :             return 8;
    2944             :         case GDT_TypeCount:
    2945             :             break; // shouldn't happen
    2946             :     }
    2947             :     // shouldn't happen
    2948             :     CPLAssert(false);
    2949             :     return 1;
    2950             : }
    2951             : 
    2952      182996 : static bool readraster_acquirebuffer(void** buf,
    2953             :                                      void*& inputOutputBuf,
    2954             :                                      size_t buf_size,
    2955             :                                      GDALDataType ntype,
    2956             :                                      int l_bUseExceptions,
    2957             :                                      char*& data,
    2958             :                                      Py_buffer& view)
    2959             : {
    2960      365992 :     SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    2961             : 
    2962      182996 :     if( inputOutputBuf == Py_None )
    2963      182866 :         inputOutputBuf = NULL;
    2964             : 
    2965      182996 :     if( inputOutputBuf )
    2966             :     {
    2967          75 :         if (PyObject_GetBuffer( (PyObject*)inputOutputBuf, &view,
    2968             :                                 PyBUF_SIMPLE | PyBUF_WRITABLE) == 0)
    2969             :         {
    2970          69 :             if( static_cast<GUIntBig>(view.len) < buf_size )
    2971             :             {
    2972           4 :                 PyBuffer_Release(&view);
    2973           4 :                 SWIG_PYTHON_THREAD_END_BLOCK;
    2974           4 :                 CPLError(CE_Failure, CPLE_AppDefined,
    2975             :                     "buf_obj length is " CPL_FRMT_GUIB " bytes. "
    2976             :                     "It should be at least " CPL_FRMT_GUIB,
    2977           4 :                     static_cast<GUIntBig>(view.len),
    2978             :                     static_cast<GUIntBig>(buf_size));
    2979             :                 return false;
    2980             :             }
    2981          65 :             data = (char*)view.buf;
    2982         124 :             if( (reinterpret_cast<uintptr_t>(data) % getAlignment(ntype)) != 0 )
    2983             :             {
    2984          29 :                 PyBuffer_Release(&view);
    2985          29 :                 SWIG_PYTHON_THREAD_END_BLOCK;
    2986          29 :                 CPLError(CE_Failure, CPLE_AppDefined,
    2987             :                          "buffer has not the appropriate alignment");
    2988             :                 return false;
    2989             :             }
    2990             :         }
    2991             :         else
    2992             :         {
    2993           6 :             PyErr_Clear();
    2994           6 :             SWIG_PYTHON_THREAD_END_BLOCK;
    2995           6 :             CPLError(CE_Failure, CPLE_AppDefined,
    2996             :                      "buf_obj is not a simple writable buffer");
    2997             :             return false;
    2998             :         }
    2999             :     }
    3000             :     else
    3001             :     {
    3002      182921 :         *buf = (void *)PyByteArray_FromStringAndSize( NULL, buf_size );
    3003      182921 :         if (*buf == NULL)
    3004             :         {
    3005           0 :             *buf = Py_None;
    3006           0 :             if( !l_bUseExceptions )
    3007             :             {
    3008           0 :                 PyErr_Clear();
    3009             :             }
    3010           0 :             SWIG_PYTHON_THREAD_END_BLOCK;
    3011           0 :             CPLError(CE_Failure, CPLE_OutOfMemory, "Cannot allocate result buffer");
    3012             :             return false;
    3013             :         }
    3014      182921 :         data = PyByteArray_AsString( (PyObject *)*buf );
    3015             :     }
    3016      182957 :     SWIG_PYTHON_THREAD_END_BLOCK;
    3017             :     return true;
    3018             : }
    3019             : 
    3020      182957 : static void readraster_releasebuffer(CPLErr eErr,
    3021             :                                      void** buf,
    3022             :                                      void* inputOutputBuf,
    3023             :                                      Py_buffer& view)
    3024             : {
    3025      182957 :     SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    3026             : 
    3027      182957 :     if( inputOutputBuf )
    3028          36 :         PyBuffer_Release(&view);
    3029             : 
    3030      182957 :     if (eErr == CE_Failure)
    3031             :     {
    3032        1193 :         if( inputOutputBuf == NULL )
    3033        1193 :             Py_DECREF((PyObject*)*buf);
    3034        1193 :         *buf = NULL;
    3035             :     }
    3036      181764 :     else if( inputOutputBuf )
    3037             :     {
    3038          36 :         *buf = inputOutputBuf;
    3039          36 :         Py_INCREF((PyObject*)*buf);
    3040             :     }
    3041             : 
    3042      182957 :     SWIG_PYTHON_THREAD_END_BLOCK;
    3043      182957 : }
    3044             : 
    3045             : 
    3046             : 
    3047             : #define MODULE_NAME           "gdal"
    3048             : 
    3049             : 
    3050             : #include "cpl_string.h"
    3051             : #include "cpl_conv.h"
    3052             : 
    3053             : static int bUseExceptions=0;
    3054             : static int bUserHasSpecifiedIfUsingExceptions = FALSE;
    3055             : static thread_local int bUseExceptionsLocal = -1;
    3056             : 
    3057     1796350 : struct PythonBindingErrorHandlerContext
    3058             : {
    3059             :     std::string     osInitialMsg{};
    3060             :     std::string     osFailureMsg{};
    3061             :     CPLErrorNum     nLastCode = CPLE_None;
    3062             : };
    3063             : 
    3064             : static void CPL_STDCALL
    3065       20129 : PythonBindingErrorHandler(CPLErr eclass, CPLErrorNum err_no, const char *msg )
    3066             : {
    3067       20129 :   PythonBindingErrorHandlerContext* ctxt = static_cast<
    3068       20129 :       PythonBindingErrorHandlerContext*>(CPLGetErrorHandlerUserData());
    3069             : 
    3070             :   /*
    3071             :   ** Generally we want to suppress error reporting if we have exceptions
    3072             :   ** enabled as the error message will be in the exception thrown in
    3073             :   ** Python.
    3074             :   */
    3075             : 
    3076             :   /* If the error class is CE_Fatal, we want to have a message issued
    3077             :      because the CPL support code does an abort() before any exception
    3078             :      can be generated */
    3079       20129 :   if (eclass == CE_Fatal ) {
    3080           0 :     CPLCallPreviousHandler(eclass, err_no, msg );
    3081             :   }
    3082             : 
    3083             :   /*
    3084             :   ** We do not want to interfere with non-failure messages since
    3085             :   ** they won't be translated into exceptions.
    3086             :   */
    3087       20129 :   else if (eclass != CE_Failure ) {
    3088       19085 :     CPLCallPreviousHandler(eclass, err_no, msg );
    3089             :   }
    3090             :   else {
    3091        1044 :     ctxt->nLastCode = err_no;
    3092        1044 :     if( ctxt->osFailureMsg.empty() ) {
    3093         893 :       ctxt->osFailureMsg = msg;
    3094         893 :       ctxt->osInitialMsg = ctxt->osFailureMsg;
    3095             :     } else {
    3096         151 :       if( ctxt->osFailureMsg.size() < 10000 ) {
    3097         302 :         ctxt->osFailureMsg = std::string(msg) + "\nMay be caused by: " + ctxt->osFailureMsg;
    3098         151 :         ctxt->osInitialMsg = ctxt->osFailureMsg;
    3099             :       }
    3100             :       else
    3101           0 :         ctxt->osFailureMsg = std::string(msg) + "\n[...]\nMay be caused by: " + ctxt->osInitialMsg;
    3102             :     }
    3103             :   }
    3104       20129 : }
    3105             : 
    3106             : 
    3107             : 
    3108             : 
    3109             : static
    3110     7324600 : int GetUseExceptions() {
    3111     3607230 :   return bUseExceptionsLocal >= 0 ? bUseExceptionsLocal : bUseExceptions;
    3112             : }
    3113             : 
    3114        8629 : static int _GetExceptionsLocal()
    3115             : {
    3116        8629 :   return bUseExceptionsLocal;
    3117             : }
    3118             : 
    3119       17258 : static void _SetExceptionsLocal(int bVal)
    3120             : {
    3121       17258 :   bUseExceptionsLocal = bVal;
    3122             : }
    3123             : 
    3124             : static
    3125         274 : void _UseExceptions() {
    3126         274 :   CPLErrorReset();
    3127         274 :   bUserHasSpecifiedIfUsingExceptions = TRUE;
    3128         274 :   if( !bUseExceptions )
    3129             :   {
    3130         225 :     bUseExceptions = 1;
    3131             :   }
    3132             : }
    3133             : 
    3134             : static
    3135           5 : void _DontUseExceptions() {
    3136           5 :   CPLErrorReset();
    3137           5 :   bUserHasSpecifiedIfUsingExceptions = TRUE;
    3138           5 :   if( bUseExceptions )
    3139             :   {
    3140           0 :     bUseExceptions = 0;
    3141             :   }
    3142             : }
    3143             : 
    3144       49560 : static int _UserHasSpecifiedIfUsingExceptions()
    3145             : {
    3146       49560 :     return bUserHasSpecifiedIfUsingExceptions;
    3147             : }
    3148             : 
    3149             : 
    3150             : 
    3151             : SWIGINTERNINLINE PyObject*
    3152     2335520 :   SWIG_From_int  (int value)
    3153             : {
    3154     2335520 :   return PyInt_FromLong((long) value);
    3155             : }
    3156             : 
    3157             : 
    3158             : #include <limits.h>
    3159             : #if !defined(SWIG_NO_LLONG_MAX)
    3160             : # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
    3161             : #   define LLONG_MAX __LONG_LONG_MAX__
    3162             : #   define LLONG_MIN (-LLONG_MAX - 1LL)
    3163             : #   define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
    3164             : # endif
    3165             : #endif
    3166             : 
    3167             : 
    3168             : SWIGINTERN int
    3169      940799 : SWIG_AsVal_double (PyObject *obj, double *val)
    3170             : {
    3171      940799 :   int res = SWIG_TypeError;
    3172      940799 :   if (PyFloat_Check(obj)) {
    3173       39172 :     if (val) *val = PyFloat_AsDouble(obj);
    3174       39172 :     return SWIG_OK;
    3175             : #if PY_VERSION_HEX < 0x03000000
    3176             :   } else if (PyInt_Check(obj)) {
    3177             :     if (val) *val = (double) PyInt_AsLong(obj);
    3178             :     return SWIG_OK;
    3179             : #endif
    3180      901627 :   } else if (PyLong_Check(obj)) {
    3181      901627 :     double v = PyLong_AsDouble(obj);
    3182      901627 :     if (!PyErr_Occurred()) {
    3183      901627 :       if (val) *val = v;
    3184      901627 :       return SWIG_OK;
    3185             :     } else {
    3186           0 :       PyErr_Clear();
    3187             :     }
    3188             :   }
    3189             : #ifdef SWIG_PYTHON_CAST_MODE
    3190             :   {
    3191             :     int dispatch = 0;
    3192             :     double d = PyFloat_AsDouble(obj);
    3193             :     if (!PyErr_Occurred()) {
    3194             :       if (val) *val = d;
    3195             :       return SWIG_AddCast(SWIG_OK);
    3196             :     } else {
    3197             :       PyErr_Clear();
    3198             :     }
    3199             :     if (!dispatch) {
    3200             :       long v = PyLong_AsLong(obj);
    3201             :       if (!PyErr_Occurred()) {
    3202             :   if (val) *val = v;
    3203             :   return SWIG_AddCast(SWIG_AddCast(SWIG_OK));
    3204             :       } else {
    3205             :   PyErr_Clear();
    3206             :       }
    3207             :     }
    3208             :   }
    3209             : #endif
    3210             :   return res;
    3211             : }
    3212             : 
    3213             : 
    3214             : #include <float.h>
    3215             : 
    3216             : 
    3217             : #include <math.h>
    3218             : 
    3219             : 
    3220             : SWIGINTERNINLINE int
    3221             : SWIG_CanCastAsInteger(double *d, double min, double max) {
    3222             :   double x = *d;
    3223             :   if ((min <= x && x <= max)) {
    3224             :    double fx = floor(x);
    3225             :    double cx = ceil(x);
    3226             :    double rd =  ((x - fx) < 0.5) ? fx : cx; /* simple rint */
    3227             :    if ((errno == EDOM) || (errno == ERANGE)) {
    3228             :      errno = 0;
    3229             :    } else {
    3230             :      double summ, reps, diff;
    3231             :      if (rd < x) {
    3232             :        diff = x - rd;
    3233             :      } else if (rd > x) {
    3234             :        diff = rd - x;
    3235             :      } else {
    3236             :        return 1;
    3237             :      }
    3238             :      summ = rd + x;
    3239             :      reps = diff/summ;
    3240             :      if (reps < 8*DBL_EPSILON) {
    3241             :        *d = rd;
    3242             :        return 1;
    3243             :      }
    3244             :    }
    3245             :   }
    3246             :   return 0;
    3247             : }
    3248             : 
    3249             : 
    3250             : SWIGINTERN int
    3251     2442380 : SWIG_AsVal_long (PyObject *obj, long* val)
    3252             : {
    3253             : #if PY_VERSION_HEX < 0x03000000
    3254             :   if (PyInt_Check(obj)) {
    3255             :     if (val) *val = PyInt_AsLong(obj);
    3256             :     return SWIG_OK;
    3257             :   } else
    3258             : #endif
    3259     2442380 :   if (PyLong_Check(obj)) {
    3260     2442380 :     long v = PyLong_AsLong(obj);
    3261     2442380 :     if (!PyErr_Occurred()) {
    3262     2442380 :       if (val) *val = v;
    3263     2442380 :       return SWIG_OK;
    3264             :     } else {
    3265           0 :       PyErr_Clear();
    3266           0 :       return SWIG_OverflowError;
    3267             :     }
    3268             :   }
    3269             : #ifdef SWIG_PYTHON_CAST_MODE
    3270             :   {
    3271             :     int dispatch = 0;
    3272             :     long v = PyInt_AsLong(obj);
    3273             :     if (!PyErr_Occurred()) {
    3274             :       if (val) *val = v;
    3275             :       return SWIG_AddCast(SWIG_OK);
    3276             :     } else {
    3277             :       PyErr_Clear();
    3278             :     }
    3279             :     if (!dispatch) {
    3280             :       double d;
    3281             :       int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
    3282             :       if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) {
    3283             :   if (val) *val = (long)(d);
    3284             :   return res;
    3285             :       }
    3286             :     }
    3287             :   }
    3288             : #endif
    3289             :   return SWIG_TypeError;
    3290             : }
    3291             : 
    3292             : 
    3293             : SWIGINTERN int
    3294     2433710 : SWIG_AsVal_int (PyObject * obj, int *val)
    3295             : {
    3296     2433710 :   long v;
    3297     4867410 :   int res = SWIG_AsVal_long (obj, &v);
    3298     2433710 :   if (SWIG_IsOK(res)) {
    3299     2433700 :     if ((v < INT_MIN || v > INT_MAX)) {
    3300             :       return SWIG_OverflowError;
    3301             :     } else {
    3302     2425010 :       if (val) *val = static_cast< int >(v);
    3303             :     }
    3304             :   }  
    3305             :   return res;
    3306             : }
    3307             : 
    3308             : 
    3309             : /* Completely unrelated: just to avoid Coverity warnings */
    3310             : 
    3311             : static int bReturnSame = 1;
    3312             : 
    3313           0 : void NeverCallMePlease() {
    3314           0 :     bReturnSame = 0;
    3315           0 : }
    3316             : 
    3317             : /* Some SWIG code generates dead code, which Coverity warns about */
    3318     3955550 : template<class T> static T ReturnSame(T x)
    3319             : {
    3320     3955550 :     if( bReturnSame )
    3321             :         return x;
    3322             :     return 0;
    3323             : }
    3324             : 
    3325     1796350 : static void pushErrorHandler()
    3326             : {
    3327     1796350 :     CPLErrorReset();
    3328     1796350 :     PythonBindingErrorHandlerContext* ctxt = new PythonBindingErrorHandlerContext();
    3329     1796350 :     CPLPushErrorHandlerEx(PythonBindingErrorHandler, ctxt);
    3330     1796350 : }
    3331             : 
    3332     1796350 : static void popErrorHandler()
    3333             : {
    3334     1796350 :     PythonBindingErrorHandlerContext* ctxt = static_cast<
    3335     1796350 :       PythonBindingErrorHandlerContext*>(CPLGetErrorHandlerUserData());
    3336     1796350 :     CPLPopErrorHandler();
    3337     1796350 :     if( !ctxt->osFailureMsg.empty() )
    3338             :     {
    3339         905 :       CPLErrorSetState(
    3340         893 :           CPLGetLastErrorType() == CE_Failure ? CE_Failure: CE_Warning,
    3341             :           ctxt->nLastCode, ctxt->osFailureMsg.c_str());
    3342             :     }
    3343     1796350 :     delete ctxt;
    3344     1796350 : }
    3345             : 
    3346             : 
    3347             : 
    3348             : 
    3349             : /* Return a PyObject* from a NULL terminated C String */
    3350             : static PyObject* GDALPythonObjectFromCStr(const char *pszStr) CPL_UNUSED;
    3351      100260 : static PyObject* GDALPythonObjectFromCStr(const char *pszStr)
    3352             : {
    3353      100260 :   const unsigned char* pszIter = (const unsigned char*) pszStr;
    3354    13127000 :   while(*pszIter != 0)
    3355             :   {
    3356    13026900 :     if (*pszIter > 127)
    3357             :     {
    3358         108 :         PyObject* pyObj = PyUnicode_DecodeUTF8(pszStr, strlen(pszStr), "strict");
    3359         108 :         if (pyObj != NULL && !PyErr_Occurred())
    3360             :             return pyObj;
    3361           1 :         PyErr_Clear();
    3362           1 :         return PyBytes_FromString(pszStr);
    3363             :     }
    3364    13026800 :     pszIter ++;
    3365             :   }
    3366      100152 :   return PyUnicode_FromString(pszStr);
    3367             : }
    3368             : 
    3369             : /* Return a NULL terminated c String from a PyObject */
    3370             : /* Result must be freed with GDALPythonFreeCStr */
    3371             : static char* GDALPythonObjectToCStr(PyObject* pyObject, int* pbToFree) CPL_UNUSED;
    3372       87774 : static char* GDALPythonObjectToCStr(PyObject* pyObject, int* pbToFree)
    3373             : {
    3374       87774 :   *pbToFree = 0;
    3375       87774 :   if (PyUnicode_Check(pyObject))
    3376             :   {
    3377       87772 :       char *pszStr;
    3378       87772 :       char *pszNewStr;
    3379       87772 :       Py_ssize_t nLen;
    3380       87772 :       PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObject);
    3381       87772 :       if( pyUTF8Str == NULL )
    3382             :         return NULL;
    3383       87772 :       PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
    3384       87772 :       pszNewStr = (char *) malloc(nLen+1);
    3385       87772 :       if( pszNewStr == NULL )
    3386             :       {
    3387           0 :           CPLError(CE_Failure, CPLE_OutOfMemory, "Failed to allocate %llu bytes",
    3388             :                    (unsigned long long)(nLen + 1));
    3389           0 :           Py_XDECREF(pyUTF8Str);
    3390           0 :           return NULL;
    3391             :       }
    3392       87772 :       memcpy(pszNewStr, pszStr, nLen+1);
    3393       87772 :       Py_XDECREF(pyUTF8Str);
    3394       87772 :       *pbToFree = 1;
    3395       87772 :       return pszNewStr;
    3396             :   }
    3397           2 :   else if( PyBytes_Check(pyObject) )
    3398             :   {
    3399           2 :       char* ret = PyBytes_AsString(pyObject);
    3400             : 
    3401             :       // Check if there are \0 bytes inside the string
    3402           2 :       const Py_ssize_t size = PyBytes_Size(pyObject);
    3403          24 :       for( Py_ssize_t i = 0; i < size; i++ )
    3404             :       {
    3405          23 :           if( ret[i] == 0 )
    3406             :           {
    3407           1 :               CPLError(CE_Failure, CPLE_AppDefined,
    3408             :                        "bytes object cast as string contains a zero-byte.");
    3409           1 :               return NULL;
    3410             :           }
    3411             :       }
    3412             : 
    3413             :       return ret;
    3414             :   }
    3415             :   else
    3416             :   {
    3417           0 :       CPLError(CE_Failure, CPLE_AppDefined,
    3418             :                "Passed object is neither of type string nor bytes");
    3419           0 :       return NULL;
    3420             :   }
    3421             : }
    3422             : 
    3423             : static char * GDALPythonPathToCStr(PyObject* pyObject, int* pbToFree) CPL_UNUSED;
    3424        5725 : static char * GDALPythonPathToCStr(PyObject* pyObject, int* pbToFree)
    3425             : {
    3426        5725 :     PyObject* os = PyImport_ImportModule("os");
    3427        5725 :     if (os == NULL)
    3428             :     {
    3429             :         return NULL;
    3430             :     }
    3431             : 
    3432        5725 :     PyObject* pathLike = PyObject_GetAttrString(os, "PathLike");
    3433        5725 :     if (pathLike == NULL)
    3434             :     {
    3435           0 :         Py_DECREF(os);
    3436           0 :         return NULL;
    3437             :     }
    3438             : 
    3439        5725 :     if (!PyObject_IsInstance(pyObject, pathLike))
    3440             :     {
    3441           4 :         Py_DECREF(pathLike);
    3442           4 :         Py_DECREF(os);
    3443           4 :         return NULL;
    3444             :     }
    3445             : 
    3446        5721 :     PyObject* str = PyObject_Str(pyObject);
    3447        5721 :     char* ret = NULL;
    3448        5721 :     if (str != NULL)
    3449             :     {
    3450        5721 :         ret = GDALPythonObjectToCStr(str, pbToFree);
    3451        5721 :         Py_DECREF(str);
    3452             :     }
    3453             : 
    3454        5721 :     Py_DECREF(pathLike);
    3455        5721 :     Py_DECREF(os);
    3456             : 
    3457             :     return ret;
    3458             : }
    3459             : 
    3460             : 
    3461             : static void GDALPythonFreeCStr(void* ptr, int bToFree) CPL_UNUSED;
    3462       87778 : static void GDALPythonFreeCStr(void* ptr, int bToFree)
    3463             : {
    3464       87778 :    if (bToFree)
    3465       87772 :        free(ptr);
    3466             : }
    3467             : 
    3468             : 
    3469             : 
    3470       26564 : unsigned int wrapper_VSIFReadL( void **buf, unsigned int nMembSize, unsigned int nMembCount, VSILFILE *fp)
    3471             : {
    3472       26564 :     size_t buf_size = static_cast<size_t>(nMembSize) * nMembCount;
    3473       26564 :     if( buf_size > 0xFFFFFFFFU )
    3474             :    {
    3475           0 :         CPLError(CE_Failure, CPLE_AppDefined, "Too big request");
    3476           0 :         *buf = NULL;
    3477           0 :         return 0;
    3478             :     }
    3479             : 
    3480       26564 :     if (buf_size == 0)
    3481             :     {
    3482          12 :         *buf = NULL;
    3483          12 :         return 0;
    3484             :     }
    3485             : 
    3486       53116 :     SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    3487       26552 :     *buf = (void *)PyByteArray_FromStringAndSize( NULL, buf_size );
    3488       26552 :     if (*buf == NULL)
    3489             :     {
    3490           0 :         *buf = Py_None;
    3491           0 :         if( !GetUseExceptions() )
    3492             :         {
    3493           0 :             PyErr_Clear();
    3494             :         }
    3495           0 :         SWIG_PYTHON_THREAD_END_BLOCK;
    3496           0 :         CPLError(CE_Failure, CPLE_OutOfMemory, "Cannot allocate result buffer");
    3497             :         return 0;
    3498             :     }
    3499       26552 :     PyObject* o = (PyObject*) *buf;
    3500       26552 :     char *data = PyByteArray_AsString(o);
    3501       26552 :     SWIG_PYTHON_THREAD_END_BLOCK;
    3502       26552 :     size_t nRet = (size_t)VSIFReadL( data, nMembSize, nMembCount, fp );
    3503       26552 :     if (nRet * (size_t)nMembSize < buf_size)
    3504             :     {
    3505       11135 :         SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    3506       11135 :         PyByteArray_Resize(o, nRet * nMembSize);
    3507       11135 :         SWIG_PYTHON_THREAD_END_BLOCK;
    3508       11135 :         *buf = o;
    3509             :     }
    3510       26552 :     return static_cast<unsigned int>(nRet);
    3511             : }
    3512             : 
    3513             : 
    3514             : SWIGINTERN int
    3515       56790 : SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val) 
    3516             : {
    3517             : #if PY_VERSION_HEX < 0x03000000
    3518             :   if (PyInt_Check(obj)) {
    3519             :     long v = PyInt_AsLong(obj);
    3520             :     if (v >= 0) {
    3521             :       if (val) *val = v;
    3522             :       return SWIG_OK;
    3523             :     } else {
    3524             :       return SWIG_OverflowError;
    3525             :     }
    3526             :   } else
    3527             : #endif
    3528       56790 :   if (PyLong_Check(obj)) {
    3529       56790 :     unsigned long v = PyLong_AsUnsignedLong(obj);
    3530       56790 :     if (!PyErr_Occurred()) {
    3531       56790 :       if (val) *val = v;
    3532       56790 :       return SWIG_OK;
    3533             :     } else {
    3534           0 :       PyErr_Clear();
    3535           0 :       return SWIG_OverflowError;
    3536             :     }
    3537             :   }
    3538             : #ifdef SWIG_PYTHON_CAST_MODE
    3539             :   {
    3540             :     int dispatch = 0;
    3541             :     unsigned long v = PyLong_AsUnsignedLong(obj);
    3542             :     if (!PyErr_Occurred()) {
    3543             :       if (val) *val = v;
    3544             :       return SWIG_AddCast(SWIG_OK);
    3545             :     } else {
    3546             :       PyErr_Clear();
    3547             :     }
    3548             :     if (!dispatch) {
    3549             :       double d;
    3550             :       int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
    3551             :       if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ULONG_MAX)) {
    3552             :   if (val) *val = (unsigned long)(d);
    3553             :   return res;
    3554             :       }
    3555             :     }
    3556             :   }
    3557             : #endif
    3558             :   return SWIG_TypeError;
    3559             : }
    3560             : 
    3561             : 
    3562             : SWIGINTERN int
    3563       56612 : SWIG_AsVal_unsigned_SS_int (PyObject * obj, unsigned int *val)
    3564             : {
    3565       56612 :   unsigned long v;
    3566      113224 :   int res = SWIG_AsVal_unsigned_SS_long (obj, &v);
    3567       56612 :   if (SWIG_IsOK(res)) {
    3568       56612 :     if ((v > UINT_MAX)) {
    3569             :       return SWIG_OverflowError;
    3570             :     } else {
    3571       56612 :       if (val) *val = static_cast< unsigned int >(v);
    3572             :     }
    3573             :   }  
    3574             :   return res;
    3575             : }
    3576             : 
    3577             : 
    3578             : SWIGINTERNINLINE PyObject*
    3579       26564 :   SWIG_From_unsigned_SS_int  (unsigned int value)
    3580             : {
    3581       26564 :   return PyInt_FromSize_t((size_t) value);
    3582             : }
    3583             : 
    3584             : 
    3585           2 : void wrapper_VSIGetMemFileBuffer(const char *utf8_path, GByte **out, vsi_l_offset *length)
    3586             : {
    3587           2 :     *out = VSIGetMemFileBuffer(utf8_path, length, 0);
    3588           2 : }
    3589             : 
    3590             : 
    3591             : SWIGINTERN swig_type_info*
    3592        7425 : SWIG_pchar_descriptor(void)
    3593             : {
    3594        7425 :   static int init = 0;
    3595        7425 :   static swig_type_info* info = 0;
    3596        7425 :   if (!init) {
    3597          36 :     info = SWIG_TypeQuery("_p_char");
    3598          36 :     init = 1;
    3599             :   }
    3600        7425 :   return info;
    3601             : }
    3602             : 
    3603             : 
    3604             : SWIGINTERN int
    3605      542950 : SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
    3606             : {
    3607             : #if PY_VERSION_HEX>=0x03000000
    3608             : #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
    3609             :   if (PyBytes_Check(obj))
    3610             : #else
    3611      542950 :   if (PyUnicode_Check(obj))
    3612             : #endif
    3613             : #else  
    3614             :   if (PyString_Check(obj))
    3615             : #endif
    3616             :   {
    3617      535525 :     char *cstr; Py_ssize_t len;
    3618      535525 :     int ret = SWIG_OK;
    3619             : #if PY_VERSION_HEX>=0x03000000
    3620             : #if !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
    3621      535525 :     if (!alloc && cptr) {
    3622             :         /* We can't allow converting without allocation, since the internal
    3623             :            representation of string in Python 3 is UCS-2/UCS-4 but we require
    3624             :            a UTF-8 representation.
    3625             :            TODO(bhy) More detailed explanation */
    3626             :         return SWIG_RuntimeError;
    3627             :     }
    3628      535525 :     obj = PyUnicode_AsUTF8String(obj); if (!obj) return SWIG_TypeError;
    3629      535525 :     if (!obj)
    3630             :       return SWIG_TypeError;
    3631      535525 :     if (alloc)
    3632      535393 :       *alloc = SWIG_NEWOBJ;
    3633             : #endif
    3634      535525 :     PyBytes_AsStringAndSize(obj, &cstr, &len);
    3635             : #else
    3636             :     PyString_AsStringAndSize(obj, &cstr, &len);
    3637             : #endif
    3638      535525 :     if (cptr) {
    3639      535393 :       if (alloc) {
    3640      535393 :   if (*alloc == SWIG_NEWOBJ) {
    3641      535393 :     *cptr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1)));
    3642      535393 :     *alloc = SWIG_NEWOBJ;
    3643             :   } else {
    3644           0 :     *cptr = cstr;
    3645           0 :     *alloc = SWIG_OLDOBJ;
    3646             :   }
    3647             :       } else {
    3648             : #if PY_VERSION_HEX>=0x03000000
    3649             : #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
    3650             :   *cptr = PyBytes_AsString(obj);
    3651             : #else
    3652             :   assert(0); /* Should never reach here with Unicode strings in Python 3 */
    3653             : #endif
    3654             : #else
    3655             :   *cptr = SWIG_Python_str_AsChar(obj);
    3656             :         if (!*cptr)
    3657             :           ret = SWIG_TypeError;
    3658             : #endif
    3659             :       }
    3660             :     }
    3661      535525 :     if (psize) *psize = len + 1;
    3662             : #if PY_VERSION_HEX>=0x03000000 && !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
    3663      535525 :     Py_XDECREF(obj);
    3664             : #endif
    3665      535525 :     return ret;
    3666             :   } else {
    3667             : #if defined(SWIG_PYTHON_2_UNICODE)
    3668             : #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
    3669             : #error "Cannot use both SWIG_PYTHON_2_UNICODE and SWIG_PYTHON_STRICT_BYTE_CHAR at once"
    3670             : #endif
    3671             : #if PY_VERSION_HEX<0x03000000
    3672             :     if (PyUnicode_Check(obj)) {
    3673             :       char *cstr; Py_ssize_t len;
    3674             :       if (!alloc && cptr) {
    3675             :         return SWIG_RuntimeError;
    3676             :       }
    3677             :       obj = PyUnicode_AsUTF8String(obj); if (!obj) return SWIG_TypeError;
    3678             :       if (!obj)
    3679             :         return SWIG_TypeError;
    3680             :       if (PyString_AsStringAndSize(obj, &cstr, &len) != -1) {
    3681             :         if (cptr) {
    3682             :           if (alloc) *alloc = SWIG_NEWOBJ;
    3683             :           *cptr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1)));
    3684             :         }
    3685             :         if (psize) *psize = len + 1;
    3686             : 
    3687             :         Py_XDECREF(obj);
    3688             :         return SWIG_OK;
    3689             :       } else {
    3690             :         Py_XDECREF(obj);
    3691             :       }
    3692             :     }
    3693             : #endif
    3694             : #endif
    3695             : 
    3696        7425 :     swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
    3697        7425 :     if (pchar_descriptor) {
    3698        7425 :       void* vptr = 0;
    3699        7425 :       if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
    3700        7111 :   if (cptr) *cptr = (char *) vptr;
    3701        7111 :   if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0;
    3702        7111 :   if (alloc) *alloc = SWIG_OLDOBJ;
    3703        7111 :   return SWIG_OK;
    3704             :       }
    3705             :     }
    3706             :   }
    3707             :   return SWIG_TypeError;
    3708             : }
    3709             : 
    3710             : 
    3711             : 
    3712             : 
    3713             : 
    3714             : 
    3715             : typedef struct {
    3716             :     PyObject *psPyCallback;
    3717             :     PyObject *psPyCallbackData;
    3718             :     int nLastReported;
    3719             : } PyProgressData;
    3720             : 
    3721             : /************************************************************************/
    3722             : /*                          PyProgressProxy()                           */
    3723             : /************************************************************************/
    3724             : 
    3725             : 
    3726             : static int CPL_STDCALL
    3727             : PyProgressProxy( double dfComplete, const char *pszMessage, void *pData ) CPL_UNUSED;
    3728             : 
    3729             : static int CPL_STDCALL
    3730        2173 : PyProgressProxy( double dfComplete, const char *pszMessage, void *pData )
    3731             : 
    3732             : {
    3733        2173 :     PyProgressData *psInfo = (PyProgressData *) pData;
    3734        2173 :     PyObject *psArgs, *psResult;
    3735        2173 :     int      bContinue = TRUE;
    3736             : 
    3737        2173 :     if( dfComplete > 0 && psInfo->nLastReported == (int) (100.0 * dfComplete) )
    3738             :         return TRUE;
    3739             : 
    3740        1632 :     if( psInfo->psPyCallback == NULL || psInfo->psPyCallback == Py_None )
    3741             :         return TRUE;
    3742             : 
    3743        1632 :     psInfo->nLastReported = (int) (100.0 * dfComplete);
    3744             : 
    3745        1632 :     if( pszMessage == NULL )
    3746         483 :         pszMessage = "";
    3747             : 
    3748        3805 :     SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    3749             : 
    3750        1632 :     if( psInfo->psPyCallbackData == NULL )
    3751         938 :         psArgs = Py_BuildValue("(dsO)", dfComplete, pszMessage, Py_None );
    3752             :     else
    3753         694 :         psArgs = Py_BuildValue("(dsO)", dfComplete, pszMessage,
    3754             :                          psInfo->psPyCallbackData );
    3755             : 
    3756        1632 :     psResult = PyObject_CallObject( psInfo->psPyCallback, psArgs);
    3757        1632 :     Py_XDECREF(psArgs);
    3758             : 
    3759        1632 :     if( PyErr_Occurred() != NULL )
    3760             :     {
    3761           1 :         PyErr_Print();
    3762           1 :         PyErr_Clear();
    3763           1 :         SWIG_PYTHON_THREAD_END_BLOCK;
    3764             :         return FALSE;
    3765             :     }
    3766             : 
    3767        1631 :     if( psResult == NULL )
    3768             :     {
    3769           0 :         SWIG_PYTHON_THREAD_END_BLOCK;
    3770             :         return TRUE;
    3771             :     }
    3772             : 
    3773        1631 :     if( psResult == Py_None )
    3774             :     {
    3775           8 :         SWIG_PYTHON_THREAD_END_BLOCK;
    3776             :         return TRUE;
    3777             :     }
    3778             : 
    3779        1623 :     if( !PyArg_Parse( psResult, "i", &bContinue ) )
    3780             :     {
    3781           1 :         PyErr_Clear();
    3782           1 :         CPLError(CE_Failure, CPLE_AppDefined, "bad progress return value");
    3783           1 :         Py_XDECREF(psResult);
    3784           1 :         SWIG_PYTHON_THREAD_END_BLOCK;
    3785             :         return FALSE;
    3786             :     }
    3787             : 
    3788        1622 :     Py_XDECREF(psResult);
    3789        1622 :     SWIG_PYTHON_THREAD_END_BLOCK;
    3790             : 
    3791        1622 :     return bContinue;
    3792             : }
    3793             : 
    3794             : 
    3795             : typedef char retStringAndCPLFree;
    3796             : 
    3797             : 
    3798         122 :   void Debug( const char *msg_class, const char *message ) {
    3799         122 :     CPLDebug( msg_class, "%s", message );
    3800         122 :   }
    3801             : 
    3802             : 
    3803           6 :   CPLErr SetErrorHandler( CPLErrorHandler pfnErrorHandler = NULL, void* user_data = NULL )
    3804             :   {
    3805           6 :     if( pfnErrorHandler == NULL )
    3806             :     {
    3807           0 :         pfnErrorHandler = CPLDefaultErrorHandler;
    3808             :     }
    3809             : 
    3810           6 :     CPLSetErrorHandlerEx( pfnErrorHandler, user_data );
    3811             : 
    3812           6 :     return CE_None;
    3813             :   }
    3814             : 
    3815             : 
    3816             : extern "C" int CPL_DLL GDALIsInGlobalDestructor();
    3817             : 
    3818         289 : void CPL_STDCALL PyCPLErrorHandler(CPLErr eErrClass, CPLErrorNum err_no, const char* pszErrorMsg)
    3819             : {
    3820         289 :     if( GDALIsInGlobalDestructor() )
    3821             :     {
    3822             :         // this is typically during Python interpreter shutdown, and ends up in a crash
    3823             :         // because error handling tries to do thread initialization.
    3824           0 :         return;
    3825             :     }
    3826             : 
    3827         289 :     void* user_data = CPLGetErrorHandlerUserData();
    3828         289 :     PyObject *psArgs;
    3829             : 
    3830         578 :     SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    3831             : 
    3832         289 :     psArgs = Py_BuildValue("(iis)", eErrClass, err_no, pszErrorMsg );
    3833         289 :     PyObject_CallObject( (PyObject*)user_data, psArgs);
    3834         289 :     Py_XDECREF(psArgs);
    3835             : 
    3836         289 :     SWIG_PYTHON_THREAD_END_BLOCK;
    3837             : }
    3838             : 
    3839             : 
    3840       28421 :   CPLErr PushErrorHandler( CPLErrorHandler pfnErrorHandler = NULL, void* user_data = NULL )
    3841             :   {
    3842       28421 :     if( pfnErrorHandler == NULL )
    3843          71 :         CPLPushErrorHandler(CPLQuietErrorHandler);
    3844             :     else
    3845       28350 :         CPLPushErrorHandlerEx(pfnErrorHandler, user_data);
    3846       28421 :     return CE_None;
    3847             :   }
    3848             : 
    3849             : 
    3850       28416 :   void PopErrorHandler()
    3851             :   {
    3852       28416 :      void* user_data = CPLGetErrorHandlerUserData();
    3853       28416 :      if( user_data != NULL )
    3854             :      {
    3855          77 :          Py_XDECREF((PyObject*)user_data);
    3856             :      }
    3857       28416 :      CPLPopErrorHandler();
    3858       28416 :   }
    3859             : 
    3860             : 
    3861          21 :   void Error( CPLErr msg_class = CE_Failure, int err_code = 0, const char* msg = "error" ) {
    3862          21 :     CPLError( msg_class, err_code, "%s", msg );
    3863          21 :   }
    3864             : 
    3865             : 
    3866         167 : retStringAndCPLFree* wrapper_EscapeString(int len, char *bin_string , int scheme=CPLES_SQL) {
    3867         167 :     return CPLEscapeString(bin_string, len, scheme);
    3868             : }
    3869             : 
    3870             : 
    3871             : static bool
    3872      341362 : GetBufferAsCharPtrIntSize( PyObject* input, int *nLen, char **pBuf, int *alloc, bool *viewIsValid, Py_buffer *view ) {
    3873      341362 :   {
    3874      341362 :     if (PyObject_GetBuffer(input, view, PyBUF_SIMPLE) == 0)
    3875             :     {
    3876         933 :       if( view->len > INT_MAX ) {
    3877           0 :         PyBuffer_Release(view);
    3878           0 :         PyErr_SetString(PyExc_RuntimeError, "too large buffer (>2GB)" );
    3879           0 :         return false;
    3880             :       }
    3881         933 :       *viewIsValid = true;
    3882         933 :       *nLen = (int) view->len;
    3883         933 :       *pBuf = (char*) view->buf;
    3884         933 :       return true;
    3885             :     }
    3886             :     else
    3887             :     {
    3888      340429 :       PyErr_Clear();
    3889             :     }
    3890             :   }
    3891      340429 :   if (PyUnicode_Check(input))
    3892             :   {
    3893      340429 :     size_t safeLen = 0;
    3894      340429 :     int ret;
    3895      340429 :     try {
    3896      340429 :       ret = SWIG_AsCharPtrAndSize(input, pBuf, &safeLen, alloc);
    3897             :     }
    3898           0 :     catch( const std::exception& )
    3899             :     {
    3900           0 :       PyErr_SetString(PyExc_MemoryError, "out of memory");
    3901           0 :       return false;
    3902             :     }
    3903      340429 :     if (!SWIG_IsOK(ret)) {
    3904           0 :       PyErr_SetString(PyExc_RuntimeError, "invalid Unicode string" );
    3905           0 :       return false;
    3906             :     }
    3907             : 
    3908      340429 :     if (safeLen) safeLen--;
    3909      340429 :     if( safeLen > INT_MAX ) {
    3910           0 :       PyErr_SetString(PyExc_RuntimeError, "too large buffer (>2GB)" );
    3911           0 :       return false;
    3912             :     }
    3913      340429 :     *nLen = (int) safeLen;
    3914      340429 :     return true;
    3915             :   }
    3916             :   else
    3917             :   {
    3918           0 :     PyErr_SetString(PyExc_RuntimeError, "not a unicode string, bytes, bytearray or memoryview");
    3919           0 :     return false;
    3920             :   }
    3921             : }
    3922             : 
    3923             : 
    3924          81 : void EscapeBinary(int len, char *bin_string, size_t *pnLenOut, char** pOut, int scheme=CPLES_SQL) {
    3925          81 :     *pOut = CPLEscapeString(bin_string, len, scheme);
    3926          81 :     *pnLenOut = *pOut ? strlen(*pOut) : 0;
    3927          81 : }
    3928             : 
    3929             : 
    3930             : SWIGINTERNINLINE PyObject *
    3931      196233 : SWIG_FromCharPtrAndSize(const char* carray, size_t size)
    3932             : {
    3933      196233 :   if (carray) {
    3934      145151 :     if (size > INT_MAX) {
    3935           0 :       swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
    3936           0 :       return pchar_descriptor ? 
    3937           0 :   SWIG_InternalNewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : SWIG_Py_Void();
    3938             :     } else {
    3939             : #if PY_VERSION_HEX >= 0x03000000
    3940             : #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
    3941             :       return PyBytes_FromStringAndSize(carray, static_cast< Py_ssize_t >(size));
    3942             : #else
    3943      145151 :       return PyUnicode_DecodeUTF8(carray, static_cast< Py_ssize_t >(size), "surrogateescape");
    3944             : #endif
    3945             : #else
    3946             :       return PyString_FromStringAndSize(carray, static_cast< Py_ssize_t >(size));
    3947             : #endif
    3948             :     }
    3949             :   } else {
    3950       51082 :     return SWIG_Py_Void();
    3951             :   }
    3952             : }
    3953             : 
    3954             : 
    3955             : SWIGINTERNINLINE PyObject * 
    3956      196233 : SWIG_FromCharPtr(const char *cptr)
    3957             : { 
    3958      196233 :   return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
    3959             : }
    3960             : 
    3961             : 
    3962        3064 : char **wrapper_VSIReadDirEx( const char * utf8_path, int nMaxFiles = 0 )
    3963             : {
    3964        3064 :     return VSIReadDirEx(utf8_path, nMaxFiles);
    3965             : }
    3966             : 
    3967             : 
    3968        6887 : static PyObject* CSLToList( char** stringarray, bool *pbErr )
    3969             : {
    3970        6887 :   PyObject* res;
    3971        6887 :   if ( stringarray == NULL ) {
    3972        3542 :     res = Py_None;
    3973        3542 :     Py_INCREF( res );
    3974             :   }
    3975             :   else {
    3976        3345 :     int len = CSLCount( stringarray );
    3977        3345 :     res = PyList_New( len );
    3978        3345 :     if( !res ) {
    3979           0 :       *pbErr = true;
    3980           0 :       return res;
    3981             :     }
    3982       22117 :     for ( int i = 0; i < len; ++i ) {
    3983       18772 :       PyObject *o = GDALPythonObjectFromCStr( stringarray[i] );
    3984       18772 :       PyList_SetItem(res, i, o );
    3985             :     }
    3986             :   }
    3987        6887 :   *pbErr = false;
    3988        6887 :   return res;
    3989             : }
    3990             : 
    3991             : 
    3992          31 : VSIDIR* wrapper_VSIOpenDir( const char * utf8_path,
    3993             :                             int nRecurseDepth = -1,
    3994             :                             char** options = NULL )
    3995             : {
    3996          31 :     return VSIOpenDir(utf8_path, nRecurseDepth, options);
    3997             : }
    3998             : 
    3999             : 
    4000             : /************************************************************************/
    4001             : /*                         CSLFromPySequence()                          */
    4002             : /************************************************************************/
    4003       12206 : static char **CSLFromPySequence( PyObject *pySeq, int *pbErr )
    4004             : 
    4005             : {
    4006       12206 :   *pbErr = FALSE;
    4007             :   /* Check if is a list (and reject strings, that are seen as sequence of characters)  */
    4008       12206 :   if ( ! PySequence_Check(pySeq) || PyUnicode_Check(pySeq) ) {
    4009           0 :     PyErr_SetString(PyExc_TypeError,"not a sequence");
    4010           0 :     *pbErr = TRUE;
    4011           0 :     return NULL;
    4012             :   }
    4013             : 
    4014       12206 :   Py_ssize_t size = PySequence_Size(pySeq);
    4015       12206 :   if( size > (Py_ssize_t)(INT_MAX - 1) ) {
    4016           0 :     PyErr_SetString(PyExc_TypeError, "too big sequence");
    4017           0 :     *pbErr = TRUE;
    4018           0 :     return NULL;
    4019             :   }
    4020       12206 :   if( size == 0 ) {
    4021             :     return NULL;
    4022             :   }
    4023        8286 :   char** papszRet = (char**) VSICalloc((int)size + 1, sizeof(char*));
    4024        8286 :   if( !papszRet ) {
    4025           0 :     PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
    4026           0 :     *pbErr = TRUE;
    4027           0 :     return NULL;
    4028             :   }
    4029       97714 :   for (int i = 0; i < (int)size; i++) {
    4030       89429 :     PyObject* pyObj = PySequence_GetItem(pySeq,i);
    4031       89429 :     if (PyUnicode_Check(pyObj))
    4032             :     {
    4033       89425 :       char *pszStr;
    4034       89425 :       Py_ssize_t nLen;
    4035       89425 :       PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
    4036       89425 :       if( !pyUTF8Str )
    4037             :       {
    4038           0 :         Py_DECREF(pyObj);
    4039           0 :         PyErr_SetString(PyExc_TypeError,"invalid Unicode sequence");
    4040           0 :         CSLDestroy(papszRet);
    4041           0 :         *pbErr = TRUE;
    4042           0 :         return NULL;
    4043             :       }
    4044       89425 :       PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
    4045       89425 :       papszRet[i] = VSIStrdup(pszStr);
    4046      177024 :       Py_XDECREF(pyUTF8Str);
    4047             :     }
    4048           4 :     else if (PyBytes_Check(pyObj))
    4049           3 :       papszRet[i] = VSIStrdup(PyBytes_AsString(pyObj));
    4050             :     else
    4051             :     {
    4052           1 :         Py_DECREF(pyObj);
    4053           1 :         PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
    4054           1 :         CSLDestroy(papszRet);
    4055           1 :         *pbErr = TRUE;
    4056           1 :         return NULL;
    4057             :     }
    4058       89428 :     Py_DECREF(pyObj);
    4059       89428 :     if( !papszRet[i] )
    4060             :     {
    4061           0 :         PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
    4062           0 :         CSLDestroy(papszRet);
    4063           0 :         *pbErr = TRUE;
    4064           0 :         return NULL;
    4065             :     }
    4066             :   }
    4067             :   return papszRet;
    4068             : }
    4069             : 
    4070             : 
    4071         392 : static char **CSLFromPyMapping( PyObject *pyObj, int *pbErr )
    4072             : 
    4073             : {
    4074         392 :     char** retCSL = NULL;
    4075         392 :     Py_ssize_t size = PyMapping_Length( pyObj );
    4076         392 :     if ( size > 0 && size == (int)size) {
    4077         226 :       PyObject *item_list = PyMapping_Items( pyObj );
    4078        1111 :       for( int i=0; i<(int)size; i++ ) {
    4079         888 :         PyObject *it = PySequence_GetItem( item_list, i );
    4080             : 
    4081         888 :         PyObject *k, *v;
    4082         888 :         if ( ! PyArg_ParseTuple( it, "OO", &k, &v ) ) {
    4083           0 :           Py_DECREF(it);
    4084           0 :           Py_DECREF(item_list);
    4085           0 :           PyErr_SetString(PyExc_TypeError,"Cannot retrieve key/value");
    4086           0 :           CSLDestroy(retCSL);
    4087           0 :           *pbErr = TRUE;
    4088           3 :           return NULL;
    4089             :         }
    4090             : 
    4091         888 :         PyObject* kStr = PyObject_Str(k);
    4092         888 :         if( PyErr_Occurred() )
    4093             :         {
    4094           1 :             Py_DECREF(it);
    4095           1 :             Py_DECREF(item_list);
    4096           1 :             CSLDestroy(retCSL);
    4097           1 :             *pbErr = TRUE;
    4098           1 :             return NULL;
    4099             :         }
    4100             : 
    4101         887 :         PyObject* vStr;
    4102         887 :         if( PyBytes_Check(v) )
    4103             :         {
    4104           2 :             vStr = v;
    4105           2 :             Py_INCREF(vStr);
    4106             :         }
    4107             :         else
    4108             :         {
    4109         885 :             vStr = PyObject_Str(v);
    4110         885 :             if( PyErr_Occurred() )
    4111             :             {
    4112           1 :                 Py_DECREF(it);
    4113           1 :                 Py_DECREF(kStr);
    4114           1 :                 Py_DECREF(item_list);
    4115           1 :                 CSLDestroy(retCSL);
    4116           1 :                 *pbErr = TRUE;
    4117           1 :                 return NULL;
    4118             :             }
    4119             :         }
    4120             : 
    4121         886 :         int bFreeK, bFreeV;
    4122         886 :         char* pszK = GDALPythonObjectToCStr(kStr, &bFreeK);
    4123         886 :         char* pszV = GDALPythonObjectToCStr(vStr, &bFreeV);
    4124         886 :         if( pszK == NULL || pszV == NULL )
    4125             :         {
    4126           1 :             GDALPythonFreeCStr(pszK, bFreeK);
    4127           1 :             GDALPythonFreeCStr(pszV, bFreeV);
    4128           1 :             Py_DECREF(kStr);
    4129           1 :             Py_DECREF(vStr);
    4130           1 :             Py_DECREF(it);
    4131           1 :             Py_DECREF(item_list);
    4132           1 :             PyErr_SetString(PyExc_TypeError,"Cannot get key/value as string");
    4133           1 :             CSLDestroy(retCSL);
    4134           1 :             *pbErr = TRUE;
    4135           1 :             return NULL;
    4136             :         }
    4137         885 :         retCSL = CSLAddNameValue( retCSL, pszK, pszV );
    4138             : 
    4139         885 :         GDALPythonFreeCStr(pszK, bFreeK);
    4140         885 :         GDALPythonFreeCStr(pszV, bFreeV);
    4141         885 :         Py_DECREF(kStr);
    4142         885 :         Py_DECREF(vStr);
    4143         885 :         Py_DECREF(it);
    4144             :       }
    4145         223 :       Py_DECREF(item_list);
    4146             :     }
    4147         389 :     *pbErr = FALSE;
    4148         389 :     return retCSL;
    4149             : }
    4150             : 
    4151             : 
    4152             : typedef struct
    4153             : {
    4154             :     char*        name;
    4155             :     int          mode;
    4156             :     GIntBig      size;
    4157             :     GIntBig      mtime;
    4158             :     bool         modeKnown;
    4159             :     bool         sizeKnown;
    4160             :     bool         mtimeKnown;
    4161             :     char**       extra;
    4162             : } DirEntry;
    4163             : 
    4164             : 
    4165             : SWIGINTERNINLINE PyObject*
    4166         577 :   SWIG_From_bool  (bool value)
    4167             : {
    4168         577 :   return PyBool_FromLong(value ? 1 : 0);
    4169             : }
    4170             : 
    4171             : 
    4172             : /* Return a PyObject* from a C String */
    4173       81045 : static PyObject* GDALPythonObjectFromCStrAndSize(const char *pszStr, size_t nLen)
    4174             : {
    4175       81045 :   const unsigned char* pszIter = (const unsigned char*) pszStr;
    4176     1417840 :   for( size_t i = 0; i < nLen; ++i)
    4177             :   {
    4178     1336800 :     if (pszIter[i] > 127)
    4179             :     {
    4180           3 :         PyObject* pyObj = PyUnicode_DecodeUTF8(pszStr, nLen, "strict");
    4181           3 :         if (pyObj != NULL && !PyErr_Occurred())
    4182             :             return pyObj;
    4183           0 :         PyErr_Clear();
    4184           0 :         return PyBytes_FromStringAndSize(pszStr, nLen);
    4185             :     }
    4186             :   }
    4187       81042 :   return PyUnicode_FromStringAndSize(pszStr, nLen);
    4188             : }
    4189             : 
    4190             : 
    4191             : static PyObject*
    4192        6846 : GetCSLStringAsPyDict( char **stringarray, bool bFreeCSL ) {
    4193        6846 :   PyObject* dict = PyDict_New();
    4194        6846 :   if ( stringarray != NULL ) {
    4195       87712 :     for (char** iter = stringarray; *iter; ++iter ) {
    4196       81382 :       const char* pszSep = strchr( *iter, '=' );
    4197       81382 :       if ( pszSep != NULL) {
    4198       81045 :         const char* keyptr = *iter;
    4199       81045 :         const char* valptr = pszSep + 1;
    4200       81045 :         PyObject *nm = GDALPythonObjectFromCStrAndSize( keyptr, (size_t)(pszSep - keyptr) );
    4201       81045 :         PyObject *val = GDALPythonObjectFromCStr( valptr );
    4202       81045 :         PyDict_SetItem(dict, nm, val );
    4203       81045 :         Py_DECREF(nm);
    4204       81382 :         Py_DECREF(val);
    4205             :       }
    4206             :     }
    4207             :   }
    4208        6846 :   if( bFreeCSL )
    4209          31 :     CSLDestroy(stringarray);
    4210        6846 :   return dict;
    4211             : }
    4212             : 
    4213           0 : SWIGINTERN DirEntry *new_DirEntry(DirEntry const *entryIn){
    4214           0 :     DirEntry *self = (DirEntry*) CPLMalloc( sizeof( DirEntry ) );
    4215           0 :     self->name = CPLStrdup(entryIn->name);
    4216           0 :     self->mode = entryIn->mode;
    4217           0 :     self->size = entryIn->size;
    4218           0 :     self->mtime = entryIn->mtime;
    4219           0 :     self->modeKnown = entryIn->modeKnown;
    4220           0 :     self->sizeKnown = entryIn->sizeKnown;
    4221           0 :     self->mtimeKnown = entryIn->mtimeKnown;
    4222           0 :     self->extra = CSLDuplicate(entryIn->extra);
    4223           0 :     return self;
    4224             :   }
    4225          71 : SWIGINTERN void delete_DirEntry(DirEntry *self){
    4226          71 :     CPLFree(self->name);
    4227          71 :     CSLDestroy(self->extra);
    4228          71 :     CPLFree(self);
    4229          71 :   }
    4230           0 : SWIGINTERN bool DirEntry_IsDirectory(DirEntry *self){
    4231           0 :      return (self->mode & S_IFDIR) != 0;
    4232             :   }
    4233             : 
    4234         100 : DirEntry* wrapper_VSIGetNextDirEntry(VSIDIR* dir)
    4235             : {
    4236         100 :     const VSIDIREntry* vsiEntry = VSIGetNextDirEntry(dir);
    4237         100 :     if( vsiEntry == nullptr )
    4238             :     {
    4239             :         return nullptr;
    4240             :     }
    4241          71 :     DirEntry* entry = (DirEntry*) CPLMalloc( sizeof( DirEntry ) );
    4242          71 :     entry->name = CPLStrdup(vsiEntry->pszName);
    4243          71 :     entry->mode = vsiEntry->nMode;
    4244          71 :     entry->size = vsiEntry->nSize;
    4245          71 :     entry->mtime = vsiEntry->nMTime;
    4246          71 :     entry->modeKnown = vsiEntry->bModeKnown == TRUE;
    4247          71 :     entry->sizeKnown = vsiEntry->bSizeKnown == TRUE;
    4248          71 :     entry->mtimeKnown = vsiEntry->bMTimeKnown == TRUE;
    4249          71 :     entry->extra = CSLDuplicate(vsiEntry->papszExtra);
    4250          71 :     return entry;
    4251             : }
    4252             : 
    4253             : 
    4254       15819 : const char *wrapper_CPLGetConfigOption( const char * pszKey, const char * pszDefault = NULL )
    4255             : {
    4256       15819 :     return CPLGetConfigOption( pszKey, pszDefault );
    4257             : }
    4258        1512 : const char *wrapper_CPLGetGlobalConfigOption( const char * pszKey, const char * pszDefault = NULL )
    4259             : {
    4260        1512 :     return CPLGetGlobalConfigOption( pszKey, pszDefault );
    4261             : }
    4262        2529 : const char *wrapper_CPLGetThreadLocalConfigOption( const char * pszKey, const char * pszDefault = NULL )
    4263             : {
    4264        2529 :     return CPLGetThreadLocalConfigOption( pszKey, pszDefault );
    4265             : }
    4266             : 
    4267             : 
    4268           6 : char** wrapper_GetConfigOptions() {
    4269           6 :     char ** papszOpts = CPLGetConfigOptions();
    4270           6 :     char ** papszTLOpts = CPLGetThreadLocalConfigOptions();
    4271             : 
    4272           6 :     papszOpts = CSLMerge(papszOpts, papszTLOpts);
    4273             : 
    4274           6 :     CPLFree(papszTLOpts);
    4275             : 
    4276           6 :     return papszOpts;
    4277             : };
    4278             : 
    4279             : 
    4280          57 : void wrapper_VSISetCredential( const char* pszPathPrefix, const char * pszKey, const char * pszValue )
    4281             : {
    4282          57 :     VSISetPathSpecificOption(pszPathPrefix, pszKey, pszValue);
    4283          57 : }
    4284             : 
    4285           0 : const char *wrapper_VSIGetCredential( const char* pszPathPrefix, const char * pszKey, const char * pszDefault = NULL )
    4286             : {
    4287           0 :     return VSIGetPathSpecificOption( pszPathPrefix, pszKey, pszDefault );
    4288             : }
    4289             : 
    4290          10 : const char *wrapper_VSIGetPathSpecificOption( const char* pszPathPrefix, const char * pszKey, const char * pszDefault = NULL )
    4291             : {
    4292          10 :     return VSIGetPathSpecificOption( pszPathPrefix, pszKey, pszDefault );
    4293             : }
    4294             : 
    4295             : 
    4296           8 : void wrapper_VSIClearCredentials(const char * pszPathPrefix = NULL)
    4297             : {
    4298           8 :     VSIClearPathSpecificOptions( pszPathPrefix );
    4299           8 : }
    4300           7 : void wrapper_VSIClearPathSpecificOptions(const char * pszPathPrefix = NULL)
    4301             : {
    4302           7 :     VSIClearPathSpecificOptions( pszPathPrefix );
    4303           7 : }
    4304             : 
    4305             : 
    4306        3246 : VSI_RETVAL wrapper_VSIFileFromMemBuffer( const char* utf8_path, GIntBig nBytes, const char *pabyData)
    4307             : {
    4308        3246 :     const size_t nSize = static_cast<size_t>(nBytes);
    4309        3246 :     void* pabyDataDup = VSIMalloc(nSize);
    4310        3246 :     if (pabyDataDup == NULL)
    4311             :             return -1;
    4312        3246 :     memcpy(pabyDataDup, pabyData, nSize);
    4313        3246 :     VSILFILE *fp = VSIFileFromMemBuffer(utf8_path, (GByte*) pabyDataDup, nSize, TRUE);
    4314             : 
    4315        3246 :     if (fp == NULL) {
    4316           1 :         VSIFree(pabyDataDup);
    4317           1 :         return -1;
    4318             :     } else {
    4319        3245 :         VSIFCloseL(fp);
    4320        3245 :         return 0;
    4321             :     }
    4322             : }
    4323             : 
    4324             : 
    4325             : static bool
    4326      185935 : GetBufferAsCharPtrGIntBigSize( PyObject* input, GIntBig *nLen, char **pBuf, int *alloc, bool *viewIsValid, Py_buffer *view ) {
    4327      185935 :   {
    4328      185935 :     if (PyObject_GetBuffer(input, view, PyBUF_SIMPLE) == 0)
    4329             :     {
    4330      176808 :       *viewIsValid = true;
    4331      176808 :       *nLen = view->len;
    4332      176808 :       *pBuf = (char*) view->buf;
    4333      176808 :       return true;
    4334             :     }
    4335             :     else
    4336             :     {
    4337        9127 :       PyErr_Clear();
    4338             :     }
    4339             :   }
    4340        9127 :   if (PyUnicode_Check(input))
    4341             :   {
    4342        9125 :     size_t safeLen = 0;
    4343        9125 :     int ret;
    4344        9125 :     try {
    4345        9125 :       ret = SWIG_AsCharPtrAndSize(input, pBuf, &safeLen, alloc);
    4346             :     }
    4347           0 :     catch( const std::exception& )
    4348             :     {
    4349           0 :       PyErr_SetString(PyExc_MemoryError, "out of memory");
    4350           0 :       return false;
    4351             :     }
    4352        9125 :     if (!SWIG_IsOK(ret)) {
    4353           0 :       PyErr_SetString(PyExc_RuntimeError, "invalid Unicode string" );
    4354           0 :       return false;
    4355             :     }
    4356             : 
    4357        9125 :     if (safeLen) safeLen--;
    4358        9125 :     *nLen = (GIntBig)safeLen;
    4359        9125 :     return true;
    4360             :   }
    4361             :   else
    4362             :   {
    4363           2 :     PyErr_SetString(PyExc_RuntimeError, "not a unicode string, bytes, bytearray or memoryview");
    4364           2 :     return false;
    4365             :   }
    4366             : }
    4367             : 
    4368             : 
    4369          10 : bool wrapper_VSIUnlinkBatch(char** files)
    4370             : {
    4371          10 :     int* success = VSIUnlinkBatch(files);
    4372          10 :     if( !success )
    4373             :         return false;
    4374          24 :     int bRet = true;
    4375          24 :     for( int i = 0; files && files[i]; i++ )
    4376             :     {
    4377          17 :         if( !success[i] ) {
    4378             :             bRet = false;
    4379             :             break;
    4380             :         }
    4381             :     }
    4382           8 :     VSIFree(success);
    4383           8 :     return bRet;
    4384             : }
    4385             : 
    4386             : 
    4387           0 : int wrapper_HasThreadSupport()
    4388             : {
    4389           0 :     return strcmp(CPLGetThreadingModel(), "stub") != 0;
    4390             : }
    4391             : 
    4392             : 
    4393          41 : bool wrapper_VSISync(const char* pszSource,
    4394             :                      const char* pszTarget,
    4395             :                      char** options = NULL,
    4396             :                      GDALProgressFunc callback=NULL,
    4397             :                      void* callback_data=NULL)
    4398             : {
    4399          41 :     return VSISync( pszSource, pszTarget, options, callback, callback_data, nullptr );
    4400             : }
    4401             : 
    4402             : 
    4403          15 : int wrapper_VSICopyFile(const char* pszSource,
    4404             :                         const char* pszTarget,
    4405             :                         VSILFILE* fpSource = NULL,
    4406             :                         GIntBig nSourceSize = -1,
    4407             :                         char** options = NULL,
    4408             :                         GDALProgressFunc callback=NULL,
    4409             :                         void* callback_data=NULL)
    4410             : {
    4411          15 :     return VSICopyFile(
    4412             :         pszSource, pszTarget, fpSource,
    4413             :         nSourceSize < 0 ? static_cast<vsi_l_offset>(-1) : static_cast<vsi_l_offset>(nSourceSize),
    4414          15 :         options, callback, callback_data );
    4415             : }
    4416             : 
    4417             : 
    4418          23 : retStringAndCPLFree* wrapper_VSIGetSignedURL(const char * utf8_path, char** options = NULL )
    4419             : {
    4420          23 :     return VSIGetSignedURL( utf8_path, options );
    4421             : }
    4422             : 
    4423             : 
    4424             : typedef struct
    4425             : {
    4426             :   int     mode;
    4427             :   GIntBig size;
    4428             :   GIntBig mtime;
    4429             : } StatBuf;
    4430             : 
    4431        4632 : SWIGINTERN StatBuf *new_StatBuf(StatBuf *psStatBuf){
    4432        9264 :     StatBuf *self = (StatBuf*) CPLMalloc( sizeof( StatBuf ) );
    4433        4632 :     self->mode = psStatBuf->mode;
    4434        4632 :     self->size = psStatBuf->size;
    4435        4632 :     self->mtime = psStatBuf->mtime;
    4436        4632 :     return self;
    4437             :   }
    4438        4632 : SWIGINTERN void delete_StatBuf(StatBuf *self){
    4439        4632 :     CPLFree(self);
    4440        4632 :   }
    4441        2358 : SWIGINTERN int StatBuf_IsDirectory(StatBuf *self){
    4442        2358 :      return (self->mode & S_IFDIR) != 0;
    4443             :   }
    4444             : 
    4445        5998 : int wrapper_VSIStatL( const char * utf8_path, StatBuf *psStatBufOut, int nFlags = 0 )
    4446             : {
    4447        5998 :     VSIStatBufL sStat;
    4448        5998 :     memset(&sStat, 0, sizeof(sStat));
    4449        5998 :     memset(psStatBufOut, 0, sizeof(StatBuf));
    4450        5998 :     int nRet = VSIStatExL(utf8_path, &sStat, nFlags);
    4451        5998 :     psStatBufOut->mode = sStat.st_mode;
    4452        5998 :     psStatBufOut->size = (GIntBig)sStat.st_size;
    4453        5998 :     psStatBufOut->mtime = (GIntBig)sStat.st_mtime;
    4454        5998 :     return nRet;
    4455             : }
    4456             : 
    4457             : 
    4458        4525 : VSILFILE   *wrapper_VSIFOpenL( const char *utf8_path, const char *pszMode )
    4459             : {
    4460        4525 :     if (!pszMode) /* would lead to segfault */
    4461           0 :         pszMode = "r";
    4462        4525 :     return VSIFOpenL( utf8_path, pszMode );
    4463             : }
    4464             : 
    4465             : 
    4466         193 : VSILFILE   *wrapper_VSIFOpenExL( const char *utf8_path, const char *pszMode, int bSetError = FALSE, char** options = NULL )
    4467             : {
    4468         193 :     if (!pszMode) /* would lead to segfault */
    4469           0 :         pszMode = "r";
    4470         193 :     return VSIFOpenEx2L( utf8_path, pszMode, bSetError, options );
    4471             : }
    4472             : 
    4473             : 
    4474      341114 : int wrapper_VSIFWriteL( int nLen, char *pBuf, int size, int memb, VSILFILE* fp)
    4475             : {
    4476      341114 :     if (nLen < static_cast<GIntBig>(size) * memb)
    4477             :     {
    4478           0 :         CPLError(CE_Failure, CPLE_AppDefined, "Inconsistent buffer size with 'size' and 'memb' values");
    4479           0 :         return 0;
    4480             :     }
    4481      341114 :     return static_cast<int>(VSIFWriteL(pBuf, size, memb, fp));
    4482             : }
    4483             : 
    4484        2063 : SWIGINTERN char const *GDALMajorObjectShadow_GetDescription(GDALMajorObjectShadow *self){
    4485        2063 :     return GDALGetDescription( self );
    4486             :   }
    4487          41 : SWIGINTERN void GDALMajorObjectShadow_SetDescription(GDALMajorObjectShadow *self,char const *pszNewDesc){
    4488          41 :     GDALSetDescription( self, pszNewDesc );
    4489          41 :   }
    4490          68 : SWIGINTERN char **GDALMajorObjectShadow_GetMetadataDomainList(GDALMajorObjectShadow *self){
    4491          68 :     return GDALGetMetadataDomainList( self );
    4492             :   }
    4493        6804 : SWIGINTERN char **GDALMajorObjectShadow_GetMetadata_Dict(GDALMajorObjectShadow *self,char const *pszDomain=""){
    4494        6804 :     return GDALGetMetadata( self, pszDomain );
    4495             :   }
    4496         395 : SWIGINTERN char **GDALMajorObjectShadow_GetMetadata_List(GDALMajorObjectShadow *self,char const *pszDomain=""){
    4497         395 :     return GDALGetMetadata( self, pszDomain );
    4498             :   }
    4499             : SWIGINTERN CPLErr GDALMajorObjectShadow_SetMetadata__SWIG_0(GDALMajorObjectShadow *self,char **papszMetadata,char const *pszDomain=""){
    4500             :     return GDALSetMetadata( self, papszMetadata, pszDomain );
    4501             :   }
    4502             : SWIGINTERN CPLErr GDALMajorObjectShadow_SetMetadata__SWIG_1(GDALMajorObjectShadow *self,char *pszMetadataString,char const *pszDomain=""){
    4503             :     char *tmpList[2];
    4504             :     tmpList[0] = pszMetadataString;
    4505             :     tmpList[1] = 0;
    4506             :     return GDALSetMetadata( self, tmpList, pszDomain );
    4507             :   }
    4508       56638 : SWIGINTERN char const *GDALMajorObjectShadow_GetMetadataItem(GDALMajorObjectShadow *self,char const *pszName,char const *pszDomain=""){
    4509       56638 :     return GDALGetMetadataItem( self, pszName, pszDomain);
    4510             :   }
    4511         441 : SWIGINTERN CPLErr GDALMajorObjectShadow_SetMetadataItem(GDALMajorObjectShadow *self,char const *pszName,char const *pszValue,char const *pszDomain=""){
    4512         441 :     return GDALSetMetadataItem( self, pszName, pszValue, pszDomain);
    4513             :   }
    4514       13646 : SWIGINTERN GDALDatasetShadow *GDALDriverShadow_Create(GDALDriverShadow *self,char const *utf8_path,int xsize,int ysize,int bands=1,GDALDataType eType=GDT_Byte,char **options=0){
    4515             : 
    4516       27292 :     GDALDatasetShadow* ds = (GDALDatasetShadow*) GDALCreate(    self,
    4517             :                                                                 utf8_path,
    4518             :                                                                 xsize,
    4519             :                                                                 ysize,
    4520             :                                                                 bands,
    4521             :                                                                 eType,
    4522             :                                                                 options );
    4523       13646 :     return ds;
    4524             :   }
    4525         412 : SWIGINTERN GDALDatasetShadow *GDALDriverShadow_CreateMultiDimensional(GDALDriverShadow *self,char const *utf8_path,char **root_group_options=0,char **options=0){
    4526             : 
    4527         824 :     GDALDatasetShadow* ds = (GDALDatasetShadow*) GDALCreateMultiDimensional(    self,
    4528             :                                                                 utf8_path,
    4529             :                                                                 root_group_options,
    4530             :                                                                 options );
    4531         412 :     return ds;
    4532             :   }
    4533        4254 : SWIGINTERN GDALDatasetShadow *GDALDriverShadow_CreateCopy(GDALDriverShadow *self,char const *utf8_path,GDALDatasetShadow *src,int strict=1,char **options=0,GDALProgressFunc callback=NULL,void *callback_data=NULL){
    4534             : 
    4535        8508 :     GDALDatasetShadow *ds = (GDALDatasetShadow*) GDALCreateCopy(    self,
    4536             :                                                                     utf8_path,
    4537             :                                                                     src,
    4538             :                                                                     strict,
    4539             :                                                                     options,
    4540             :                                                                     callback,
    4541             :                                                                     callback_data );
    4542        4254 :     return ds;
    4543             :   }
    4544        2570 : SWIGINTERN CPLErr GDALDriverShadow_Delete(GDALDriverShadow *self,char const *utf8_path){
    4545        2570 :     return GDALDeleteDataset( self, utf8_path );
    4546             :   }
    4547         173 : SWIGINTERN CPLErr GDALDriverShadow_Rename(GDALDriverShadow *self,char const *newName,char const *oldName){
    4548         173 :     return GDALRenameDataset( self, newName, oldName );
    4549             :   }
    4550           3 : SWIGINTERN CPLErr GDALDriverShadow_CopyFiles(GDALDriverShadow *self,char const *newName,char const *oldName){
    4551           3 :     return GDALCopyDatasetFiles( self, newName, oldName );
    4552             :   }
    4553           6 : SWIGINTERN bool GDALDriverShadow_TestCapability(GDALDriverShadow *self,char const *cap){
    4554             :     // TODO: should this also check DCAP entries in driver metadata?
    4555          12 :     return (OGR_Dr_TestCapability(self, cap) > 0);
    4556             :   }
    4557          91 : SWIGINTERN int GDALDriverShadow_Register(GDALDriverShadow *self){
    4558          91 :     return GDALRegisterDriver( self );
    4559             :   }
    4560          91 : SWIGINTERN void GDALDriverShadow_Deregister(GDALDriverShadow *self){
    4561          91 :     GDALDeregisterDriver( self );
    4562          91 :   }
    4563             : 
    4564      104889 : char const *GDALDriverShadow_ShortName_get( GDALDriverShadow *h ) {
    4565      104889 :   return GDALGetDriverShortName( h );
    4566             : }
    4567          17 : char const *GDALDriverShadow_LongName_get( GDALDriverShadow *h ) {
    4568          17 :   return GDALGetDriverLongName( h );
    4569             : }
    4570           0 : char const *GDALDriverShadow_HelpTopic_get( GDALDriverShadow *h ) {
    4571           0 :   return GDALGetDriverHelpTopic( h );
    4572             : }
    4573             : 
    4574             : 
    4575             : SWIGINTERN int
    4576           0 : SWIG_AsVal_short (PyObject * obj, short *val)
    4577             : {
    4578           0 :   long v;
    4579           0 :   int res = SWIG_AsVal_long (obj, &v);
    4580           0 :   if (SWIG_IsOK(res)) {
    4581           0 :     if ((v < SHRT_MIN || v > SHRT_MAX)) {
    4582             :       return SWIG_OverflowError;
    4583             :     } else {
    4584           0 :       if (val) *val = static_cast< short >(v);
    4585             :     }
    4586             :   }  
    4587             :   return res;
    4588             : }
    4589             : 
    4590             : 
    4591             :   #define SWIG_From_long   PyInt_FromLong 
    4592             : 
    4593             : 
    4594             : SWIGINTERNINLINE PyObject *
    4595           0 : SWIG_From_short  (short value)
    4596             : {    
    4597           0 :   return SWIG_From_long  (value);
    4598             : }
    4599             : 
    4600             : 
    4601             :   #define SWIG_From_double   PyFloat_FromDouble 
    4602             : 
    4603        2550 : SWIGINTERN GDAL_GCP *new_GDAL_GCP(double x=0.0,double y=0.0,double z=0.0,double pixel=0.0,double line=0.0,char const *info="",char const *id=""){
    4604             : 
    4605        2550 :     GDAL_GCP *self = (GDAL_GCP*) CPLMalloc( sizeof( GDAL_GCP ) );
    4606        2550 :     self->dfGCPX = x;
    4607        2550 :     self->dfGCPY = y;
    4608        2550 :     self->dfGCPZ = z;
    4609        2550 :     self->dfGCPPixel = pixel;
    4610        2550 :     self->dfGCPLine = line;
    4611        2550 :     self->pszInfo =  CPLStrdup( (info == 0) ? "" : info );
    4612        2550 :     self->pszId = CPLStrdup( (id==0)? "" : id );
    4613        2550 :     return self;
    4614             :   }
    4615        2550 : SWIGINTERN void delete_GDAL_GCP(GDAL_GCP *self){
    4616        2550 :     if ( self->pszInfo )
    4617        2550 :       CPLFree( self->pszInfo );
    4618        2550 :     if ( self->pszId )
    4619        2550 :       CPLFree( self->pszId );
    4620        2550 :     CPLFree( self );
    4621        2550 :   }
    4622             : 
    4623             : 
    4624        2206 : double GDAL_GCP_GCPX_get( GDAL_GCP *gcp ) {
    4625        2206 :   return gcp->dfGCPX;
    4626             : }
    4627          48 : void GDAL_GCP_GCPX_set( GDAL_GCP *gcp, double dfGCPX ) {
    4628          48 :   gcp->dfGCPX = dfGCPX;
    4629          48 : }
    4630        2206 : double GDAL_GCP_GCPY_get( GDAL_GCP *gcp ) {
    4631        2206 :   return gcp->dfGCPY;
    4632             : }
    4633          48 : void GDAL_GCP_GCPY_set( GDAL_GCP *gcp, double dfGCPY ) {
    4634          48 :   gcp->dfGCPY = dfGCPY;
    4635          48 : }
    4636          35 : double GDAL_GCP_GCPZ_get( GDAL_GCP *gcp ) {
    4637          35 :   return gcp->dfGCPZ;
    4638             : }
    4639           0 : void GDAL_GCP_GCPZ_set( GDAL_GCP *gcp, double dfGCPZ ) {
    4640           0 :   gcp->dfGCPZ = dfGCPZ;
    4641           0 : }
    4642        8555 : double GDAL_GCP_GCPPixel_get( GDAL_GCP *gcp ) {
    4643        8555 :   return gcp->dfGCPPixel;
    4644             : }
    4645          56 : void GDAL_GCP_GCPPixel_set( GDAL_GCP *gcp, double dfGCPPixel ) {
    4646          56 :   gcp->dfGCPPixel = dfGCPPixel;
    4647          56 : }
    4648        8555 : double GDAL_GCP_GCPLine_get( GDAL_GCP *gcp ) {
    4649        8555 :   return gcp->dfGCPLine;
    4650             : }
    4651          56 : void GDAL_GCP_GCPLine_set( GDAL_GCP *gcp, double dfGCPLine ) {
    4652          56 :   gcp->dfGCPLine = dfGCPLine;
    4653          56 : }
    4654           8 : const char * GDAL_GCP_Info_get( GDAL_GCP *gcp ) {
    4655           8 :   return gcp->pszInfo;
    4656             : }
    4657           1 : void GDAL_GCP_Info_set( GDAL_GCP *gcp, const char * pszInfo ) {
    4658           1 :   if ( gcp->pszInfo )
    4659           1 :     CPLFree( gcp->pszInfo );
    4660           1 :   gcp->pszInfo = CPLStrdup(pszInfo);
    4661           1 : }
    4662           8 : const char * GDAL_GCP_Id_get( GDAL_GCP *gcp ) {
    4663           8 :   return gcp->pszId;
    4664             : }
    4665           1 : void GDAL_GCP_Id_set( GDAL_GCP *gcp, const char * pszId ) {
    4666           1 :   if ( gcp->pszId )
    4667           1 :     CPLFree( gcp->pszId );
    4668           1 :   gcp->pszId = CPLStrdup(pszId);
    4669           1 : }
    4670             : 
    4671             : 
    4672             : #define t_output_helper SWIG_Python_AppendOutput
    4673             : 
    4674             : 
    4675             : static PyObject *
    4676       13517 : CreateTupleFromDoubleArray( const double *first, size_t size ) {
    4677       13517 :   PyObject *out = PyTuple_New( size );
    4678       63029 :   for( unsigned int i=0; i<size; i++ ) {
    4679       49512 :     PyObject *val = PyFloat_FromDouble( *first );
    4680       49512 :     ++first;
    4681       49512 :     PyTuple_SetItem( out, i, val );
    4682             :   }
    4683       13517 :   return out;
    4684             : }
    4685             : 
    4686             : 
    4687             : #include "gdal.h"
    4688             : 
    4689             : typedef struct
    4690             : {
    4691             :     CPLVirtualMem *vmem;
    4692             :     int            bAuto;
    4693             :     GDALDataType   eBufType;
    4694             :     int            bIsBandSequential;
    4695             :     int            bReadOnly;
    4696             :     int            nBufXSize;
    4697             :     int            nBufYSize;
    4698             :     int            nBandCount;
    4699             :     GDALTileOrganization eTileOrganization;
    4700             :     int                  nTileXSize;
    4701             :     int                  nTileYSize;
    4702             :     int            nPixelSpace; /* if bAuto == TRUE */
    4703             :     GIntBig        nLineSpace; /* if bAuto == TRUE */
    4704             : } CPLVirtualMemShadow;
    4705             : 
    4706             : 
    4707           0 : SWIGINTERN void delete_CPLVirtualMemShadow(CPLVirtualMemShadow *self){
    4708           0 :         CPLVirtualMemFree( self->vmem );
    4709           0 :         free(self);
    4710             :     }
    4711           0 : SWIGINTERN void CPLVirtualMemShadow_GetAddr(CPLVirtualMemShadow *self,void **pptr,size_t *pnsize,GDALDataType *pdatatype,int *preadonly){
    4712           0 :         *pptr = CPLVirtualMemGetAddr( self->vmem );
    4713           0 :         *pnsize = CPLVirtualMemGetSize( self->vmem );
    4714           0 :         *pdatatype = self->eBufType;
    4715           0 :         *preadonly = self->bReadOnly;
    4716             :     }
    4717             : 
    4718             : #if defined(LLONG_MAX) && !defined(SWIG_LONG_LONG_AVAILABLE)
    4719             : #  define SWIG_LONG_LONG_AVAILABLE
    4720             : #endif
    4721             : 
    4722             : 
    4723             : #ifdef SWIG_LONG_LONG_AVAILABLE
    4724             : SWIGINTERN int
    4725             : SWIG_AsVal_unsigned_SS_long_SS_long (PyObject *obj, unsigned long long *val)
    4726             : {
    4727             :   int res = SWIG_TypeError;
    4728             :   if (PyLong_Check(obj)) {
    4729             :     unsigned long long v = PyLong_AsUnsignedLongLong(obj);
    4730             :     if (!PyErr_Occurred()) {
    4731             :       if (val) *val = v;
    4732             :       return SWIG_OK;
    4733             :     } else {
    4734             :       PyErr_Clear();
    4735             :       res = SWIG_OverflowError;
    4736             :     }
    4737             :   } else {
    4738             :     unsigned long v;
    4739             :     res = SWIG_AsVal_unsigned_SS_long (obj,&v);
    4740             :     if (SWIG_IsOK(res)) {
    4741             :       if (val) *val = v;
    4742             :       return res;
    4743             :     }
    4744             :   }
    4745             : #ifdef SWIG_PYTHON_CAST_MODE
    4746             :   {
    4747             :     const double mant_max = 1LL << DBL_MANT_DIG;
    4748             :     double d;
    4749             :     res = SWIG_AsVal_double (obj,&d);
    4750             :     if (SWIG_IsOK(res) && !SWIG_CanCastAsInteger(&d, 0, mant_max))
    4751             :       return SWIG_OverflowError;
    4752             :     if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, mant_max)) {
    4753             :       if (val) *val = (unsigned long long)(d);
    4754             :       return SWIG_AddCast(res);
    4755             :     }
    4756             :     res = SWIG_TypeError;
    4757             :   }
    4758             : #endif
    4759             :   return res;
    4760             : }
    4761             : #endif
    4762             : 
    4763             : 
    4764             : SWIGINTERNINLINE int
    4765         178 : SWIG_AsVal_size_t (PyObject * obj, size_t *val)
    4766             : {
    4767         178 :   int res = SWIG_TypeError;
    4768             : #ifdef SWIG_LONG_LONG_AVAILABLE
    4769         178 :   if (sizeof(size_t) <= sizeof(unsigned long)) {
    4770             : #endif
    4771         178 :     unsigned long v;
    4772         356 :     res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0);
    4773         178 :     if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v);
    4774             : #ifdef SWIG_LONG_LONG_AVAILABLE
    4775             :   } else if (sizeof(size_t) <= sizeof(unsigned long long)) {
    4776             :     unsigned long long v;
    4777             :     res = SWIG_AsVal_unsigned_SS_long_SS_long (obj, val ? &v : 0);
    4778             :     if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v);
    4779             :   }
    4780             : #endif
    4781         178 :   return res;
    4782             : }
    4783             : 
    4784             : SWIGINTERN void CPLVirtualMemShadow_Pin(CPLVirtualMemShadow *self,size_t start_offset=0,size_t nsize=0,int bWriteOp=0){
    4785             :         if( nsize == 0 || start_offset + nsize >= CPLVirtualMemGetSize( self->vmem ) )
    4786             :             nsize = CPLVirtualMemGetSize( self->vmem ) - start_offset;
    4787             :         char* start_addr = (char*)CPLVirtualMemGetAddr( self->vmem ) + start_offset;
    4788             :         CPLVirtualMemPin(self->vmem, start_addr, nsize, bWriteOp);
    4789             :     }
    4790             : 
    4791             : /* Returned size is in bytes or 0 if an error occurred. */
    4792             : static
    4793      348704 : GIntBig ComputeDatasetRasterIOSize (int buf_xsize, int buf_ysize, int nPixelSize,
    4794             :                                 int nBands, int* bandMap, int nBandMapArrayLength,
    4795             :                                 GIntBig nPixelSpace, GIntBig nLineSpace, GIntBig nBandSpace,
    4796             :                                 int bSpacingShouldBeMultipleOfPixelSize )
    4797             : {
    4798      348704 :     if (buf_xsize <= 0 || buf_ysize <= 0)
    4799             :     {
    4800           2 :         CPLError(CE_Failure, CPLE_IllegalArg, "Illegal values for buffer size");
    4801           2 :         return 0;
    4802             :     }
    4803             : 
    4804      348702 :     if (nPixelSpace < 0 || nLineSpace < 0 || nBandSpace < 0)
    4805             :     {
    4806           0 :         CPLError(CE_Failure, CPLE_IllegalArg, "Illegal values for space arguments");
    4807           0 :         return 0;
    4808             :     }
    4809             : 
    4810      348702 :     if (nPixelSize == 0)
    4811             :     {
    4812           0 :         CPLError(CE_Failure, CPLE_IllegalArg, "Illegal value for data type");
    4813           0 :         return 0;
    4814             :     }
    4815             : 
    4816      348702 :     if( nPixelSpace == 0 )
    4817      347609 :         nPixelSpace = nPixelSize;
    4818        1093 :     else if ( bSpacingShouldBeMultipleOfPixelSize && (nPixelSpace % nPixelSize) != 0 )
    4819             :     {
    4820           0 :         CPLError(CE_Failure, CPLE_IllegalArg, "nPixelSpace should be a multiple of nPixelSize");
    4821           0 :         return 0;
    4822             :     }
    4823             : 
    4824      348702 :     if( nLineSpace == 0 )
    4825             :     {
    4826      348669 :         nLineSpace = nPixelSpace * buf_xsize;
    4827             :     }
    4828          33 :     else if ( bSpacingShouldBeMultipleOfPixelSize && (nLineSpace % nPixelSize) != 0 )
    4829             :     {
    4830           0 :         CPLError(CE_Failure, CPLE_IllegalArg, "nLineSpace should be a multiple of nPixelSize");
    4831           0 :         return 0;
    4832             :     }
    4833             : 
    4834      348702 :     if( nBandSpace == 0 )
    4835             :     {
    4836      347611 :         nBandSpace = nLineSpace * buf_ysize;
    4837             :     }
    4838        1091 :     else if ( bSpacingShouldBeMultipleOfPixelSize && (nBandSpace % nPixelSize) != 0 )
    4839             :     {
    4840           0 :         CPLError(CE_Failure, CPLE_IllegalArg, "nLineSpace should be a multiple of nPixelSize");
    4841           0 :         return 0;
    4842             :     }
    4843             : 
    4844      348702 :     if (nBands <= 0 || (bandMap != NULL && nBands > nBandMapArrayLength))
    4845             :     {
    4846           0 :         CPLError(CE_Failure, CPLE_IllegalArg, "Invalid band count");
    4847           0 :         return 0;
    4848             :     }
    4849             : 
    4850      348702 :     GIntBig nRet = (GIntBig)(buf_ysize - 1) * nLineSpace + (GIntBig)(buf_xsize - 1) * nPixelSpace + (GIntBig)(nBands - 1) * nBandSpace + nPixelSize;
    4851             : #if SIZEOF_VOIDP == 4
    4852             :     if (nRet > INT_MAX)
    4853             :     {
    4854             :         CPLError(CE_Failure, CPLE_IllegalArg, "Integer overflow");
    4855             :         return 0;
    4856             :     }
    4857             : #endif
    4858             : 
    4859      348702 :     return nRet;
    4860             : }
    4861             : 
    4862             : 
    4863             : typedef struct
    4864             : {
    4865             :     GDALAsyncReaderH  hAsyncReader;
    4866             :     void             *pyObject;
    4867             : } GDALAsyncReaderWrapper;
    4868             : 
    4869             : typedef void* GDALAsyncReaderWrapperH;
    4870             : 
    4871           3 : static GDALAsyncReaderH AsyncReaderWrapperGetReader(GDALAsyncReaderWrapperH hWrapper)
    4872             : {
    4873           3 :     GDALAsyncReaderWrapper* psWrapper = (GDALAsyncReaderWrapper*)hWrapper;
    4874           3 :     if (psWrapper->hAsyncReader == NULL)
    4875             :     {
    4876           0 :         CPLError(CE_Failure, CPLE_AppDefined, "AsyncReader object is defunct");
    4877             :     }
    4878           3 :     return psWrapper->hAsyncReader;
    4879             : }
    4880             : 
    4881             : #if defined(SWIGPYTHON)
    4882           1 : static void* AsyncReaderWrapperGetPyObject(GDALAsyncReaderWrapperH hWrapper)
    4883             : {
    4884           1 :     GDALAsyncReaderWrapper* psWrapper = (GDALAsyncReaderWrapper*)hWrapper;
    4885           1 :     return psWrapper->pyObject;
    4886             : }
    4887             : #endif
    4888             : 
    4889           1 : static void DeleteAsyncReaderWrapper(GDALAsyncReaderWrapperH hWrapper)
    4890             : {
    4891           1 :     GDALAsyncReaderWrapper* psWrapper = (GDALAsyncReaderWrapper*)hWrapper;
    4892           1 :     if (psWrapper->hAsyncReader != NULL)
    4893             :     {
    4894           0 :         CPLError(CE_Failure, CPLE_AppDefined,
    4895             :                  "Native AsyncReader object will leak. EndAsyncReader() should have been called before");
    4896             :     }
    4897           1 :     CPLFree(psWrapper);
    4898           1 : }
    4899             : 
    4900             : 
    4901             : 
    4902             : 
    4903           1 : static GDALAsyncReaderWrapper* CreateAsyncReaderWrapper(GDALAsyncReaderH  hAsyncReader,
    4904             :                                                         void             *pyObject)
    4905             : {
    4906           2 :     GDALAsyncReaderWrapper* psWrapper = (GDALAsyncReaderWrapper* )CPLMalloc(sizeof(GDALAsyncReaderWrapper));
    4907           1 :     psWrapper->hAsyncReader = hAsyncReader;
    4908           1 :     psWrapper->pyObject = pyObject;
    4909           1 :     Py_INCREF((PyObject*) psWrapper->pyObject);
    4910           1 :     return psWrapper;
    4911             : }
    4912             : 
    4913           1 : static void DisableAsyncReaderWrapper(GDALAsyncReaderWrapperH hWrapper)
    4914             : {
    4915           1 :     GDALAsyncReaderWrapper* psWrapper = (GDALAsyncReaderWrapper*)hWrapper;
    4916           1 :     if (psWrapper->pyObject)
    4917             :     {
    4918           1 :         Py_XDECREF((PyObject*) psWrapper->pyObject);
    4919             :     }
    4920           1 :     psWrapper->pyObject = NULL;
    4921           1 :     psWrapper->hAsyncReader = NULL;
    4922           1 : }
    4923             : 
    4924           1 : SWIGINTERN void delete_GDALAsyncReaderShadow(GDALAsyncReaderShadow *self){
    4925           1 :         DeleteAsyncReaderWrapper(self);
    4926           1 :     }
    4927           1 : SWIGINTERN GDALAsyncStatusType GDALAsyncReaderShadow_GetNextUpdatedRegion(GDALAsyncReaderShadow *self,double timeout,int *xoff,int *yoff,int *buf_xsize,int *buf_ysize){
    4928           1 :         GDALAsyncReaderH hReader = AsyncReaderWrapperGetReader(self);
    4929           1 :         if (hReader == NULL)
    4930             :         {
    4931           0 :             *xoff = 0;
    4932           0 :             *yoff = 0;
    4933           0 :             *buf_xsize = 0;
    4934           0 :             *buf_ysize = 0;
    4935           0 :             return GARIO_ERROR;
    4936             :         }
    4937           1 :         return GDALARGetNextUpdatedRegion(hReader, timeout, xoff, yoff, buf_xsize, buf_ysize );
    4938             :     }
    4939           1 : SWIGINTERN void GDALAsyncReaderShadow_GetBuffer(GDALAsyncReaderShadow *self,void **ppRetPyObject){
    4940           1 :         GDALAsyncReaderH hReader = AsyncReaderWrapperGetReader(self);
    4941           1 :         if (hReader == NULL)
    4942             :         {
    4943           0 :             *ppRetPyObject = NULL;
    4944           0 :             return;
    4945             :         }
    4946           1 :         *ppRetPyObject = AsyncReaderWrapperGetPyObject(self);
    4947           1 :         Py_INCREF((PyObject*)*ppRetPyObject);
    4948             :     }
    4949           0 : SWIGINTERN int GDALAsyncReaderShadow_LockBuffer(GDALAsyncReaderShadow *self,double timeout){
    4950           0 :         GDALAsyncReaderH hReader = AsyncReaderWrapperGetReader(self);
    4951           0 :         if (hReader == NULL)
    4952             :         {
    4953             :             return 0;
    4954             :         }
    4955           0 :         return GDALARLockBuffer(hReader,timeout);
    4956             :     }
    4957           0 : SWIGINTERN void GDALAsyncReaderShadow_UnlockBuffer(GDALAsyncReaderShadow *self){
    4958           0 :         GDALAsyncReaderH hReader = AsyncReaderWrapperGetReader(self);
    4959           0 :         if (hReader == NULL)
    4960             :         {
    4961             :             return;
    4962             :         }
    4963           0 :         GDALARUnlockBuffer(hReader);
    4964             :     }
    4965       48571 : SWIGINTERN void delete_GDALDatasetShadow(GDALDatasetShadow *self){
    4966       48571 :     if ( GDALDereferenceDataset( self ) <= 0 ) {
    4967       42365 :       if( GDALClose(self) != CE_None )
    4968             :       {
    4969           5 :           if( CPLGetLastErrorType() == CE_None )
    4970           1 :               CPLError(CE_Failure, CPLE_AppDefined, "Error occurred in GDALClose()");
    4971             :       }
    4972             :     }
    4973       48571 :   }
    4974         511 : SWIGINTERN CPLErr GDALDatasetShadow_Close(GDALDatasetShadow *self){
    4975         511 :      return GDALClose(self);
    4976             :   }
    4977        1300 : SWIGINTERN GDALDriverShadow *GDALDatasetShadow_GetDriver(GDALDatasetShadow *self){
    4978        1300 :     return (GDALDriverShadow*) GDALGetDatasetDriver( self );
    4979             :   }
    4980      225103 : SWIGINTERN GDALRasterBandShadow *GDALDatasetShadow_GetRasterBand(GDALDatasetShadow *self,int nBand){
    4981      225103 :     return (GDALRasterBandShadow*) GDALGetRasterBand( self, nBand );
    4982             :   }
    4983        1115 : SWIGINTERN GDALGroupHS *GDALDatasetShadow_GetRootGroup(GDALDatasetShadow *self){
    4984        1115 :     return GDALDatasetGetRootGroup(self);
    4985             :   }
    4986         396 : SWIGINTERN char const *GDALDatasetShadow_GetProjection(GDALDatasetShadow *self){
    4987         396 :     return GDALGetProjectionRef( self );
    4988             :   }
    4989         464 : SWIGINTERN char const *GDALDatasetShadow_GetProjectionRef(GDALDatasetShadow *self){
    4990         464 :     return GDALGetProjectionRef( self );
    4991             :   }
    4992           4 : SWIGINTERN int GDALDatasetShadow_GetRefCount(GDALDatasetShadow *self){
    4993           4 :     return OGR_DS_GetRefCount(self);
    4994             :   }
    4995           0 : SWIGINTERN int GDALDatasetShadow_GetSummaryRefCount(GDALDatasetShadow *self){
    4996           0 :     return OGR_DS_GetSummaryRefCount(self);
    4997             :   }
    4998         698 : SWIGINTERN OSRSpatialReferenceShadow *GDALDatasetShadow_GetSpatialRef(GDALDatasetShadow *self){
    4999         698 :     OGRSpatialReferenceH ref = GDALGetSpatialRef(self);
    5000         698 :     if( ref )
    5001         494 :        ref = OSRClone( ref );
    5002         698 :     return (OSRSpatialReferenceShadow*) ref;
    5003             :   }
    5004        1670 : SWIGINTERN CPLErr GDALDatasetShadow_SetProjection(GDALDatasetShadow *self,char const *prj){
    5005        1670 :     return GDALSetProjection( self, prj );
    5006             :   }
    5007         215 : SWIGINTERN CPLErr GDALDatasetShadow_SetSpatialRef(GDALDatasetShadow *self,OSRSpatialReferenceShadow *srs){
    5008         215 :      return GDALSetSpatialRef( self, (OGRSpatialReferenceH)srs );
    5009             :   }
    5010        3544 : SWIGINTERN void GDALDatasetShadow_GetGeoTransform(GDALDatasetShadow *self,double argout[6],int *isvalid,int *can_return_null=0){
    5011        3544 :     if (can_return_null && *can_return_null)
    5012             :     {
    5013         392 :         *isvalid = (GDALGetGeoTransform( self, argout ) == CE_None );
    5014             :     }
    5015             :     else
    5016             :     {
    5017        3152 :         *isvalid = TRUE;
    5018        3152 :         if ( GDALGetGeoTransform( self, argout ) != CE_None ) {
    5019          77 :             argout[0] = 0.0;
    5020          77 :             argout[1] = 1.0;
    5021          77 :             argout[2] = 0.0;
    5022          77 :             argout[3] = 0.0;
    5023          77 :             argout[4] = 0.0;
    5024          77 :             argout[5] = 1.0;
    5025             :         }
    5026             :     }
    5027        3544 :   }
    5028        2629 : SWIGINTERN CPLErr GDALDatasetShadow_SetGeoTransform(GDALDatasetShadow *self,double argin[6]){
    5029        2629 :     return GDALSetGeoTransform( self, argin );
    5030             :   }
    5031             : 
    5032             : static int*
    5033      349329 : CreateCIntListFromSequence( PyObject* pySeq, int* pnSize ) {
    5034             :   /* check if is List */
    5035      349329 :   if ( !PySequence_Check(pySeq) ) {
    5036           0 :     PyErr_SetString(PyExc_TypeError, "not a sequence");
    5037           0 :     *pnSize = -1;
    5038           0 :     return NULL;
    5039             :   }
    5040      349329 :   Py_ssize_t size = PySequence_Size(pySeq);
    5041      349329 :   if( size > (Py_ssize_t)INT_MAX ) {
    5042           0 :     PyErr_SetString(PyExc_RuntimeError, "too big sequence");
    5043           0 :     *pnSize = -1;
    5044           0 :     return NULL;
    5045             :   }
    5046      349329 :   if( (size_t)size > SIZE_MAX / sizeof(int) ) {
    5047           0 :     PyErr_SetString(PyExc_RuntimeError, "too big sequence");
    5048           0 :     *pnSize = -1;
    5049           0 :     return NULL;
    5050             :   }
    5051      349329 :   *pnSize = (int)size;
    5052      349329 :   int* ret = (int*) malloc((*pnSize)*sizeof(int));
    5053      349329 :   if( !ret ) {
    5054           0 :     PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
    5055           0 :     *pnSize = -1;
    5056           0 :     return NULL;
    5057             :   }
    5058      719410 :   for( int i = 0; i<*pnSize; i++ ) {
    5059      370081 :     PyObject *o = PySequence_GetItem(pySeq,i);
    5060      370081 :     if ( !PyArg_Parse(o,"i",&ret[i]) ) {
    5061           0 :         PyErr_SetString(PyExc_TypeError, "not an integer");
    5062           0 :         Py_DECREF(o);
    5063           0 :         free(ret);
    5064           0 :         *pnSize = -1;
    5065           0 :         return NULL;
    5066             :     }
    5067      370081 :     Py_DECREF(o);
    5068             :   }
    5069             :   return ret;
    5070             : }
    5071             : 
    5072         530 : SWIGINTERN int GDALDatasetShadow_BuildOverviews(GDALDatasetShadow *self,char const *resampling="NEAREST",int overviewlist=0,int *pOverviews=0,GDALProgressFunc callback=NULL,void *callback_data=NULL,char **options=NULL){
    5073             : 
    5074         530 :     return GDALBuildOverviewsEx(  self,
    5075             :                                 resampling ? resampling : "NEAREST",
    5076             :                                 overviewlist,
    5077             :                                 pOverviews,
    5078             :                                 0,
    5079             :                                 0,
    5080             :                                 callback,
    5081             :                                 callback_data,
    5082         530 :                                 options);
    5083             :   }
    5084         110 : SWIGINTERN int GDALDatasetShadow_GetGCPCount(GDALDatasetShadow *self){
    5085         110 :     return GDALGetGCPCount( self );
    5086             :   }
    5087          59 : SWIGINTERN char const *GDALDatasetShadow_GetGCPProjection(GDALDatasetShadow *self){
    5088          59 :     return GDALGetGCPProjection( self );
    5089             :   }
    5090          19 : SWIGINTERN OSRSpatialReferenceShadow *GDALDatasetShadow_GetGCPSpatialRef(GDALDatasetShadow *self){
    5091          19 :     OGRSpatialReferenceH ref = GDALGetGCPSpatialRef(self);
    5092          19 :     if( ref )
    5093          13 :        ref = OSRClone( ref );
    5094          19 :     return (OSRSpatialReferenceShadow*) ref;
    5095             :   }
    5096         105 : SWIGINTERN void GDALDatasetShadow_GetGCPs(GDALDatasetShadow *self,int *nGCPs,GDAL_GCP const **pGCPs){
    5097         210 :     *nGCPs = GDALGetGCPCount( self );
    5098         105 :     *pGCPs = GDALGetGCPs( self );
    5099             :   }
    5100          30 : SWIGINTERN CPLErr GDALDatasetShadow_SetGCPs(GDALDatasetShadow *self,int nGCPs,GDAL_GCP const *pGCPs,char const *pszGCPProjection){
    5101          30 :     return GDALSetGCPs( self, nGCPs, pGCPs, pszGCPProjection );
    5102             :   }
    5103           6 : SWIGINTERN CPLErr GDALDatasetShadow_SetGCPs2(GDALDatasetShadow *self,int nGCPs,GDAL_GCP const *pGCPs,OSRSpatialReferenceShadow *hSRS){
    5104           6 :     return GDALSetGCPs2( self, nGCPs, pGCPs, (OGRSpatialReferenceH)hSRS );
    5105             :   }
    5106        1609 : SWIGINTERN CPLErr GDALDatasetShadow_FlushCache(GDALDatasetShadow *self){
    5107        1609 :     return GDALFlushCache( self );
    5108             :   }
    5109          26 : SWIGINTERN CPLErr GDALDatasetShadow_AddBand(GDALDatasetShadow *self,GDALDataType datatype=GDT_Byte,char **options=0){
    5110          26 :     return GDALAddBand( self, datatype, options );
    5111             :   }
    5112          51 : SWIGINTERN CPLErr GDALDatasetShadow_CreateMaskBand(GDALDatasetShadow *self,int nFlags){
    5113          51 :       return GDALCreateDatasetMaskBand( self, nFlags );
    5114             :   }
    5115         435 : SWIGINTERN char **GDALDatasetShadow_GetFileList(GDALDatasetShadow *self){
    5116         435 :     return GDALGetFileList( self );
    5117             :   }
    5118      173445 : SWIGINTERN CPLErr GDALDatasetShadow_WriteRaster(GDALDatasetShadow *self,int xoff,int yoff,int xsize,int ysize,GIntBig buf_len,char *buf_string,int *buf_xsize=0,int *buf_ysize=0,GDALDataType *buf_type=0,int band_list=0,int *pband_list=0,GIntBig *buf_pixel_space=0,GIntBig *buf_line_space=0,GIntBig *buf_band_space=0){
    5119      173445 :     CPLErr eErr;
    5120      173445 :     int nxsize = (buf_xsize==0) ? xsize : *buf_xsize;
    5121      173445 :     int nysize = (buf_ysize==0) ? ysize : *buf_ysize;
    5122      173445 :     GDALDataType ntype;
    5123      173445 :     if ( buf_type != 0 ) {
    5124      173445 :       ntype = (GDALDataType) *buf_type;
    5125             :     } else {
    5126           0 :       int lastband = GDALGetRasterCount( self );
    5127           0 :       if (lastband <= 0)
    5128             :         return CE_Failure;
    5129           0 :       ntype = GDALGetRasterDataType( GDALGetRasterBand( self, lastband ) );
    5130             :     }
    5131             : 
    5132      173445 :     GIntBig pixel_space = (buf_pixel_space == 0) ? 0 : *buf_pixel_space;
    5133      173445 :     GIntBig line_space = (buf_line_space == 0) ? 0 : *buf_line_space;
    5134      173445 :     GIntBig band_space = (buf_band_space == 0) ? 0 : *buf_band_space;
    5135             : 
    5136      173445 :     GIntBig min_buffer_size =
    5137      173445 :       ComputeDatasetRasterIOSize (nxsize, nysize, GDALGetDataTypeSize( ntype ) / 8,
    5138           0 :                                   band_list ? band_list : GDALGetRasterCount(self), pband_list, band_list,
    5139             :                                   pixel_space, line_space, band_space, FALSE);
    5140      173445 :     if (min_buffer_size == 0)
    5141             :         return CE_Failure;
    5142             : 
    5143      173444 :     if ( buf_len < min_buffer_size )
    5144             :     {
    5145           1 :         CPLError(CE_Failure, CPLE_AppDefined, "Buffer too small");
    5146           1 :         return CE_Failure;
    5147             :     }
    5148             : 
    5149      173443 :     GDALRasterIOExtraArg* psExtraArg = NULL;
    5150             : 
    5151      173443 :     eErr = GDALDatasetRasterIOEx( self, GF_Write, xoff, yoff, xsize, ysize,
    5152             :                                   (void*) buf_string, nxsize, nysize, ntype,
    5153             :                                   band_list, pband_list, pixel_space, line_space, band_space, psExtraArg );
    5154             : 
    5155      173443 :     return eErr;
    5156             :   }
    5157           1 : SWIGINTERN CPLErr GDALDatasetShadow_AdviseRead(GDALDatasetShadow *self,int xoff,int yoff,int xsize,int ysize,int *buf_xsize=0,int *buf_ysize=0,GDALDataType *buf_type=0,int band_list=0,int *pband_list=0,char **options=NULL){
    5158           1 :     int nxsize = (buf_xsize==0) ? xsize : *buf_xsize;
    5159           1 :     int nysize = (buf_ysize==0) ? ysize : *buf_ysize;
    5160           1 :     GDALDataType ntype;
    5161           1 :     if ( buf_type != 0 ) {
    5162           0 :       ntype = (GDALDataType) *buf_type;
    5163             :     } else {
    5164           1 :       int lastband = GDALGetRasterCount( self );
    5165           1 :       if (lastband <= 0)
    5166             :         return CE_Failure;
    5167           1 :       ntype = GDALGetRasterDataType( GDALGetRasterBand( self, lastband ) );
    5168             :     }
    5169           1 :     return GDALDatasetAdviseRead(self, xoff, yoff, xsize, ysize,
    5170             :                                  nxsize, nysize, ntype,
    5171           1 :                                  band_list, pband_list, options);
    5172             : }
    5173           1 : SWIGINTERN GDALAsyncReaderShadow *GDALDatasetShadow_BeginAsyncReader(GDALDatasetShadow *self,int xOff,int yOff,int xSize,int ySize,size_t buf_len,char *buf_string,void *pyObject,int buf_xsize,int buf_ysize,GDALDataType bufType=(GDALDataType) 0,int band_list=0,int *pband_list=0,int nPixelSpace=0,int nLineSpace=0,int nBandSpace=0,char **options=0){
    5174             : 
    5175           1 :     if ((options != NULL) && (buf_xsize ==0) && (buf_ysize == 0))
    5176             :     {
    5177             :         // calculate an appropriate buffer size
    5178           0 :         const char* pszLevel = CSLFetchNameValue(options, "LEVEL");
    5179           0 :         if (pszLevel)
    5180             :         {
    5181             :             // round up
    5182           0 :             int nLevel = atoi(pszLevel);
    5183           0 :             if( nLevel < 0 || nLevel > 30 )
    5184             :             {
    5185           0 :                 CPLError(CE_Failure, CPLE_AppDefined, "Invalid LEVEL: %d", nLevel);
    5186             :             }
    5187             :             else
    5188             :             {
    5189           0 :                 int nRes = 1 << nLevel;
    5190           0 :                 buf_xsize = static_cast<int>(ceil(xSize / (1.0 * nRes)));
    5191           0 :                 buf_ysize = static_cast<int>(ceil(ySize / (1.0 * nRes)));
    5192             :             }
    5193             :         }
    5194             :     }
    5195             : 
    5196           1 :     int nxsize = (buf_xsize == 0) ? xSize : buf_xsize;
    5197           1 :     int nysize = (buf_ysize == 0) ? ySize : buf_ysize;
    5198             : 
    5199           1 :     GDALDataType ntype;
    5200           1 :     if (bufType != 0) {
    5201             :         ntype = (GDALDataType) bufType;
    5202             :     }
    5203             :     else {
    5204             :         ntype = GDT_Byte;
    5205             :     }
    5206             : 
    5207           1 :     int nBCount = (band_list) != 0 ? band_list : GDALGetRasterCount(self);
    5208           1 :     uint64_t nMinSize = (uint64_t)nxsize * nysize * nBCount * GDALGetDataTypeSizeBytes(ntype);
    5209           1 :     if (buf_string == NULL || buf_len < nMinSize)
    5210             :     {
    5211           0 :         CPLError(CE_Failure, CPLE_AppDefined, "Buffer is too small");
    5212           0 :         return NULL;
    5213             :     }
    5214             : 
    5215           1 :     bool myBandList = false;
    5216           1 :     int* pBandList;
    5217             : 
    5218           1 :     if (band_list != 0){
    5219             :         myBandList = false;
    5220             :         pBandList = pband_list;
    5221             :     }
    5222             :     else
    5223             :     {
    5224           0 :         myBandList = true;
    5225           0 :         pBandList = (int*)CPLMalloc(sizeof(int) * nBCount);
    5226           0 :         for (int i = 0; i < nBCount; ++i) {
    5227           0 :             pBandList[i] = i + 1;
    5228             :         }
    5229             :     }
    5230             : 
    5231           1 :     GDALAsyncReaderH hAsyncReader =
    5232           1 :             GDALBeginAsyncReader(self, xOff, yOff, xSize, ySize, (void*) buf_string, nxsize, nysize, ntype, nBCount, pBandList, nPixelSpace, nLineSpace,
    5233             :     nBandSpace, options);
    5234             : 
    5235           1 :     if ( myBandList ) {
    5236           0 :        CPLFree( pBandList );
    5237             :     }
    5238             : 
    5239           1 :     if (hAsyncReader)
    5240             :     {
    5241           1 :         return (GDALAsyncReaderShadow*) CreateAsyncReaderWrapper(hAsyncReader, pyObject);
    5242             :     }
    5243             :     else
    5244             :     {
    5245             :         return NULL;
    5246             :     }
    5247             : 
    5248             :   }
    5249           1 : SWIGINTERN void GDALDatasetShadow_EndAsyncReader(GDALDatasetShadow *self,GDALAsyncReaderShadow *ario){
    5250           1 :     if( ario == NULL ) return;
    5251           1 :     GDALAsyncReaderH hReader = AsyncReaderWrapperGetReader(ario);
    5252           1 :     if (hReader == NULL)
    5253             :     {
    5254             :         return;
    5255             :     }
    5256           1 :     GDALEndAsyncReader(self, hReader);
    5257           1 :     DisableAsyncReaderWrapper(ario);
    5258             :   }
    5259           3 : SWIGINTERN CPLVirtualMemShadow *GDALDatasetShadow_GetVirtualMem(GDALDatasetShadow *self,GDALRWFlag eRWFlag,int nXOff,int nYOff,int nXSize,int nYSize,int nBufXSize,int nBufYSize,GDALDataType eBufType,int band_list,int *pband_list,int bIsBandSequential,size_t nCacheSize,size_t nPageSizeHint,char **options=NULL){
    5260           3 :         int nPixelSpace;
    5261           3 :         int nBandSpace;
    5262           3 :         if( bIsBandSequential != 0 && bIsBandSequential != 1 )
    5263             :             return NULL;
    5264           3 :         if( band_list == 0 )
    5265             :             return NULL;
    5266           3 :         if( bIsBandSequential || band_list == 1 )
    5267             :         {
    5268             :             nPixelSpace = 0;
    5269             :             nBandSpace = 0;
    5270             :         }
    5271             :         else
    5272             :         {
    5273           1 :             nBandSpace = GDALGetDataTypeSize(eBufType) / 8;
    5274           1 :             nPixelSpace = nBandSpace * band_list;
    5275             :         }
    5276           3 :         CPLVirtualMem* vmem = GDALDatasetGetVirtualMem( self,
    5277             :                                          eRWFlag,
    5278             :                                          nXOff, nYOff,
    5279             :                                          nXSize, nYSize,
    5280             :                                          nBufXSize, nBufYSize,
    5281             :                                          eBufType,
    5282             :                                          band_list, pband_list,
    5283             :                                          nPixelSpace,
    5284             :                                          0,
    5285             :                                          nBandSpace,
    5286             :                                          nCacheSize,
    5287             :                                          nPageSizeHint,
    5288             :                                          FALSE,
    5289             :                                          options );
    5290           3 :         if( vmem == NULL )
    5291             :             return NULL;
    5292           3 :         CPLVirtualMemShadow* vmemshadow = (CPLVirtualMemShadow*)calloc(1, sizeof(CPLVirtualMemShadow));
    5293           3 :         vmemshadow->vmem = vmem;
    5294           3 :         vmemshadow->eBufType = eBufType;
    5295           3 :         vmemshadow->bIsBandSequential = bIsBandSequential;
    5296           3 :         vmemshadow->bReadOnly = (eRWFlag == GF_Read);
    5297           3 :         vmemshadow->nBufXSize = nBufXSize;
    5298           3 :         vmemshadow->nBufYSize = nBufYSize;
    5299           3 :         vmemshadow->nBandCount = band_list;
    5300           3 :         return vmemshadow;
    5301             :     }
    5302           3 : SWIGINTERN CPLVirtualMemShadow *GDALDatasetShadow_GetTiledVirtualMem(GDALDatasetShadow *self,GDALRWFlag eRWFlag,int nXOff,int nYOff,int nXSize,int nYSize,int nTileXSize,int nTileYSize,GDALDataType eBufType,int band_list,int *pband_list,GDALTileOrganization eTileOrganization,size_t nCacheSize,char **options=NULL){
    5303           3 :         if( band_list == 0 )
    5304             :             return NULL;
    5305           3 :         CPLVirtualMem* vmem = GDALDatasetGetTiledVirtualMem( self,
    5306             :                                          eRWFlag,
    5307             :                                          nXOff, nYOff,
    5308             :                                          nXSize, nYSize,
    5309             :                                          nTileXSize, nTileYSize,
    5310             :                                          eBufType,
    5311             :                                          band_list, pband_list,
    5312             :                                          eTileOrganization,
    5313             :                                          nCacheSize,
    5314             :                                          FALSE,
    5315             :                                          options );
    5316           3 :         if( vmem == NULL )
    5317             :             return NULL;
    5318           3 :         CPLVirtualMemShadow* vmemshadow = (CPLVirtualMemShadow*)calloc(1, sizeof(CPLVirtualMemShadow));
    5319           3 :         vmemshadow->vmem = vmem;
    5320           3 :         vmemshadow->eBufType = eBufType;
    5321           3 :         vmemshadow->bIsBandSequential = -1;
    5322           3 :         vmemshadow->bReadOnly = (eRWFlag == GF_Read);
    5323           3 :         vmemshadow->nBufXSize = nXSize;
    5324           3 :         vmemshadow->nBufYSize = nYSize;
    5325           3 :         vmemshadow->eTileOrganization = eTileOrganization;
    5326           3 :         vmemshadow->nTileXSize = nTileXSize;
    5327           3 :         vmemshadow->nTileYSize = nTileYSize;
    5328           3 :         vmemshadow->nBandCount = band_list;
    5329           3 :         return vmemshadow;
    5330             :     }
    5331        5330 : SWIGINTERN OGRLayerShadow *GDALDatasetShadow_CreateLayer(GDALDatasetShadow *self,char const *name,OSRSpatialReferenceShadow *srs=NULL,OGRwkbGeometryType geom_type=wkbUnknown,char **options=0){
    5332       10660 :     OGRLayerShadow* layer = (OGRLayerShadow*) GDALDatasetCreateLayer( self,
    5333             :                                   name,
    5334             :                                   srs,
    5335             :                                   geom_type,
    5336             :                                   options);
    5337        5330 :     return layer;
    5338             :   }
    5339          15 : SWIGINTERN OGRLayerShadow *GDALDatasetShadow_CreateLayerFromGeomFieldDefn(GDALDatasetShadow *self,char const *name,OGRGeomFieldDefnShadow *geom_field,char **options=0){
    5340          30 :     OGRLayerShadow* layer = (OGRLayerShadow*) GDALDatasetCreateLayerFromGeomFieldDefn( self,
    5341             :                                   name,
    5342             :                                   geom_field,
    5343             :                                   options);
    5344          15 :     return layer;
    5345             :   }
    5346          10 : SWIGINTERN OGRLayerShadow *GDALDatasetShadow_CopyLayer(GDALDatasetShadow *self,OGRLayerShadow *src_layer,char const *new_name,char **options=0){
    5347          20 :     OGRLayerShadow* layer = (OGRLayerShadow*) GDALDatasetCopyLayer( self,
    5348             :                                                       src_layer,
    5349             :                                                       new_name,
    5350             :                                                       options);
    5351          10 :     return layer;
    5352             :   }
    5353          42 : SWIGINTERN OGRErr GDALDatasetShadow_DeleteLayer(GDALDatasetShadow *self,int index){
    5354          42 :     return GDALDatasetDeleteLayer(self, index);
    5355             :   }
    5356             : 
    5357             : 
    5358             : #include "ogr_core.h"
    5359             : static char const *
    5360           0 : OGRErrMessages( int rc ) {
    5361           0 :   switch( rc ) {
    5362             :   case OGRERR_NONE:
    5363             :     return "OGR Error: None";
    5364           0 :   case OGRERR_NOT_ENOUGH_DATA:
    5365           0 :     return "OGR Error: Not enough data to deserialize";
    5366           0 :   case OGRERR_NOT_ENOUGH_MEMORY:
    5367           0 :     return "OGR Error: Not enough memory";
    5368           0 :   case OGRERR_UNSUPPORTED_GEOMETRY_TYPE:
    5369           0 :     return "OGR Error: Unsupported geometry type";
    5370           0 :   case OGRERR_UNSUPPORTED_OPERATION:
    5371           0 :     return "OGR Error: Unsupported operation";
    5372           0 :   case OGRERR_CORRUPT_DATA:
    5373           0 :     return "OGR Error: Corrupt data";
    5374           0 :   case OGRERR_FAILURE:
    5375           0 :     return "OGR Error: General Error";
    5376           0 :   case OGRERR_UNSUPPORTED_SRS:
    5377           0 :     return "OGR Error: Unsupported SRS";
    5378           0 :   case OGRERR_INVALID_HANDLE:
    5379           0 :     return "OGR Error: Invalid handle";
    5380           0 :   case OGRERR_NON_EXISTING_FEATURE:
    5381           0 :     return "OGR Error: Non existing feature";
    5382           0 :   default:
    5383           0 :     return "OGR Error: Unknown";
    5384             :   }
    5385             : }
    5386             : 
    5387          91 : SWIGINTERN bool GDALDatasetShadow_IsLayerPrivate(GDALDatasetShadow *self,int index){
    5388         182 :     return GDALDatasetIsLayerPrivate(self, index);
    5389             :   }
    5390             : 
    5391             : SWIGINTERN int
    5392        6912 : SWIG_AsVal_bool (PyObject *obj, bool *val)
    5393             : {
    5394        6912 :   int r;
    5395        6912 :   if (!PyBool_Check(obj))
    5396             :     return SWIG_ERROR;
    5397        6912 :   r = PyObject_IsTrue(obj);
    5398        6912 :   if (r == -1)
    5399             :     return SWIG_ERROR;
    5400        6912 :   if (val) *val = r ? true : false;
    5401             :   return SWIG_OK;
    5402             : }
    5403             : 
    5404        1833 : SWIGINTERN OGRFeatureShadow *GDALDatasetShadow_GetNextFeature(GDALDatasetShadow *self,bool include_layer=true,bool include_pct=false,OGRLayerShadow **ppoBelongingLayer=NULL,double *pdfProgressPct=NULL,GDALProgressFunc callback=NULL,void *callback_data=NULL){
    5405        1833 :     return GDALDatasetGetNextFeature( self, ppoBelongingLayer, pdfProgressPct,
    5406             :                                       callback, callback_data );
    5407             :   }
    5408         113 : SWIGINTERN bool GDALDatasetShadow_TestCapability(GDALDatasetShadow *self,char const *cap){
    5409         226 :     return (GDALDatasetTestCapability(self, cap) > 0);
    5410             :   }
    5411        9013 : SWIGINTERN OGRLayerShadow *GDALDatasetShadow_ExecuteSQL(GDALDatasetShadow *self,char const *statement,OGRGeometryShadow *spatialFilter=NULL,char const *dialect=""){
    5412       18026 :     OGRLayerShadow* layer = (OGRLayerShadow*) GDALDatasetExecuteSQL(self,
    5413             :                                                       statement,
    5414             :                                                       spatialFilter,
    5415             :                                                       dialect);
    5416        9013 :     return layer;
    5417             :   }
    5418        2519 : SWIGINTERN void GDALDatasetShadow_ReleaseResultSet(GDALDatasetShadow *self,OGRLayerShadow *layer){
    5419        2519 :     GDALDatasetReleaseResultSet(self, layer);
    5420        2519 :   }
    5421           6 : SWIGINTERN OGRStyleTableShadow *GDALDatasetShadow_GetStyleTable(GDALDatasetShadow *self){
    5422           6 :     return (OGRStyleTableShadow*) GDALDatasetGetStyleTable(self);
    5423             :   }
    5424           6 : SWIGINTERN void GDALDatasetShadow_SetStyleTable(GDALDatasetShadow *self,OGRStyleTableShadow *table){
    5425           6 :     if( table != NULL )
    5426           4 :         GDALDatasetSetStyleTable(self, (OGRStyleTableH) table);
    5427             :   }
    5428        8190 : SWIGINTERN OGRLayerShadow *GDALDatasetShadow_GetLayerByIndex(GDALDatasetShadow *self,int index=0){
    5429             : 
    5430             : 
    5431             : 
    5432       16380 :     OGRLayerShadow* layer = (OGRLayerShadow*) GDALDatasetGetLayer(self, index);
    5433        8190 :     return layer;
    5434             :   }
    5435        2539 : SWIGINTERN OGRLayerShadow *GDALDatasetShadow_GetLayerByName(GDALDatasetShadow *self,char const *layer_name){
    5436        5078 :     OGRLayerShadow* layer = (OGRLayerShadow*) GDALDatasetGetLayerByName(self, layer_name);
    5437        2539 :     return layer;
    5438             :   }
    5439           8 : SWIGINTERN void GDALDatasetShadow_ResetReading(GDALDatasetShadow *self){
    5440           8 :     GDALDatasetResetReading(self);
    5441           8 :   }
    5442        1273 : SWIGINTERN int GDALDatasetShadow_GetLayerCount(GDALDatasetShadow *self){
    5443        1273 :     return GDALDatasetGetLayerCount(self);
    5444             :   }
    5445           6 : SWIGINTERN OGRErr GDALDatasetShadow_AbortSQL(GDALDatasetShadow *self){
    5446           6 :     return GDALDatasetAbortSQL(self);
    5447             : }
    5448          74 : SWIGINTERN OGRErr GDALDatasetShadow_StartTransaction(GDALDatasetShadow *self,int force=FALSE){
    5449          74 :     return GDALDatasetStartTransaction(self, force);
    5450             :   }
    5451          44 : SWIGINTERN OGRErr GDALDatasetShadow_CommitTransaction(GDALDatasetShadow *self){
    5452          44 :     return GDALDatasetCommitTransaction(self);
    5453             :   }
    5454          31 : SWIGINTERN OGRErr GDALDatasetShadow_RollbackTransaction(GDALDatasetShadow *self){
    5455          31 :     return GDALDatasetRollbackTransaction(self);
    5456             :   }
    5457           2 : SWIGINTERN void GDALDatasetShadow_ClearStatistics(GDALDatasetShadow *self){
    5458           2 :       GDALDatasetClearStatistics(self);
    5459           2 :   }
    5460          33 : SWIGINTERN char **GDALDatasetShadow_GetFieldDomainNames(GDALDatasetShadow *self,char **options=0){
    5461          33 :     return GDALDatasetGetFieldDomainNames(self, options);
    5462             :   }
    5463         117 : SWIGINTERN OGRFieldDomainShadow *GDALDatasetShadow_GetFieldDomain(GDALDatasetShadow *self,char const *name){
    5464         117 :     return (OGRFieldDomainShadow*) GDALDatasetGetFieldDomain(self, name);
    5465             :   }
    5466          35 : SWIGINTERN bool GDALDatasetShadow_AddFieldDomain(GDALDatasetShadow *self,OGRFieldDomainShadow *fieldDomain){
    5467          35 :       return GDALDatasetAddFieldDomain(self, (OGRFieldDomainH)fieldDomain, NULL);
    5468             :   }
    5469          10 : SWIGINTERN bool GDALDatasetShadow_DeleteFieldDomain(GDALDatasetShadow *self,char const *name){
    5470          10 :       return GDALDatasetDeleteFieldDomain(self, name, NULL);
    5471             :   }
    5472           5 : SWIGINTERN bool GDALDatasetShadow_UpdateFieldDomain(GDALDatasetShadow *self,OGRFieldDomainShadow *fieldDomain){
    5473           5 :       return GDALDatasetUpdateFieldDomain(self, (OGRFieldDomainH)fieldDomain, NULL);
    5474             :   }
    5475          41 : SWIGINTERN char **GDALDatasetShadow_GetRelationshipNames(GDALDatasetShadow *self,char **options=0){
    5476          41 :     return GDALDatasetGetRelationshipNames(self, options);
    5477             :   }
    5478          50 : SWIGINTERN GDALRelationshipShadow *GDALDatasetShadow_GetRelationship(GDALDatasetShadow *self,char const *name){
    5479          50 :     return (GDALRelationshipShadow*) GDALDatasetGetRelationship(self, name);
    5480             :   }
    5481          42 : SWIGINTERN bool GDALDatasetShadow_AddRelationship(GDALDatasetShadow *self,GDALRelationshipShadow *relationship){
    5482          42 :       return GDALDatasetAddRelationship(self, (GDALRelationshipH)relationship, NULL);
    5483             :   }
    5484           6 : SWIGINTERN bool GDALDatasetShadow_DeleteRelationship(GDALDatasetShadow *self,char const *name){
    5485           6 :       return GDALDatasetDeleteRelationship(self, name, NULL);
    5486             :   }
    5487           9 : SWIGINTERN bool GDALDatasetShadow_UpdateRelationship(GDALDatasetShadow *self,GDALRelationshipShadow *relationship){
    5488           9 :       return GDALDatasetUpdateRelationship(self, (GDALRelationshipH)relationship, NULL);
    5489             :   }
    5490      175259 : SWIGINTERN CPLErr GDALDatasetShadow_ReadRaster1(GDALDatasetShadow *self,double xoff,double yoff,double xsize,double ysize,void **buf,int *buf_xsize=0,int *buf_ysize=0,GDALDataType *buf_type=0,int band_list=0,int *pband_list=0,GIntBig *buf_pixel_space=0,GIntBig *buf_line_space=0,GIntBig *buf_band_space=0,GDALRIOResampleAlg resample_alg=GRIORA_NearestNeighbour,GDALProgressFunc callback=NULL,void *callback_data=NULL,void *inputOutputBuf=NULL){
    5491      175259 :     *buf = NULL;
    5492             : 
    5493      175259 :     int nxsize = (buf_xsize==0) ? static_cast<int>(xsize) : *buf_xsize;
    5494      175259 :     int nysize = (buf_ysize==0) ? static_cast<int>(ysize) : *buf_ysize;
    5495      175259 :     GDALDataType ntype;
    5496      175259 :     if ( buf_type != 0 ) {
    5497      175259 :       ntype = *buf_type;
    5498             :     } else {
    5499           0 :       int lastband = GDALGetRasterCount( self ) - 1;
    5500           0 :       if (lastband < 0)
    5501             :       {
    5502             :           return CE_Failure;
    5503             :       }
    5504           0 :       ntype = GDALGetRasterDataType( GDALGetRasterBand( self, lastband ) );
    5505             :     }
    5506             : 
    5507      175259 :     GIntBig pixel_space = (buf_pixel_space == 0) ? 0 : *buf_pixel_space;
    5508      175259 :     GIntBig line_space = (buf_line_space == 0) ? 0 : *buf_line_space;
    5509      175259 :     GIntBig band_space = (buf_band_space == 0) ? 0 : *buf_band_space;
    5510             : 
    5511      175259 :     int ntypesize = GDALGetDataTypeSize( ntype ) / 8;
    5512      175259 :     size_t buf_size = static_cast<size_t>(
    5513      175259 :         ComputeDatasetRasterIOSize (nxsize, nysize, ntypesize,
    5514             :                                     band_list ? band_list :
    5515           0 :                                         GDALGetRasterCount(self),
    5516             :                                     pband_list, band_list,
    5517             :                                     pixel_space, line_space, band_space,
    5518      175259 :                                     FALSE));
    5519      175259 :     if (buf_size == 0)
    5520             :     {
    5521             :         return CE_Failure;
    5522             :     }
    5523             : 
    5524      175258 :     char *data;
    5525      175258 :     Py_buffer view;
    5526             : 
    5527      176197 :     if( !readraster_acquirebuffer(buf, inputOutputBuf, buf_size, ntype,
    5528             :                                   GetUseExceptions(), data, view) )
    5529             :     {
    5530             :         return CE_Failure;
    5531             :     }
    5532             : 
    5533      175245 :     if( inputOutputBuf == NULL )
    5534             :     {
    5535             :         /* Should we clear the buffer in case there are hole in it ? */
    5536      175233 :         if( line_space != 0 && pixel_space != 0 && line_space > pixel_space * nxsize )
    5537             :         {
    5538           4 :             memset(data, 0, buf_size);
    5539             :         }
    5540      175229 :         else if( band_list > 1 && band_space != 0 )
    5541             :         {
    5542        1059 :             if( line_space != 0 && band_space > line_space * nysize )
    5543           0 :                 memset(data, 0, buf_size);
    5544        1059 :             else if( pixel_space != 0 && band_space < pixel_space &&
    5545        1059 :                      pixel_space != (GIntBig)GDALGetRasterCount(self) * ntypesize )
    5546         160 :                 memset(data, 0, buf_size);
    5547             :         }
    5548             :     }
    5549             : 
    5550      175245 :     GDALRasterIOExtraArg sExtraArg;
    5551      175245 :     INIT_RASTERIO_EXTRA_ARG(sExtraArg);
    5552      175245 :     sExtraArg.eResampleAlg = resample_alg;
    5553      175245 :     sExtraArg.pfnProgress = callback;
    5554      175245 :     sExtraArg.pProgressData = callback_data;
    5555             : 
    5556      175245 :     int nXOff = (int)(xoff + 0.5);
    5557      175245 :     int nYOff = (int)(yoff + 0.5);
    5558      175245 :     int nXSize = (int)(xsize + 0.5);
    5559      175245 :     int nYSize = (int)(ysize + 0.5);
    5560      175245 :     if( fabs(xoff-nXOff) > 1e-8 || fabs(yoff-nYOff) > 1e-8 ||
    5561      175240 :         fabs(xsize-nXSize) > 1e-8 || fabs(ysize-nYSize) > 1e-8 )
    5562             :     {
    5563           7 :         sExtraArg.bFloatingPointWindowValidity = TRUE;
    5564           7 :         sExtraArg.dfXOff = xoff;
    5565           7 :         sExtraArg.dfYOff = yoff;
    5566           7 :         sExtraArg.dfXSize = xsize;
    5567           7 :         sExtraArg.dfYSize = ysize;
    5568             :     }
    5569             : 
    5570      175245 :     CPLErr eErr = GDALDatasetRasterIOEx(self, GF_Read, nXOff, nYOff, nXSize, nYSize,
    5571             :                                data, nxsize, nysize, ntype,
    5572             :                                band_list, pband_list, pixel_space, line_space, band_space,
    5573             :                                &sExtraArg );
    5574             : 
    5575      175245 :     readraster_releasebuffer(eErr, buf, inputOutputBuf, view);
    5576             : 
    5577             :     return eErr;
    5578             : }
    5579             : 
    5580       17603 : int GDALDatasetShadow_RasterXSize_get( GDALDatasetShadow *h ) {
    5581       17603 :   return GDALGetRasterXSize( h );
    5582             : }
    5583       17872 : int GDALDatasetShadow_RasterYSize_get( GDALDatasetShadow *h ) {
    5584       17872 :   return GDALGetRasterYSize( h );
    5585             : }
    5586      348270 : int GDALDatasetShadow_RasterCount_get( GDALDatasetShadow *h ) {
    5587      348270 :   return GDALGetRasterCount( h );
    5588             : }
    5589             : 
    5590           9 : SWIGINTERN GDALRasterAttributeTableShadow *new_GDALRasterAttributeTableShadow(){
    5591           9 :         return (GDALRasterAttributeTableShadow*)
    5592           9 :     GDALCreateRasterAttributeTable();
    5593             :     }
    5594          16 : SWIGINTERN void delete_GDALRasterAttributeTableShadow(GDALRasterAttributeTableShadow *self){
    5595          16 :         GDALDestroyRasterAttributeTable(self);
    5596          16 :     }
    5597           5 : SWIGINTERN GDALRasterAttributeTableShadow *GDALRasterAttributeTableShadow_Clone(GDALRasterAttributeTableShadow *self){
    5598           5 :         return (GDALRasterAttributeTableShadow*) GDALRATClone(self);
    5599             :     }
    5600          31 : SWIGINTERN int GDALRasterAttributeTableShadow_GetColumnCount(GDALRasterAttributeTableShadow *self){
    5601          31 :         return GDALRATGetColumnCount( self );
    5602             :     }
    5603          37 : SWIGINTERN char const *GDALRasterAttributeTableShadow_GetNameOfCol(GDALRasterAttributeTableShadow *self,int iCol){
    5604          37 :         return GDALRATGetNameOfCol( self, iCol );
    5605             :     }
    5606          40 : SWIGINTERN GDALRATFieldUsage GDALRasterAttributeTableShadow_GetUsageOfCol(GDALRasterAttributeTableShadow *self,int iCol){
    5607          40 :         return GDALRATGetUsageOfCol( self, iCol );
    5608             :     }
    5609          43 : SWIGINTERN GDALRATFieldType GDALRasterAttributeTableShadow_GetTypeOfCol(GDALRasterAttributeTableShadow *self,int iCol){
    5610          43 :         return GDALRATGetTypeOfCol( self, iCol );
    5611             :     }
    5612          13 : SWIGINTERN int GDALRasterAttributeTableShadow_GetColOfUsage(GDALRasterAttributeTableShadow *self,GDALRATFieldUsage eUsage){
    5613          13 :         return GDALRATGetColOfUsage( self, eUsage );
    5614             :     }
    5615          41 : SWIGINTERN int GDALRasterAttributeTableShadow_GetRowCount(GDALRasterAttributeTableShadow *self){
    5616          41 :         return GDALRATGetRowCount( self );
    5617             :     }
    5618          36 : SWIGINTERN char const *GDALRasterAttributeTableShadow_GetValueAsString(GDALRasterAttributeTableShadow *self,int iRow,int iCol){
    5619          36 :         return GDALRATGetValueAsString( self, iRow, iCol );
    5620             :     }
    5621          52 : SWIGINTERN int GDALRasterAttributeTableShadow_GetValueAsInt(GDALRasterAttributeTableShadow *self,int iRow,int iCol){
    5622          52 :         return GDALRATGetValueAsInt( self, iRow, iCol );
    5623             :     }
    5624          33 : SWIGINTERN double GDALRasterAttributeTableShadow_GetValueAsDouble(GDALRasterAttributeTableShadow *self,int iRow,int iCol){
    5625          33 :         return GDALRATGetValueAsDouble( self, iRow, iCol );
    5626             :     }
    5627           5 : SWIGINTERN CPLErr GDALRasterAttributeTableShadow_ReadValuesIOAsString(GDALRasterAttributeTableShadow *self,int iField,int iStartRow,int iLength,char **ppszData){
    5628           5 :         return GDALRATValuesIOAsString(self, GF_Read, iField, iStartRow, iLength, ppszData);
    5629             :     }
    5630           5 : SWIGINTERN CPLErr GDALRasterAttributeTableShadow_ReadValuesIOAsInteger(GDALRasterAttributeTableShadow *self,int iField,int iStartRow,int iLength,int *pnData){
    5631           5 :         return GDALRATValuesIOAsInteger(self, GF_Read, iField, iStartRow, iLength, pnData);
    5632             :     }
    5633           5 : SWIGINTERN CPLErr GDALRasterAttributeTableShadow_ReadValuesIOAsDouble(GDALRasterAttributeTableShadow *self,int iField,int iStartRow,int iLength,double *pdfData){
    5634           5 :         return GDALRATValuesIOAsDouble(self, GF_Read, iField, iStartRow, iLength, pdfData);
    5635             :     }
    5636          27 : SWIGINTERN void GDALRasterAttributeTableShadow_SetValueAsString(GDALRasterAttributeTableShadow *self,int iRow,int iCol,char const *pszValue){
    5637          27 :         GDALRATSetValueAsString( self, iRow, iCol, pszValue );
    5638          27 :     }
    5639          39 : SWIGINTERN void GDALRasterAttributeTableShadow_SetValueAsInt(GDALRasterAttributeTableShadow *self,int iRow,int iCol,int nValue){
    5640          39 :         GDALRATSetValueAsInt( self, iRow, iCol, nValue );
    5641          39 :     }
    5642          25 : SWIGINTERN void GDALRasterAttributeTableShadow_SetValueAsDouble(GDALRasterAttributeTableShadow *self,int iRow,int iCol,double dfValue){
    5643          25 :         GDALRATSetValueAsDouble( self, iRow, iCol, dfValue );
    5644          25 :     }
    5645           5 : SWIGINTERN void GDALRasterAttributeTableShadow_SetRowCount(GDALRasterAttributeTableShadow *self,int nCount){
    5646           5 :         GDALRATSetRowCount( self, nCount );
    5647           5 :     }
    5648          25 : SWIGINTERN int GDALRasterAttributeTableShadow_CreateColumn(GDALRasterAttributeTableShadow *self,char const *pszName,GDALRATFieldType eType,GDALRATFieldUsage eUsage){
    5649          50 :         return GDALRATCreateColumn( self, pszName, eType, eUsage );
    5650             :     }
    5651           1 : SWIGINTERN bool GDALRasterAttributeTableShadow_GetLinearBinning(GDALRasterAttributeTableShadow *self,double *pdfRow0Min,double *pdfBinSize){
    5652           2 :         return (GDALRATGetLinearBinning(self, pdfRow0Min, pdfBinSize) != 0) ? true : false;
    5653             :     }
    5654           1 : SWIGINTERN int GDALRasterAttributeTableShadow_SetLinearBinning(GDALRasterAttributeTableShadow *self,double dfRow0Min,double dfBinSize){
    5655           2 :         return GDALRATSetLinearBinning(self, dfRow0Min, dfBinSize);
    5656             :     }
    5657           3 : SWIGINTERN int GDALRasterAttributeTableShadow_GetRowOfValue(GDALRasterAttributeTableShadow *self,double dfValue){
    5658           3 :         return GDALRATGetRowOfValue( self, dfValue );
    5659             :     }
    5660           2 : SWIGINTERN int GDALRasterAttributeTableShadow_ChangesAreWrittenToFile(GDALRasterAttributeTableShadow *self){
    5661           2 :         return GDALRATChangesAreWrittenToFile( self );
    5662             :     }
    5663           0 : SWIGINTERN void GDALRasterAttributeTableShadow_DumpReadable(GDALRasterAttributeTableShadow *self){
    5664           0 :         GDALRATDumpReadable( self, NULL );
    5665           0 :     }
    5666           3 : SWIGINTERN void GDALRasterAttributeTableShadow_SetTableType(GDALRasterAttributeTableShadow *self,GDALRATTableType eTableType){
    5667           3 :         GDALRATSetTableType( self, eTableType );
    5668           3 :     }
    5669          10 : SWIGINTERN GDALRATTableType GDALRasterAttributeTableShadow_GetTableType(GDALRasterAttributeTableShadow *self){
    5670          10 :         return GDALRATGetTableType( self );
    5671             :     }
    5672           1 : SWIGINTERN void GDALRasterAttributeTableShadow_RemoveStatistics(GDALRasterAttributeTableShadow *self){
    5673           1 :         GDALRATRemoveStatistics(self);
    5674           1 :     }
    5675        1375 : SWIGINTERN void delete_GDALGroupHS(GDALGroupHS *self){
    5676        1375 :     GDALGroupRelease(self);
    5677        1375 :   }
    5678          87 : SWIGINTERN char const *GDALGroupHS_GetName(GDALGroupHS *self){
    5679          87 :     return GDALGroupGetName(self);
    5680             :   }
    5681          41 : SWIGINTERN char const *GDALGroupHS_GetFullName(GDALGroupHS *self){
    5682          41 :     return GDALGroupGetFullName(self);
    5683             :   }
    5684         314 : SWIGINTERN char **GDALGroupHS_GetMDArrayNames(GDALGroupHS *self,char **options=0){
    5685         314 :     return GDALGroupGetMDArrayNames( self, options );
    5686             :   }
    5687         755 : SWIGINTERN GDALMDArrayHS *GDALGroupHS_OpenMDArray(GDALGroupHS *self,char const *name,char **options=0){
    5688             : 
    5689         755 :     CPLErr eLastErrorType = CPLGetLastErrorType();
    5690             : 
    5691         755 :     GDALMDArrayH hRet = GDALGroupOpenMDArray(self, name, options);
    5692             : 
    5693         850 :     if( GetUseExceptions() && hRet == NULL && eLastErrorType == CE_None && CPLGetLastErrorType() == CE_None )
    5694          17 :         CPLError(CE_Failure, CPLE_AppDefined, "Array %s does not exist", name);
    5695             : 
    5696         755 :     return hRet;
    5697             :   }
    5698          16 : SWIGINTERN GDALMDArrayHS *GDALGroupHS_OpenMDArrayFromFullname(GDALGroupHS *self,char const *name,char **options=0){
    5699             : 
    5700          16 :     CPLErr eLastErrorType = CPLGetLastErrorType();
    5701             : 
    5702          16 :     GDALMDArrayH hRet = GDALGroupOpenMDArrayFromFullname(self, name, options);
    5703             : 
    5704          23 :     if( GetUseExceptions() && hRet == NULL && eLastErrorType == CE_None && CPLGetLastErrorType() == CE_None )
    5705           1 :         CPLError(CE_Failure, CPLE_AppDefined, "Array %s does not exist", name);
    5706             : 
    5707          16 :     return hRet;
    5708             :   }
    5709          19 : SWIGINTERN GDALMDArrayHS *GDALGroupHS_ResolveMDArray(GDALGroupHS *self,char const *name,char const *starting_point,char **options=0){
    5710             : 
    5711          19 :     CPLErr eLastErrorType = CPLGetLastErrorType();
    5712             : 
    5713          19 :     GDALMDArrayH hRet = GDALGroupResolveMDArray(self, name, starting_point, options);
    5714             : 
    5715          19 :     if( GetUseExceptions() && hRet == NULL && eLastErrorType == CE_None && CPLGetLastErrorType() == CE_None )
    5716           1 :         CPLError(CE_Failure, CPLE_AppDefined, "Array %s does not exist", name);
    5717             : 
    5718          19 :     return hRet;
    5719             :   }
    5720          95 : SWIGINTERN char **GDALGroupHS_GetGroupNames(GDALGroupHS *self,char **options=0){
    5721          95 :     return GDALGroupGetGroupNames( self, options );
    5722             :   }
    5723         157 : SWIGINTERN GDALGroupHS *GDALGroupHS_OpenGroup(GDALGroupHS *self,char const *name,char **options=0){
    5724             : 
    5725         157 :     CPLErr eLastErrorType = CPLGetLastErrorType();
    5726             : 
    5727         157 :     GDALGroupH hRet = GDALGroupOpenGroup(self, name, options);
    5728             : 
    5729         165 :     if( GetUseExceptions() && hRet == NULL && eLastErrorType == CE_None && CPLGetLastErrorType() == CE_None )
    5730          12 :         CPLError(CE_Failure, CPLE_AppDefined, "Group %s does not exist", name);
    5731             : 
    5732         157 :     return hRet;
    5733             :   }
    5734           3 : SWIGINTERN GDALGroupHS *GDALGroupHS_OpenGroupFromFullname(GDALGroupHS *self,char const *name,char **options=0){
    5735             : 
    5736           3 :     CPLErr eLastErrorType = CPLGetLastErrorType();
    5737             : 
    5738           3 :     GDALGroupH hRet = GDALGroupOpenGroupFromFullname(self, name, options);
    5739             : 
    5740           3 :     if( GetUseExceptions() && hRet == NULL && eLastErrorType == CE_None && CPLGetLastErrorType() == CE_None )
    5741           1 :         CPLError(CE_Failure, CPLE_AppDefined, "Group %s does not exist", name);
    5742             : 
    5743           3 :     return hRet;
    5744             :   }
    5745           8 : SWIGINTERN char **GDALGroupHS_GetVectorLayerNames(GDALGroupHS *self,char **options=0){
    5746           8 :     return GDALGroupGetVectorLayerNames( self, options );
    5747             :   }
    5748          12 : SWIGINTERN OGRLayerShadow *GDALGroupHS_OpenVectorLayer(GDALGroupHS *self,char const *name,char **options=0){
    5749             : 
    5750          12 :     CPLErr eLastErrorType = CPLGetLastErrorType();
    5751             : 
    5752          12 :     OGRLayerH hRet = GDALGroupOpenVectorLayer(self, name, options);
    5753             : 
    5754          12 :     if( GetUseExceptions() && hRet == NULL && eLastErrorType == CE_None && CPLGetLastErrorType() == CE_None )
    5755           1 :         CPLError(CE_Failure, CPLE_AppDefined, "Vector layer %s does not exist", name);
    5756             : 
    5757          12 :     return (OGRLayerShadow*) hRet;
    5758             :   }
    5759          73 : SWIGINTERN void GDALGroupHS_GetDimensions(GDALGroupHS *self,GDALDimensionHS ***pdims,size_t *pnCount,char **options=0){
    5760         146 :     *pdims = GDALGroupGetDimensions(self, pnCount, options);
    5761             :   }
    5762          63 : SWIGINTERN GDALAttributeHS *GDALGroupHS_GetAttribute(GDALGroupHS *self,char const *name){
    5763             : 
    5764          63 :     CPLErr eLastErrorType = CPLGetLastErrorType();
    5765             : 
    5766          63 :     GDALAttributeH hRet = GDALGroupGetAttribute(self, name);
    5767             : 
    5768          68 :     if( GetUseExceptions() && hRet == NULL && eLastErrorType == CE_None && CPLGetLastErrorType() == CE_None )
    5769           2 :         CPLError(CE_Failure, CPLE_AppDefined, "Attribute %s does not exist", name);
    5770             : 
    5771          63 :     return hRet;
    5772             :   }
    5773          67 : SWIGINTERN void GDALGroupHS_GetAttributes(GDALGroupHS *self,GDALAttributeHS ***pattrs,size_t *pnCount,char **options=0){
    5774         134 :     *pattrs = GDALGroupGetAttributes(self, pnCount, options);
    5775             :   }
    5776           4 : SWIGINTERN char **GDALGroupHS_GetStructuralInfo(GDALGroupHS *self){
    5777           4 :     return GDALGroupGetStructuralInfo( self );
    5778             :   }
    5779         173 : SWIGINTERN GDALGroupHS *GDALGroupHS_CreateGroup(GDALGroupHS *self,char const *name,char **options=0){
    5780         173 :     return GDALGroupCreateGroup(self, name, options);
    5781             :   }
    5782          20 : SWIGINTERN CPLErr GDALGroupHS_DeleteGroup(GDALGroupHS *self,char const *name,char **options=0){
    5783          20 :     return GDALGroupDeleteGroup(self, name, options) ? CE_None : CE_Failure;
    5784             :   }
    5785         642 : SWIGINTERN GDALDimensionHS *GDALGroupHS_CreateDimension(GDALGroupHS *self,char const *name,char const *type,char const *direction,GUIntBig size,char **options=0){
    5786         642 :     return GDALGroupCreateDimension(self, name, type, direction, size, options);
    5787             :   }
    5788         586 : SWIGINTERN GDALMDArrayHS *GDALGroupHS_CreateMDArray(GDALGroupHS *self,char const *name,int dimensions,GDALDimensionHS **dimensionsValues,GDALExtendedDataTypeHS *data_type,char **options=0){
    5789         586 :     return GDALGroupCreateMDArray(self, name, dimensions, dimensionsValues,
    5790             :                                   data_type, options);
    5791             :   }
    5792          20 : SWIGINTERN CPLErr GDALGroupHS_DeleteMDArray(GDALGroupHS *self,char const *name,char **options=0){
    5793          20 :     return GDALGroupDeleteMDArray(self, name, options) ? CE_None : CE_Failure;
    5794             :   }
    5795             : 
    5796             : static GUIntBig*
    5797        5044 : CreateCGUIntBigListFromSequence( PyObject* pySeq, int* pnSize ) {
    5798             :   /* check if is List */
    5799        5044 :   if ( !PySequence_Check(pySeq) ) {
    5800           0 :     PyErr_SetString(PyExc_TypeError, "not a sequence");
    5801           0 :     *pnSize = -1;
    5802           0 :     return NULL;
    5803             :   }
    5804        5044 :   Py_ssize_t size = PySequence_Size(pySeq);
    5805        5044 :   if( size > (Py_ssize_t)INT_MAX ) {
    5806           0 :     PyErr_SetString(PyExc_RuntimeError, "too big sequence");
    5807           0 :     *pnSize = -1;
    5808           0 :     return NULL;
    5809             :   }
    5810        5044 :   if( (size_t)size > SIZE_MAX / sizeof(GUIntBig) ) {
    5811           0 :     PyErr_SetString(PyExc_RuntimeError, "too big sequence");
    5812           0 :     *pnSize = -1;
    5813           0 :     return NULL;
    5814             :   }
    5815        5044 :   *pnSize = (int)size;
    5816        5044 :   GUIntBig* ret = (GUIntBig*) malloc((*pnSize)*sizeof(GUIntBig));
    5817        5044 :   if( !ret ) {
    5818           0 :     PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
    5819           0 :     *pnSize = -1;
    5820           0 :     return NULL;
    5821             :   }
    5822       14237 :   for( int i = 0; i<*pnSize; i++ ) {
    5823        9193 :     PyObject *o = PySequence_GetItem(pySeq,i);
    5824        9193 :     if ( !PyArg_Parse(o,"K",&ret[i]) ) {
    5825           0 :         PyErr_SetString(PyExc_TypeError, "not an integer");
    5826           0 :         Py_DECREF(o);
    5827           0 :         free(ret);
    5828           0 :         *pnSize = -1;
    5829           0 :         return NULL;
    5830             :     }
    5831        9193 :     Py_DECREF(o);
    5832             :   }
    5833             :   return ret;
    5834             : }
    5835             : 
    5836         105 : SWIGINTERN GDALAttributeHS *GDALGroupHS_CreateAttribute(GDALGroupHS *self,char const *name,int dimensions,GUIntBig *sizes,GDALExtendedDataTypeHS *data_type,char **options=0){
    5837         105 :     return GDALGroupCreateAttribute(self, name, dimensions,
    5838             :                                     (const GUInt64*) sizes,
    5839             :                                     data_type, options);
    5840             :   }
    5841          25 : SWIGINTERN CPLErr GDALGroupHS_DeleteAttribute(GDALGroupHS *self,char const *name,char **options=0){
    5842          25 :     return GDALGroupDeleteAttribute(self, name, options) ? CE_None : CE_Failure;
    5843             :   }
    5844          45 : SWIGINTERN CPLErr GDALGroupHS_Rename(GDALGroupHS *self,char const *newName){
    5845          45 :     return GDALGroupRename( self, newName ) ? CE_None : CE_Failure;
    5846             :   }
    5847          14 : SWIGINTERN GDALGroupHS *GDALGroupHS_SubsetDimensionFromSelection(GDALGroupHS *self,char const *selection,char **options=0){
    5848          14 :     return GDALGroupSubsetDimensionFromSelection(self, selection, options);
    5849             :   }
    5850             : 
    5851             : typedef struct
    5852             : {
    5853             :   double min;
    5854             :   double max;
    5855             :   double mean;
    5856             :   double std_dev;
    5857             :   GIntBig valid_count;
    5858             : } Statistics;
    5859             : 
    5860           0 : SWIGINTERN void delete_Statistics(Statistics *self){
    5861           0 :     CPLFree(self);
    5862           0 :   }
    5863             : 
    5864             : #include <limits>
    5865             : 
    5866        2367 : static bool CheckNumericDataType(GDALExtendedDataTypeHS* dt)
    5867             : {
    5868        2367 :     GDALExtendedDataTypeClass klass = GDALExtendedDataTypeGetClass(dt);
    5869        2367 :     if( klass == GEDTC_NUMERIC )
    5870             :         return true;
    5871          32 :     if( klass == GEDTC_STRING )
    5872             :         return false;
    5873          20 :     CPLAssert( klass == GEDTC_COMPOUND );
    5874          20 :     size_t nCount = 0;
    5875          20 :     GDALEDTComponentH* comps = GDALExtendedDataTypeGetComponents(dt, &nCount);
    5876             :     bool ret = true;
    5877          56 :     for( size_t i = 0; i < nCount; i++ )
    5878             :     {
    5879          38 :         GDALExtendedDataTypeH tmpType = GDALEDTComponentGetType(comps[i]);
    5880          38 :         ret = CheckNumericDataType(tmpType);
    5881          38 :         GDALExtendedDataTypeRelease(tmpType);
    5882          38 :         if( !ret )
    5883             :             break;
    5884             :     }
    5885          20 :     GDALExtendedDataTypeFreeComponents(comps, nCount);
    5886             :     return ret;
    5887             : }
    5888             : 
    5889        4145 : static CPLErr MDArrayReadWriteCheckArguments(GDALMDArrayHS* array,
    5890             :                                              bool bCheckOnlyDims,
    5891             :                                              int nDims1, GUIntBig* array_start_idx,
    5892             :                                              int nDims2, GUIntBig* count,
    5893             :                                              int nDims3, GIntBig* array_step,
    5894             :                                              int nDims4, GIntBig* buffer_stride,
    5895             :                                              GDALExtendedDataTypeHS* buffer_datatype,
    5896             :                                              size_t* pnBufferSize)
    5897             : {
    5898        4145 :     const int nExpectedDims = (int)GDALMDArrayGetDimensionCount(array);
    5899        4145 :     if( nDims1 != nExpectedDims )
    5900             :     {
    5901           1 :         CPLError(CE_Failure, CPLE_AppDefined,
    5902             :             "Wrong number of values in array_start_idx");
    5903           1 :         return CE_Failure;
    5904             :     }
    5905        4144 :     if( nDims2 != nExpectedDims )
    5906             :     {
    5907           1 :         CPLError(CE_Failure, CPLE_AppDefined,
    5908             :             "Wrong number of values in count");
    5909           1 :         return CE_Failure;
    5910             :     }
    5911        4143 :     if( nDims3 != nExpectedDims )
    5912             :     {
    5913           1 :         CPLError(CE_Failure, CPLE_AppDefined,
    5914             :             "Wrong number of values in array_step");
    5915           1 :         return CE_Failure;
    5916             :     }
    5917        4142 :     if( nDims4!= nExpectedDims )
    5918             :     {
    5919           1 :         CPLError(CE_Failure, CPLE_AppDefined,
    5920             :             "Wrong number of values in buffer_stride");
    5921           1 :         return CE_Failure;
    5922             :     }
    5923        4141 :     if( bCheckOnlyDims )
    5924             :         return CE_None;
    5925        2314 :     if( !CheckNumericDataType(buffer_datatype) )
    5926             :     {
    5927           8 :         CPLError(CE_Failure, CPLE_NotSupported,
    5928             :             "non-numeric buffer data type not supported in SWIG bindings");
    5929           8 :         return CE_Failure;
    5930             :     }
    5931             :     GIntBig nBufferSize = 0;
    5932        6595 :     for( int i = 0; i < nExpectedDims; i++ )
    5933             :     {
    5934        4291 :         if( count[i] == 0 )
    5935             :         {
    5936           1 :             CPLError(CE_Failure, CPLE_AppDefined,
    5937             :                      "count[%d] = 0 is invalid", i);
    5938           1 :             return CE_Failure;
    5939             :         }
    5940        4290 :         if( buffer_stride[i] < 0 )
    5941             :         {
    5942           1 :             CPLError(CE_Failure, CPLE_NotSupported,
    5943             :                 "Negative value in buffer_stride not supported in SWIG bindings");
    5944           1 :             return CE_Failure;
    5945             :         }
    5946        4289 :         if( count[i] > 1 && buffer_stride[i] != 0 )
    5947             :         {
    5948        3615 :             if( (GUIntBig)buffer_stride[i] > std::numeric_limits<GIntBig>::max() / (count[i] - 1) )
    5949             :             {
    5950           0 :                 CPLError(CE_Failure, CPLE_AppDefined, "Integer overflow");
    5951           0 :                 return CE_Failure;
    5952             :             }
    5953        3615 :             GIntBig nDelta = buffer_stride[i] * (count[i] - 1);
    5954        3615 :             if( nBufferSize > std::numeric_limits<GIntBig>::max() - nDelta )
    5955             :             {
    5956           0 :                 CPLError(CE_Failure, CPLE_AppDefined, "Integer overflow");
    5957           0 :                 return CE_Failure;
    5958             :             }
    5959        3615 :             nBufferSize += nDelta;
    5960             :         }
    5961             :     }
    5962        2304 :     const size_t nDTSize = GDALExtendedDataTypeGetSize(buffer_datatype);
    5963        2304 :     if( nDTSize == 0 )
    5964             :     {
    5965           0 :         CPLError(CE_Failure, CPLE_AppDefined, "nDTSize == 0");
    5966           0 :         return CE_Failure;
    5967             :     }
    5968        2304 :     if( (GUIntBig)nBufferSize > (GUIntBig)std::numeric_limits<GIntBig>::max() / nDTSize )
    5969             :     {
    5970           0 :         CPLError(CE_Failure, CPLE_AppDefined, "Integer overflow");
    5971           0 :         return CE_Failure;
    5972             :     }
    5973        2304 :     nBufferSize *= nDTSize;
    5974        2304 :     if( (GUIntBig)nBufferSize > (GUIntBig)std::numeric_limits<GIntBig>::max() - nDTSize )
    5975             :     {
    5976           1 :         CPLError(CE_Failure, CPLE_AppDefined, "Integer overflow");
    5977           1 :         return CE_Failure;
    5978             :     }
    5979        2303 :     nBufferSize += nDTSize;
    5980             : 
    5981             : #if SIZEOF_VOIDP == 4
    5982             :     if( nBufferSize > INT_MAX )
    5983             :     {
    5984             :         CPLError(CE_Failure, CPLE_IllegalArg, "Integer overflow");
    5985             :         return CE_Failure;
    5986             :     }
    5987             : #endif
    5988        2303 :     *pnBufferSize = (size_t)nBufferSize;
    5989        2303 :     return CE_None;
    5990             : }
    5991             : 
    5992        1935 : SWIGINTERN void delete_GDALMDArrayHS(GDALMDArrayHS *self){
    5993        1935 :     GDALMDArrayRelease(self);
    5994        1935 :   }
    5995          83 : SWIGINTERN char const *GDALMDArrayHS_GetName(GDALMDArrayHS *self){
    5996          83 :     return GDALMDArrayGetName(self);
    5997             :   }
    5998          50 : SWIGINTERN char const *GDALMDArrayHS_GetFullName(GDALMDArrayHS *self){
    5999          50 :     return GDALMDArrayGetFullName(self);
    6000             :   }
    6001           6 : SWIGINTERN GUIntBig GDALMDArrayHS_GetTotalElementsCount(GDALMDArrayHS *self){
    6002           6 :     return GDALMDArrayGetTotalElementsCount(self);
    6003             :   }
    6004        3343 : SWIGINTERN size_t GDALMDArrayHS_GetDimensionCount(GDALMDArrayHS *self){
    6005        3343 :     return GDALMDArrayGetDimensionCount(self);
    6006             :   }
    6007             : 
    6008             : SWIGINTERNINLINE PyObject* 
    6009        3440 : SWIG_From_unsigned_SS_long  (unsigned long value)
    6010             : {
    6011        3440 :   return (value > LONG_MAX) ?
    6012        3440 :     PyLong_FromUnsignedLong(value) : PyInt_FromLong(static_cast< long >(value));
    6013             : }
    6014             : 
    6015             : 
    6016             : #ifdef SWIG_LONG_LONG_AVAILABLE
    6017             : SWIGINTERNINLINE PyObject* 
    6018             : SWIG_From_unsigned_SS_long_SS_long  (unsigned long long value)
    6019             : {
    6020             :   return (value > LONG_MAX) ?
    6021             :     PyLong_FromUnsignedLongLong(value) : PyInt_FromLong(static_cast< long >(value));
    6022             : }
    6023             : #endif
    6024             : 
    6025             : 
    6026             : SWIGINTERNINLINE PyObject *
    6027        3440 : SWIG_From_size_t  (size_t value)
    6028             : {    
    6029             : #ifdef SWIG_LONG_LONG_AVAILABLE
    6030        3440 :   if (sizeof(size_t) <= sizeof(unsigned long)) {
    6031             : #endif
    6032        3440 :     return SWIG_From_unsigned_SS_long  (static_cast< unsigned long >(value));
    6033             : #ifdef SWIG_LONG_LONG_AVAILABLE
    6034             :   } else {
    6035             :     /* assume sizeof(size_t) <= sizeof(unsigned long long) */
    6036             :     return SWIG_From_unsigned_SS_long_SS_long  (static_cast< unsigned long long >(value));
    6037             :   }
    6038             : #endif
    6039             : }
    6040             : 
    6041        2179 : SWIGINTERN void GDALMDArrayHS_GetDimensions(GDALMDArrayHS *self,GDALDimensionHS ***pdims,size_t *pnCount){
    6042        4358 :     *pdims = GDALMDArrayGetDimensions(self, pnCount);
    6043             :   }
    6044          13 : SWIGINTERN void GDALMDArrayHS_GetCoordinateVariables(GDALMDArrayHS *self,GDALMDArrayHS ***parrays,size_t *pnCount){
    6045          26 :     *parrays = GDALMDArrayGetCoordinateVariables(self, pnCount);
    6046             :   }
    6047          93 : SWIGINTERN void GDALMDArrayHS_GetBlockSize(GDALMDArrayHS *self,GUIntBig **psizes,size_t *pnCount){
    6048         186 :     *psizes = GDALMDArrayGetBlockSize(self, pnCount);
    6049             :   }
    6050           1 : SWIGINTERN void GDALMDArrayHS_GetProcessingChunkSize(GDALMDArrayHS *self,size_t nMaxChunkMemory,GUIntBig **psizes,size_t *pnCount){
    6051           1 :      size_t* panTmp = GDALMDArrayGetProcessingChunkSize(self, pnCount, nMaxChunkMemory);
    6052           1 :      *psizes = NULL;
    6053           1 :      if( panTmp )
    6054             :      {
    6055           1 :         *psizes = (GUIntBig*) CPLMalloc(sizeof(GUIntBig) * (*pnCount));
    6056           3 :         for( size_t i = 0; i < *pnCount; ++i )
    6057             :         {
    6058           2 :             (*psizes)[i] = panTmp[i];
    6059             :         }
    6060           1 :         CPLFree(panTmp);
    6061             :      }
    6062           1 :   }
    6063        1872 : SWIGINTERN GDALExtendedDataTypeHS *GDALMDArrayHS_GetDataType(GDALMDArrayHS *self){
    6064        1872 :     return GDALMDArrayGetDataType(self);
    6065             :   }
    6066           5 : SWIGINTERN char **GDALMDArrayHS_GetStructuralInfo(GDALMDArrayHS *self){
    6067           5 :     return GDALMDArrayGetStructuralInfo( self );
    6068             :   }
    6069          44 : SWIGINTERN CPLErr GDALMDArrayHS_Resize(GDALMDArrayHS *self,int newDimensions,GUIntBig *newSizes,char **options=NULL){
    6070          44 :     if( static_cast<size_t>(newDimensions) != GDALMDArrayGetDimensionCount(self) )
    6071             :     {
    6072           2 :         CPLError(CE_Failure, CPLE_IllegalArg,
    6073             :                  "newSizes array not of expected size");
    6074           2 :         return CE_Failure;
    6075             :     }
    6076          42 :     return GDALMDArrayResize( self, newSizes, options ) ? CE_None : CE_Failure;
    6077             :   }
    6078             : 
    6079             : static GIntBig*
    6080        4685 : CreateCGIntBigListFromSequence( PyObject* pySeq, int* pnSize ) {
    6081             :   /* check if is List */
    6082        4685 :   if ( !PySequence_Check(pySeq) ) {
    6083           0 :     PyErr_SetString(PyExc_TypeError, "not a sequence");
    6084           0 :     *pnSize = -1;
    6085           0 :     return NULL;
    6086             :   }
    6087        4685 :   Py_ssize_t size = PySequence_Size(pySeq);
    6088        4685 :   if( size > (Py_ssize_t)INT_MAX ) {
    6089           0 :     PyErr_SetString(PyExc_RuntimeError, "too big sequence");
    6090           0 :     *pnSize = -1;
    6091           0 :     return NULL;
    6092             :   }
    6093        4685 :   if( (size_t)size > SIZE_MAX / sizeof(GIntBig) ) {
    6094           0 :     PyErr_SetString(PyExc_RuntimeError, "too big sequence");
    6095           0 :     *pnSize = -1;
    6096           0 :     return NULL;
    6097             :   }
    6098        4685 :   *pnSize = (int)size;
    6099        4685 :   GIntBig* ret = (GIntBig*) malloc((*pnSize)*sizeof(GIntBig));
    6100        4685 :   if( !ret ) {
    6101           0 :     PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
    6102           0 :     *pnSize = -1;
    6103           0 :     return NULL;
    6104             :   }
    6105       13384 :   for( int i = 0; i<*pnSize; i++ ) {
    6106        8699 :     PyObject *o = PySequence_GetItem(pySeq,i);
    6107        8699 :     if ( !PyArg_Parse(o,"L",&ret[i]) ) {
    6108           0 :         PyErr_SetString(PyExc_TypeError, "not an integer");
    6109           0 :         Py_DECREF(o);
    6110           0 :         free(ret);
    6111           0 :         *pnSize = -1;
    6112           0 :         return NULL;
    6113             :     }
    6114        8699 :     Py_DECREF(o);
    6115             :   }
    6116             :   return ret;
    6117             : }
    6118             : 
    6119        1831 : SWIGINTERN CPLErr GDALMDArrayHS_Read(GDALMDArrayHS *self,int nDims1,GUIntBig *array_start_idx,int nDims2,GUIntBig *count,int nDims3,GIntBig *array_step,int nDims4,GIntBig *buffer_stride,GDALExtendedDataTypeHS *buffer_datatype,void **buf){
    6120        1831 :     *buf = NULL;
    6121             : 
    6122        1831 :     size_t buf_size = 0;
    6123        1831 :     if( MDArrayReadWriteCheckArguments(self, true,
    6124             :                                         nDims1, array_start_idx,
    6125             :                                         nDims2, count,
    6126             :                                         nDims3, array_step,
    6127             :                                         nDims4, buffer_stride,
    6128             :                                         buffer_datatype,
    6129             :                                         &buf_size) != CE_None )
    6130             :     {
    6131             :       return CE_Failure;
    6132             :     }
    6133             : 
    6134        1827 :     const int nExpectedDims = (int)GDALMDArrayGetDimensionCount(self);
    6135        3658 :     std::vector<size_t> count_internal(nExpectedDims + 1);
    6136        3654 :     std::vector<GPtrDiff_t> buffer_stride_internal(nExpectedDims + 1);
    6137        1827 :     size_t nProductCount = 1;
    6138        5267 :     for( int i = 0; i < nExpectedDims; i++ )
    6139             :     {
    6140        3440 :         count_internal[i] = (size_t)count[i];
    6141        3440 :         if( count_internal[i] != count[i] )
    6142             :         {
    6143             :             CPLError(CE_Failure, CPLE_AppDefined, "Integer overflow");
    6144             :             return CE_Failure;
    6145             :         }
    6146        3440 :         nProductCount *= count_internal[i];
    6147        3440 :         buffer_stride_internal[i] = (GPtrDiff_t)buffer_stride[i];
    6148        3440 :         if( buffer_stride_internal[i] != buffer_stride[i] )
    6149             :         {
    6150           0 :             CPLError(CE_Failure, CPLE_AppDefined, "Integer overflow");
    6151             :             return CE_Failure;
    6152             :         }
    6153             :     }
    6154             : 
    6155        1827 :     GDALExtendedDataTypeHS* selfType = GDALMDArrayGetDataType(self);
    6156        1827 :     bool isSelfString = GDALExtendedDataTypeGetClass(selfType) == GEDTC_STRING;
    6157        1827 :     GDALExtendedDataTypeRelease(selfType);
    6158             : 
    6159        1827 :     if( GDALExtendedDataTypeGetClass(buffer_datatype) == GEDTC_STRING &&
    6160             :         isSelfString )
    6161             :     {
    6162             :         size_t nExpectedStride = 1;
    6163          41 :         for( int i = nExpectedDims; i > 0; )
    6164             :         {
    6165          22 :             --i;
    6166          22 :             if( (size_t)buffer_stride_internal[i] != nExpectedStride )
    6167             :             {
    6168           0 :                 CPLError(CE_Failure, CPLE_AppDefined, "Unhandled stride");
    6169             :                 return CE_Failure;
    6170             :             }
    6171          22 :             nExpectedStride *= count_internal[i];
    6172             :         }
    6173          19 :         char** ppszBuffer = (char**)VSI_CALLOC_VERBOSE(nProductCount, sizeof(char*));
    6174          19 :         if( !ppszBuffer )
    6175             :             return CE_Failure;
    6176          19 :         GByte* pabyBuffer = (GByte*)ppszBuffer;
    6177          19 :         if( !(GDALMDArrayRead( self,
    6178             :                             array_start_idx,
    6179          19 :                             &count_internal[0],
    6180             :                             array_step,
    6181             :                             NULL,
    6182             :                             buffer_datatype,
    6183             :                             pabyBuffer,
    6184             :                             pabyBuffer,
    6185             :                             nProductCount * sizeof(char*) )) )
    6186             :         {
    6187           0 :             for( size_t i = 0; i < nProductCount; i++ )
    6188           0 :                 VSIFree(ppszBuffer[i]);
    6189           0 :             VSIFree(pabyBuffer);
    6190             :             return CE_Failure;
    6191             :         }
    6192             : 
    6193          19 :         SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    6194          19 :         PyObject* obj = PyList_New( nProductCount );
    6195          69 :         for( size_t i = 0; i < nProductCount; i++ )
    6196             :         {
    6197          50 :             if( !ppszBuffer[i] )
    6198             :             {
    6199           3 :                 Py_INCREF(Py_None);
    6200           3 :                 PyList_SetItem(obj, i, Py_None);
    6201             :             }
    6202             :             else
    6203             :             {
    6204          47 :                 PyList_SetItem(obj, i, GDALPythonObjectFromCStr( ppszBuffer[i] ) );
    6205             :             }
    6206          50 :             VSIFree(ppszBuffer[i]);
    6207             :         }
    6208          19 :         SWIG_PYTHON_THREAD_END_BLOCK;
    6209          19 :         *buf = obj;
    6210          19 :         VSIFree(pabyBuffer);
    6211          19 :         return CE_None;
    6212             :     }
    6213             : 
    6214        1808 :     if( MDArrayReadWriteCheckArguments(self, false,
    6215             :                                         nDims1, array_start_idx,
    6216             :                                         nDims2, count,
    6217             :                                         nDims3, array_step,
    6218             :                                         nDims4, buffer_stride,
    6219             :                                         buffer_datatype,
    6220             :                                         &buf_size) != CE_None )
    6221             :     {
    6222             :       return CE_Failure;
    6223             :     }
    6224        1797 :     if( buf_size == 0 )
    6225             :     {
    6226             :         return CE_None;
    6227             :     }
    6228             : 
    6229             : 
    6230        3624 :     SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    6231        1797 :     *buf = (void *)PyByteArray_FromStringAndSize( NULL, buf_size );
    6232        1797 :     if (*buf == NULL)
    6233             :     {
    6234           0 :         *buf = Py_None;
    6235           0 :         if( !GetUseExceptions() )
    6236             :         {
    6237           0 :             PyErr_Clear();
    6238             :         }
    6239           0 :         SWIG_PYTHON_THREAD_END_BLOCK;
    6240           0 :         CPLError(CE_Failure, CPLE_OutOfMemory, "Cannot allocate result buffer");
    6241             :         return CE_Failure;
    6242             :     }
    6243        1797 :     char *data = PyByteArray_AsString( (PyObject *)*buf );
    6244        1797 :     SWIG_PYTHON_THREAD_END_BLOCK;
    6245             : 
    6246        1797 :     memset(data, 0, buf_size);
    6247             : 
    6248        1797 :     CPLErr eErr = GDALMDArrayRead( self,
    6249             :                                    array_start_idx,
    6250        1797 :                                    &count_internal[0],
    6251             :                                    array_step,
    6252        1797 :                                    &buffer_stride_internal[0],
    6253             :                                    buffer_datatype,
    6254             :                                    data,
    6255             :                                    data,
    6256        1819 :                                    buf_size ) ? CE_None : CE_Failure;
    6257          22 :     if (eErr == CE_Failure)
    6258             :     {
    6259          22 :         SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    6260          22 :         Py_DECREF((PyObject*)*buf);
    6261          22 :         SWIG_PYTHON_THREAD_END_BLOCK;
    6262          22 :         *buf = NULL;
    6263             :     }
    6264             : 
    6265             :     return eErr;
    6266             :   }
    6267          11 : SWIGINTERN CPLErr GDALMDArrayHS_WriteStringArray(GDALMDArrayHS *self,int nDims1,GUIntBig *array_start_idx,int nDims2,GUIntBig *count,int nDims3,GIntBig *array_step,GDALExtendedDataTypeHS *buffer_datatype,char **options){
    6268             : 
    6269          11 :     const int nExpectedDims = (int)GDALMDArrayGetDimensionCount(self);
    6270          22 :     std::vector<size_t> count_internal(nExpectedDims);
    6271          11 :     if( nExpectedDims != 1 )
    6272             :     {
    6273           0 :         CPLError(CE_Failure, CPLE_AppDefined,
    6274             :             "Unsupported number of dimensions");
    6275             :         return CE_Failure;
    6276             :     }
    6277          22 :     for( int i = 0; i < nExpectedDims; i++ )
    6278             :     {
    6279          11 :         count_internal[i] = (size_t)count[i];
    6280          11 :         if( count_internal[i] != count[i] )
    6281             :         {
    6282             :             CPLError(CE_Failure, CPLE_AppDefined, "Integer overflow");
    6283             :             return CE_Failure;
    6284             :         }
    6285             :     }
    6286          11 :     if( nDims1 != 1 )
    6287             :     {
    6288           0 :         CPLError(CE_Failure, CPLE_AppDefined,
    6289             :             "Wrong number of values in array_start_idx");
    6290             :         return CE_Failure;
    6291             :     }
    6292          11 :     if( nDims2 != 1 )
    6293             :     {
    6294           0 :         CPLError(CE_Failure, CPLE_AppDefined,
    6295             :             "Wrong number of values in count");
    6296             :         return CE_Failure;
    6297             :     }
    6298          11 :     if( nDims3 != 1 )
    6299             :     {
    6300           0 :         CPLError(CE_Failure, CPLE_AppDefined,
    6301             :             "Wrong number of values in array_step");
    6302             :         return CE_Failure;
    6303             :     }
    6304             : 
    6305          22 :     CPLErr eErr = GDALMDArrayWrite(self,
    6306             :                                    array_start_idx,
    6307          11 :                                    &count_internal[0],
    6308             :                                    array_step,
    6309             :                                    NULL,
    6310             :                                    buffer_datatype,
    6311             :                                    options,
    6312             :                                    options,
    6313          11 :                                    CSLCount(options) * sizeof(char*) ) ? CE_None : CE_Failure;
    6314             :     return eErr;
    6315             :   }
    6316         506 : SWIGINTERN CPLErr GDALMDArrayHS_Write(GDALMDArrayHS *self,int nDims1,GUIntBig *array_start_idx,int nDims2,GUIntBig *count,int nDims3,GIntBig *array_step,int nDims4,GIntBig *buffer_stride,GDALExtendedDataTypeHS *buffer_datatype,GIntBig buf_len,char *buf_string){
    6317             : 
    6318         506 :     size_t buf_size = 0;
    6319         506 :     if( MDArrayReadWriteCheckArguments(self, false,
    6320             :                                         nDims1, array_start_idx,
    6321             :                                         nDims2, count,
    6322             :                                         nDims3, array_step,
    6323             :                                         nDims4, buffer_stride,
    6324             :                                         buffer_datatype,
    6325             :                                         &buf_size) != CE_None )
    6326             :     {
    6327             :       return CE_Failure;
    6328             :     }
    6329             : 
    6330         506 :     if ( (GUIntBig)buf_len < buf_size )
    6331             :     {
    6332           2 :         CPLError(CE_Failure, CPLE_AppDefined, "Buffer too small");
    6333           2 :         return CE_Failure;
    6334             :     }
    6335             : 
    6336         504 :     const int nExpectedDims = (int)GDALMDArrayGetDimensionCount(self);
    6337        1010 :     std::vector<size_t> count_internal(nExpectedDims+1);
    6338        1008 :     std::vector<GPtrDiff_t> buffer_stride_internal(nExpectedDims+1);
    6339        1391 :     for( int i = 0; i < nExpectedDims; i++ )
    6340             :     {
    6341         887 :         count_internal[i] = (size_t)count[i];
    6342         887 :         if( count_internal[i] != count[i] )
    6343             :         {
    6344             :             CPLError(CE_Failure, CPLE_AppDefined, "Integer overflow");
    6345             :             return CE_Failure;
    6346             :         }
    6347         887 :         buffer_stride_internal[i] = (GPtrDiff_t)buffer_stride[i];
    6348         887 :         if( buffer_stride_internal[i] != buffer_stride[i] )
    6349             :         {
    6350           0 :             CPLError(CE_Failure, CPLE_AppDefined, "Integer overflow");
    6351             :             return CE_Failure;
    6352             :         }
    6353             :     }
    6354             : 
    6355         504 :     CPLErr eErr = GDALMDArrayWrite( self,
    6356             :                                    array_start_idx,
    6357         504 :                                    &count_internal[0],
    6358             :                                    array_step,
    6359         504 :                                    &buffer_stride_internal[0],
    6360             :                                    buffer_datatype,
    6361             :                                    buf_string,
    6362             :                                    buf_string,
    6363         507 :                                    (size_t)buf_len ) ? CE_None : CE_Failure;
    6364             :     return eErr;
    6365             :   }
    6366          22 : SWIGINTERN CPLErr GDALMDArrayHS_AdviseRead(GDALMDArrayHS *self,int nDims1,GUIntBig *array_start_idx,int nDims2,GUIntBig *count,char **options=0){
    6367             : 
    6368          22 :     const int nExpectedDims = (int)GDALMDArrayGetDimensionCount(self);
    6369          22 :     if( nDims1 != nExpectedDims )
    6370             :     {
    6371           0 :         CPLError(CE_Failure, CPLE_AppDefined,
    6372             :             "Wrong number of values in array_start_idx");
    6373           0 :         return CE_Failure;
    6374             :     }
    6375          22 :     if( nDims2 != nExpectedDims )
    6376             :     {
    6377           0 :         CPLError(CE_Failure, CPLE_AppDefined,
    6378             :             "Wrong number of values in count");
    6379           0 :         return CE_Failure;
    6380             :     }
    6381             : 
    6382          44 :     std::vector<size_t> count_internal(nExpectedDims+1);
    6383          58 :     for( int i = 0; i < nExpectedDims; i++ )
    6384             :     {
    6385          36 :         count_internal[i] = (size_t)count[i];
    6386          36 :         if( count_internal[i] != count[i] )
    6387             :         {
    6388             :             CPLError(CE_Failure, CPLE_AppDefined, "Integer overflow");
    6389             :             return CE_Failure;
    6390             :         }
    6391             :     }
    6392             : 
    6393          22 :     if( !(GDALMDArrayAdviseReadEx( self, array_start_idx, count_internal.data(), options )) )
    6394             :     {
    6395           5 :         return CE_Failure;
    6396             :     }
    6397             :     return CE_None;
    6398             :   }
    6399         118 : SWIGINTERN GDALAttributeHS *GDALMDArrayHS_GetAttribute(GDALMDArrayHS *self,char const *name){
    6400             : 
    6401         118 :     CPLErr eLastErrorType = CPLGetLastErrorType();
    6402             : 
    6403         118 :     GDALAttributeH hRet = GDALMDArrayGetAttribute(self, name);
    6404             : 
    6405         136 :     if( GetUseExceptions() && hRet == NULL && eLastErrorType == CE_None && CPLGetLastErrorType() == CE_None )
    6406           2 :         CPLError(CE_Failure, CPLE_AppDefined, "Attribute %s does not exist", name);
    6407             : 
    6408         118 :     return hRet;
    6409             :   }
    6410          57 : SWIGINTERN void GDALMDArrayHS_GetAttributes(GDALMDArrayHS *self,GDALAttributeHS ***pattrs,size_t *pnCount,char **options=0){
    6411         114 :     *pattrs = GDALMDArrayGetAttributes(self, pnCount, options);
    6412             :   }
    6413         148 : SWIGINTERN GDALAttributeHS *GDALMDArrayHS_CreateAttribute(GDALMDArrayHS *self,char const *name,int dimensions,GUIntBig *sizes,GDALExtendedDataTypeHS *data_type,char **options=0){
    6414         148 :     return GDALMDArrayCreateAttribute(self, name, dimensions,
    6415             :                                     (const GUInt64*) sizes,
    6416             :                                     data_type, options);
    6417             :   }
    6418          24 : SWIGINTERN CPLErr GDALMDArrayHS_DeleteAttribute(GDALMDArrayHS *self,char const *name,char **options=0){
    6419          24 :     return GDALMDArrayDeleteAttribute(self, name, options) ? CE_None : CE_Failure;
    6420             :   }
    6421          70 : SWIGINTERN CPLErr GDALMDArrayHS_GetNoDataValueAsRaw(GDALMDArrayHS *self,void **buf){
    6422          70 :     *buf = NULL;
    6423          70 :     const void* pabyBuf = GDALMDArrayGetRawNoDataValue(self);
    6424          70 :     if( pabyBuf == NULL )
    6425             :     {
    6426             :       return CE_Failure;
    6427             :     }
    6428          35 :     GDALExtendedDataTypeHS* selfType = GDALMDArrayGetDataType(self);
    6429          35 :     const size_t buf_size = GDALExtendedDataTypeGetSize(selfType);
    6430          35 :     GDALExtendedDataTypeRelease(selfType);
    6431             : 
    6432         105 :     SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    6433          35 :     *buf = (void *)PyByteArray_FromStringAndSize( NULL, buf_size );
    6434          35 :     if (*buf == NULL)
    6435             :     {
    6436           0 :         *buf = Py_None;
    6437           0 :         if( !GetUseExceptions() )
    6438             :         {
    6439           0 :             PyErr_Clear();
    6440             :         }
    6441           0 :         SWIG_PYTHON_THREAD_END_BLOCK;
    6442           0 :         CPLError(CE_Failure, CPLE_OutOfMemory, "Cannot allocate result buffer");
    6443             :         return CE_Failure;
    6444             :     }
    6445          35 :     char *data = PyByteArray_AsString( (PyObject *)*buf );
    6446          35 :     SWIG_PYTHON_THREAD_END_BLOCK;
    6447             : 
    6448          35 :     memcpy(data, pabyBuf, buf_size);
    6449             : 
    6450          35 :     return CE_None;
    6451             :   }
    6452         117 : SWIGINTERN void GDALMDArrayHS_GetNoDataValueAsDouble(GDALMDArrayHS *self,double *val,int *hasval){
    6453         234 :     *val = GDALMDArrayGetNoDataValueAsDouble( self, hasval );
    6454             :   }
    6455          11 : SWIGINTERN void GDALMDArrayHS_GetNoDataValueAsInt64(GDALMDArrayHS *self,GIntBig *val,int *hasval){
    6456          22 :     *val = GDALMDArrayGetNoDataValueAsInt64( self, hasval );
    6457             :   }
    6458           7 : SWIGINTERN void GDALMDArrayHS_GetNoDataValueAsUInt64(GDALMDArrayHS *self,GUIntBig *val,int *hasval){
    6459          14 :     *val = GDALMDArrayGetNoDataValueAsUInt64( self, hasval );
    6460             :   }
    6461           5 : SWIGINTERN retStringAndCPLFree *GDALMDArrayHS_GetNoDataValueAsString(GDALMDArrayHS *self){
    6462           5 :     GDALExtendedDataTypeHS* selfType = GDALMDArrayGetDataType(self);
    6463           5 :     const size_t typeClass = GDALExtendedDataTypeGetClass(selfType);
    6464           5 :     GDALExtendedDataTypeRelease(selfType);
    6465             : 
    6466           5 :     if( typeClass != GEDTC_STRING )
    6467             :     {
    6468           1 :         CPLError(CE_Failure, CPLE_IllegalArg, "Data type is not string");
    6469           1 :         return NULL;
    6470             :     }
    6471           4 :     const void* pabyBuf = GDALMDArrayGetRawNoDataValue(self);
    6472           4 :     if( pabyBuf == NULL )
    6473             :     {
    6474             :       return NULL;
    6475             :     }
    6476           3 :     const char* ret = *reinterpret_cast<const char* const*>(pabyBuf);
    6477           3 :     if( ret )
    6478           2 :         return CPLStrdup(ret);
    6479             :     return NULL;
    6480             :   }
    6481          50 : SWIGINTERN CPLErr GDALMDArrayHS_SetNoDataValueDouble(GDALMDArrayHS *self,double d){
    6482          50 :     return GDALMDArraySetNoDataValueAsDouble( self, d ) ? CE_None : CE_Failure;
    6483             :   }
    6484           1 : SWIGINTERN CPLErr GDALMDArrayHS_SetNoDataValueInt64(GDALMDArrayHS *self,GIntBig v){
    6485           1 :     return GDALMDArraySetNoDataValueAsInt64( self, v ) ? CE_None : CE_Failure;
    6486             :   }
    6487           1 : SWIGINTERN CPLErr GDALMDArrayHS_SetNoDataValueUInt64(GDALMDArrayHS *self,GUIntBig v){
    6488           1 :     return GDALMDArraySetNoDataValueAsUInt64( self, v ) ? CE_None : CE_Failure;
    6489             :   }
    6490           3 : SWIGINTERN CPLErr GDALMDArrayHS_SetNoDataValueString(GDALMDArrayHS *self,char const *nodata){
    6491           3 :     GDALExtendedDataTypeHS* selfType = GDALMDArrayGetDataType(self);
    6492           3 :     const size_t typeClass = GDALExtendedDataTypeGetClass(selfType);
    6493           3 :     GDALExtendedDataTypeRelease(selfType);
    6494             : 
    6495           3 :     if( typeClass != GEDTC_STRING )
    6496             :     {
    6497           0 :         CPLError(CE_Failure, CPLE_IllegalArg, "Data type is not string");
    6498           0 :         return CE_Failure;
    6499             :     }
    6500           3 :     return GDALMDArraySetRawNoDataValue(self, &nodata) ? CE_None : CE_Failure;
    6501             :   }
    6502           8 : SWIGINTERN CPLErr GDALMDArrayHS_SetNoDataValueRaw(GDALMDArrayHS *self,GIntBig nLen,char *pBuf){
    6503           8 :     GDALExtendedDataTypeHS* selfType = GDALMDArrayGetDataType(self);
    6504           8 :     const size_t selfTypeSize = GDALExtendedDataTypeGetSize(selfType);
    6505           8 :     GDALExtendedDataTypeRelease(selfType);
    6506             : 
    6507           8 :     if( static_cast<size_t>(nLen) != selfTypeSize )
    6508             :     {
    6509           1 :         CPLError(CE_Failure, CPLE_IllegalArg, "Argument of wrong size");
    6510           1 :         return CE_Failure;
    6511             :     }
    6512           7 :     return GDALMDArraySetRawNoDataValue(self, pBuf) ? CE_None : CE_Failure;
    6513             :   }
    6514           4 : SWIGINTERN CPLErr GDALMDArrayHS_DeleteNoDataValue(GDALMDArrayHS *self){
    6515           4 :     return GDALMDArraySetRawNoDataValue( self, NULL ) ? CE_None : CE_Failure;
    6516             :   }
    6517          99 : SWIGINTERN void GDALMDArrayHS_GetOffset(GDALMDArrayHS *self,double *val,int *hasval){
    6518         198 :     *val = GDALMDArrayGetOffset( self, hasval );
    6519             :   }
    6520           5 : SWIGINTERN GDALDataType GDALMDArrayHS_GetOffsetStorageType(GDALMDArrayHS *self){
    6521           5 :     GDALDataType eDT = GDT_Unknown;
    6522           5 :     int hasval = FALSE;
    6523           5 :     GDALMDArrayGetOffsetEx( self, &hasval, &eDT );
    6524           5 :     return hasval ? eDT : GDT_Unknown;
    6525             :   }
    6526         102 : SWIGINTERN void GDALMDArrayHS_GetScale(GDALMDArrayHS *self,double *val,int *hasval){
    6527         204 :     *val = GDALMDArrayGetScale( self, hasval );
    6528             :   }
    6529           5 : SWIGINTERN GDALDataType GDALMDArrayHS_GetScaleStorageType(GDALMDArrayHS *self){
    6530           5 :     GDALDataType eDT = GDT_Unknown;
    6531           5 :     int hasval = FALSE;
    6532           5 :     GDALMDArrayGetScaleEx( self, &hasval, &eDT );
    6533           5 :     return hasval ? eDT : GDT_Unknown;
    6534             :   }
    6535          20 : SWIGINTERN CPLErr GDALMDArrayHS_SetOffset(GDALMDArrayHS *self,double val,GDALDataType storageType=GDT_Unknown){
    6536          20 :     return GDALMDArraySetOffsetEx( self, val, storageType ) ? CE_None : CE_Failure;
    6537             :   }
    6538          20 : SWIGINTERN CPLErr GDALMDArrayHS_SetScale(GDALMDArrayHS *self,double val,GDALDataType storageType=GDT_Unknown){
    6539          20 :     return GDALMDArraySetScaleEx( self, val, storageType ) ? CE_None : CE_Failure;
    6540             :   }
    6541          14 : SWIGINTERN CPLErr GDALMDArrayHS_SetUnit(GDALMDArrayHS *self,char const *unit){
    6542          14 :     return GDALMDArraySetUnit(self, unit) ? CE_None : CE_Failure;
    6543             :   }
    6544         110 : SWIGINTERN char const *GDALMDArrayHS_GetUnit(GDALMDArrayHS *self){
    6545         110 :     return GDALMDArrayGetUnit(self);
    6546             :   }
    6547          30 : SWIGINTERN OGRErr GDALMDArrayHS_SetSpatialRef(GDALMDArrayHS *self,OSRSpatialReferenceShadow *srs){
    6548          30 :      return GDALMDArraySetSpatialRef( self, (OGRSpatialReferenceH)srs ) ? CE_None : CE_Failure;
    6549             :   }
    6550          77 : SWIGINTERN OSRSpatialReferenceShadow *GDALMDArrayHS_GetSpatialRef(GDALMDArrayHS *self){
    6551          77 :     return GDALMDArrayGetSpatialRef(self);
    6552             :   }
    6553         430 : SWIGINTERN GDALMDArrayHS *GDALMDArrayHS_GetView(GDALMDArrayHS *self,char const *viewExpr){
    6554         430 :     return GDALMDArrayGetView(self, viewExpr);
    6555             :   }
    6556          44 : SWIGINTERN GDALMDArrayHS *GDALMDArrayHS_Transpose(GDALMDArrayHS *self,int axisMap,int *mapInts){
    6557          44 :     return GDALMDArrayTranspose(self, axisMap, mapInts);
    6558             :   }
    6559          13 : SWIGINTERN GDALMDArrayHS *GDALMDArrayHS_GetUnscaled(GDALMDArrayHS *self){
    6560          13 :     return GDALMDArrayGetUnscaled(self);
    6561             :   }
    6562          35 : SWIGINTERN GDALMDArrayHS *GDALMDArrayHS_GetMask(GDALMDArrayHS *self,char **options=0){
    6563          35 :     return GDALMDArrayGetMask(self, options);
    6564             :   }
    6565          22 : SWIGINTERN GDALMDArrayHS *GDALMDArrayHS_GetGridded(GDALMDArrayHS *self,char const *pszGridOptions,GDALMDArrayHS *xArray=NULL,GDALMDArrayHS *yArray=NULL,char **options=0){
    6566          22 :     return GDALMDArrayGetGridded(self, pszGridOptions, xArray, yArray, options);
    6567             :   }
    6568          56 : SWIGINTERN GDALDatasetShadow *GDALMDArrayHS_AsClassicDataset(GDALMDArrayHS *self,size_t iXDim,size_t iYDim,GDALGroupHS *hRootGroup=NULL,char **options=0){
    6569          56 :     return (GDALDatasetShadow*)GDALMDArrayAsClassicDatasetEx(self, iXDim, iYDim, hRootGroup, options);
    6570             :   }
    6571          15 : SWIGINTERN Statistics *GDALMDArrayHS_GetStatistics(GDALMDArrayHS *self,bool approx_ok=FALSE,bool force=TRUE,GDALProgressFunc callback=NULL,void *callback_data=NULL){
    6572          15 :         GUInt64 nValidCount = 0;
    6573          15 :         Statistics* psStatisticsOut = (Statistics*)CPLMalloc(sizeof(Statistics));
    6574          15 :         CPLErr eErr = GDALMDArrayGetStatistics(self, NULL, approx_ok, force,
    6575             :                                  &(psStatisticsOut->min),
    6576             :                                  &(psStatisticsOut->max),
    6577             :                                  &(psStatisticsOut->mean),
    6578             :                                  &(psStatisticsOut->std_dev),
    6579             :                                  &nValidCount,
    6580             :                                  callback, callback_data);
    6581          15 :         psStatisticsOut->valid_count = static_cast<GIntBig>(nValidCount);
    6582          15 :         if( eErr == CE_None )
    6583             :             return psStatisticsOut;
    6584           5 :         CPLFree(psStatisticsOut);
    6585             :         return NULL;
    6586             :   }
    6587           4 : SWIGINTERN Statistics *GDALMDArrayHS_ComputeStatistics(GDALMDArrayHS *self,bool approx_ok=FALSE,GDALProgressFunc callback=NULL,void *callback_data=NULL,char **options=0){
    6588           4 :         GUInt64 nValidCount = 0;
    6589           4 :         Statistics* psStatisticsOut = (Statistics*)CPLMalloc(sizeof(Statistics));
    6590           4 :         int nSuccess = GDALMDArrayComputeStatisticsEx(self, NULL, approx_ok,
    6591             :                                  &(psStatisticsOut->min),
    6592             :                                  &(psStatisticsOut->max),
    6593             :                                  &(psStatisticsOut->mean),
    6594             :                                  &(psStatisticsOut->std_dev),
    6595             :                                  &nValidCount,
    6596             :                                  callback, callback_data, options);
    6597           4 :         psStatisticsOut->valid_count = static_cast<GIntBig>(nValidCount);
    6598           4 :         if( nSuccess )
    6599             :             return psStatisticsOut;
    6600           0 :         CPLFree(psStatisticsOut);
    6601             :         return NULL;
    6602             :   }
    6603          30 : SWIGINTERN GDALMDArrayHS *GDALMDArrayHS_GetResampled(GDALMDArrayHS *self,int nDimensions,GDALDimensionHS **dimensions,GDALRIOResampleAlg resample_alg,OSRSpatialReferenceShadow **srs,char **options=0){
    6604          30 :     return GDALMDArrayGetResampled(self, nDimensions, dimensions,
    6605             :                                   resample_alg, srs ? *srs : NULL, options);
    6606             :   }
    6607           6 : SWIGINTERN bool GDALMDArrayHS_Cache(GDALMDArrayHS *self,char **options=NULL){
    6608          12 :       return GDALMDArrayCache(self, options);
    6609             :   }
    6610          28 : SWIGINTERN CPLErr GDALMDArrayHS_Rename(GDALMDArrayHS *self,char const *newName){
    6611          28 :     return GDALMDArrayRename( self, newName ) ? CE_None : CE_Failure;
    6612             :   }
    6613         680 : SWIGINTERN void delete_GDALAttributeHS(GDALAttributeHS *self){
    6614         680 :     GDALAttributeRelease(self);
    6615         680 :   }
    6616         361 : SWIGINTERN char const *GDALAttributeHS_GetName(GDALAttributeHS *self){
    6617         361 :     return GDALAttributeGetName(self);
    6618             :   }
    6619          49 : SWIGINTERN char const *GDALAttributeHS_GetFullName(GDALAttributeHS *self){
    6620          49 :     return GDALAttributeGetFullName(self);
    6621             :   }
    6622         176 : SWIGINTERN GUIntBig GDALAttributeHS_GetTotalElementsCount(GDALAttributeHS *self){
    6623         176 :     return GDALAttributeGetTotalElementsCount(self);
    6624             :   }
    6625          12 : SWIGINTERN size_t GDALAttributeHS_GetDimensionCount(GDALAttributeHS *self){
    6626          12 :     return GDALAttributeGetDimensionCount(self);
    6627             :   }
    6628          11 : SWIGINTERN void GDALAttributeHS_GetDimensionsSize(GDALAttributeHS *self,GUIntBig **pdims,size_t *pnCount){
    6629          22 :     *pdims = GDALAttributeGetDimensionsSize(self, pnCount);
    6630             :   }
    6631         396 : SWIGINTERN GDALExtendedDataTypeHS *GDALAttributeHS_GetDataType(GDALAttributeHS *self){
    6632         396 :     return GDALAttributeGetDataType(self);
    6633             :   }
    6634          10 : SWIGINTERN CPLErr GDALAttributeHS_ReadAsRaw(GDALAttributeHS *self,void **buf){
    6635          10 :     *buf = NULL;
    6636          10 :     GDALExtendedDataTypeHS* dt = GDALAttributeGetDataType(self);
    6637          10 :     bool bIsNumeric = CheckNumericDataType(dt);
    6638          10 :     GDALExtendedDataTypeRelease(dt);
    6639          10 :     if( !bIsNumeric )
    6640             :     {
    6641           4 :         CPLError(CE_Failure, CPLE_NotSupported,
    6642             :             "non-numeric buffer data type not supported in SWIG bindings");
    6643           4 :         return CE_Failure;
    6644             :     }
    6645           6 :     size_t buf_size = 0;
    6646           6 :     GByte* pabyBuf = GDALAttributeReadAsRaw(self, &buf_size);
    6647           6 :     if( pabyBuf == NULL )
    6648             :     {
    6649             :       return CE_Failure;
    6650             :     }
    6651             : 
    6652          16 :     SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    6653           6 :     *buf = (void *)PyBytes_FromStringAndSize( NULL, buf_size );
    6654           6 :     if (*buf == NULL)
    6655             :     {
    6656           0 :         *buf = Py_None;
    6657           0 :         if( !GetUseExceptions() )
    6658             :         {
    6659           0 :             PyErr_Clear();
    6660             :         }
    6661           0 :         SWIG_PYTHON_THREAD_END_BLOCK;
    6662           0 :         CPLError(CE_Failure, CPLE_OutOfMemory, "Cannot allocate result buffer");
    6663           0 :         GDALAttributeFreeRawResult(self, pabyBuf, buf_size);
    6664             :         return CE_Failure;
    6665             :     }
    6666           6 :     char *data = PyBytes_AsString( (PyObject *)*buf );
    6667           6 :     SWIG_PYTHON_THREAD_END_BLOCK;
    6668             : 
    6669           6 :     memcpy(data, pabyBuf, buf_size);
    6670           6 :     GDALAttributeFreeRawResult(self, pabyBuf, buf_size);
    6671             : 
    6672             :     return CE_None;
    6673             :   }
    6674         107 : SWIGINTERN char const *GDALAttributeHS_ReadAsString(GDALAttributeHS *self){
    6675         107 :     return GDALAttributeReadAsString(self);
    6676             :   }
    6677          19 : SWIGINTERN int GDALAttributeHS_ReadAsInt(GDALAttributeHS *self){
    6678          19 :     return GDALAttributeReadAsInt(self);
    6679             :   }
    6680          37 : SWIGINTERN double GDALAttributeHS_ReadAsDouble(GDALAttributeHS *self){
    6681          37 :     return GDALAttributeReadAsDouble(self);
    6682             :   }
    6683          19 : SWIGINTERN char **GDALAttributeHS_ReadAsStringArray(GDALAttributeHS *self){
    6684          19 :     return GDALAttributeReadAsStringArray(self);
    6685             :   }
    6686          15 : SWIGINTERN void GDALAttributeHS_ReadAsIntArray(GDALAttributeHS *self,int **pvals,size_t *pnCount){
    6687          30 :     *pvals = GDALAttributeReadAsIntArray(self, pnCount);
    6688             :   }
    6689          19 : SWIGINTERN void GDALAttributeHS_ReadAsDoubleArray(GDALAttributeHS *self,double **pvals,size_t *pnCount){
    6690          38 :     *pvals = GDALAttributeReadAsDoubleArray(self, pnCount);
    6691             :   }
    6692           5 : SWIGINTERN CPLErr GDALAttributeHS_WriteRaw(GDALAttributeHS *self,GIntBig nLen,char *pBuf){
    6693           5 :     GDALExtendedDataTypeHS* dt = GDALAttributeGetDataType(self);
    6694           5 :     bool bIsNumeric = CheckNumericDataType(dt);
    6695           5 :     GDALExtendedDataTypeRelease(dt);
    6696           5 :     if( !bIsNumeric )
    6697             :     {
    6698           0 :         CPLError(CE_Failure, CPLE_NotSupported,
    6699             :             "non-numeric buffer data type not supported in SWIG bindings");
    6700           0 :         return CE_Failure;
    6701             :     }
    6702           5 :     return GDALAttributeWriteRaw(self, pBuf, nLen) ? CE_None : CE_Failure;
    6703             :   }
    6704         174 : SWIGINTERN CPLErr GDALAttributeHS_WriteString(GDALAttributeHS *self,char const *val){
    6705         174 :     return GDALAttributeWriteString(self, val) ? CE_None : CE_Failure;
    6706             :   }
    6707           8 : SWIGINTERN CPLErr GDALAttributeHS_WriteStringArray(GDALAttributeHS *self,char **vals){
    6708           8 :     return GDALAttributeWriteStringArray(self, vals) ? CE_None : CE_Failure;
    6709             :   }
    6710          22 : SWIGINTERN CPLErr GDALAttributeHS_WriteInt(GDALAttributeHS *self,int val){
    6711          22 :     return GDALAttributeWriteInt(self, val) ? CE_None : CE_Failure;
    6712             :   }
    6713          16 : SWIGINTERN CPLErr GDALAttributeHS_WriteDouble(GDALAttributeHS *self,double val){
    6714          16 :     return GDALAttributeWriteDouble(self, val) ? CE_None : CE_Failure;
    6715             :   }
    6716             : 
    6717             : static double*
    6718          60 : CreateCDoubleListFromSequence( PyObject* pySeq, int* pnSize ) {
    6719             :   /* check if is List */
    6720          60 :   if ( !PySequence_Check(pySeq) ) {
    6721           0 :     PyErr_SetString(PyExc_TypeError, "not a sequence");
    6722           0 :     *pnSize = -1;
    6723           0 :     return NULL;
    6724             :   }
    6725          60 :   Py_ssize_t size = PySequence_Size(pySeq);
    6726          60 :   if( size > (Py_ssize_t)INT_MAX ) {
    6727           0 :     PyErr_SetString(PyExc_RuntimeError, "too big sequence");
    6728           0 :     *pnSize = -1;
    6729           0 :     return NULL;
    6730             :   }
    6731          60 :   if( (size_t)size > SIZE_MAX / sizeof(double) ) {
    6732           0 :     PyErr_SetString(PyExc_RuntimeError, "too big sequence");
    6733           0 :     *pnSize = -1;
    6734           0 :     return NULL;
    6735             :   }
    6736          60 :   *pnSize = (int)size;
    6737          60 :   double* ret = (double*) malloc((*pnSize)*sizeof(double));
    6738          60 :   if( !ret ) {
    6739           0 :     PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
    6740           0 :     *pnSize = -1;
    6741           0 :     return NULL;
    6742             :   }
    6743         157 :   for( int i = 0; i<*pnSize; i++ ) {
    6744          97 :     PyObject *o = PySequence_GetItem(pySeq,i);
    6745          97 :     if ( !PyArg_Parse(o,"d",&ret[i]) ) {
    6746           0 :         PyErr_SetString(PyExc_TypeError, "not an number");
    6747           0 :         Py_DECREF(o);
    6748           0 :         free(ret);
    6749           0 :         *pnSize = -1;
    6750           0 :         return NULL;
    6751             :     }
    6752          97 :     Py_DECREF(o);
    6753             :   }
    6754             :   return ret;
    6755             : }
    6756             : 
    6757          17 : SWIGINTERN CPLErr GDALAttributeHS_WriteDoubleArray(GDALAttributeHS *self,int nList,double *pList){
    6758          17 :     return GDALAttributeWriteDoubleArray(self, pList, nList) ? CE_None : CE_Failure;
    6759             :   }
    6760          27 : SWIGINTERN CPLErr GDALAttributeHS_Rename(GDALAttributeHS *self,char const *newName){
    6761          27 :     return GDALAttributeRename( self, newName ) ? CE_None : CE_Failure;
    6762             :   }
    6763        4732 : SWIGINTERN void delete_GDALDimensionHS(GDALDimensionHS *self){
    6764        4732 :     GDALDimensionRelease(self);
    6765        4732 :   }
    6766         274 : SWIGINTERN char const *GDALDimensionHS_GetName(GDALDimensionHS *self){
    6767         274 :     return GDALDimensionGetName(self);
    6768             :   }
    6769          80 : SWIGINTERN char const *GDALDimensionHS_GetFullName(GDALDimensionHS *self){
    6770          80 :     return GDALDimensionGetFullName(self);
    6771             :   }
    6772          52 : SWIGINTERN char const *GDALDimensionHS_GetType(GDALDimensionHS *self){
    6773          52 :     return GDALDimensionGetType(self);
    6774             :   }
    6775          22 : SWIGINTERN char const *GDALDimensionHS_GetDirection(GDALDimensionHS *self){
    6776          22 :     return GDALDimensionGetDirection(self);
    6777             :   }
    6778        3493 : SWIGINTERN GUIntBig GDALDimensionHS_GetSize(GDALDimensionHS *self){
    6779        3493 :     return GDALDimensionGetSize(self);
    6780             :   }
    6781         118 : SWIGINTERN GDALMDArrayHS *GDALDimensionHS_GetIndexingVariable(GDALDimensionHS *self){
    6782         118 :     return GDALDimensionGetIndexingVariable(self);
    6783             :   }
    6784          22 : SWIGINTERN bool GDALDimensionHS_SetIndexingVariable(GDALDimensionHS *self,GDALMDArrayHS *array){
    6785          44 :     return GDALDimensionSetIndexingVariable(self, array);
    6786             :   }
    6787          31 : SWIGINTERN CPLErr GDALDimensionHS_Rename(GDALDimensionHS *self,char const *newName){
    6788          31 :     return GDALDimensionRename( self, newName ) ? CE_None : CE_Failure;
    6789             :   }
    6790        4398 : SWIGINTERN void delete_GDALExtendedDataTypeHS(GDALExtendedDataTypeHS *self){
    6791        4398 :     GDALExtendedDataTypeRelease(self);
    6792        4398 :   }
    6793        1900 : SWIGINTERN GDALExtendedDataTypeHS *GDALExtendedDataTypeHS_Create(GDALDataType dt){
    6794        1900 :     return GDALExtendedDataTypeCreate(dt);
    6795             :   }
    6796         185 : SWIGINTERN GDALExtendedDataTypeHS *GDALExtendedDataTypeHS_CreateString(size_t nMaxStringLength=0,GDALExtendedDataTypeSubType eSubType=GEDTST_NONE){
    6797         185 :     return GDALExtendedDataTypeCreateStringEx(nMaxStringLength, eSubType);
    6798             :   }
    6799          22 : SWIGINTERN GDALExtendedDataTypeHS *GDALExtendedDataTypeHS_CreateCompound(char const *name,size_t nTotalSize,int nComps,GDALEDTComponentHS **comps){
    6800          22 :     return GDALExtendedDataTypeCreateCompound(name, nTotalSize, nComps, comps);
    6801             :   }
    6802           7 : SWIGINTERN char const *GDALExtendedDataTypeHS_GetName(GDALExtendedDataTypeHS *self){
    6803           7 :     return GDALExtendedDataTypeGetName(self);
    6804             :   }
    6805        1304 : SWIGINTERN GDALExtendedDataTypeClass GDALExtendedDataTypeHS_GetClass(GDALExtendedDataTypeHS *self){
    6806        1304 :     return GDALExtendedDataTypeGetClass(self);
    6807             :   }
    6808         510 : SWIGINTERN GDALDataType GDALExtendedDataTypeHS_GetNumericDataType(GDALExtendedDataTypeHS *self){
    6809         510 :     return GDALExtendedDataTypeGetNumericDataType(self);
    6810             :   }
    6811          51 : SWIGINTERN size_t GDALExtendedDataTypeHS_GetSize(GDALExtendedDataTypeHS *self){
    6812          51 :     return GDALExtendedDataTypeGetSize(self);
    6813             :   }
    6814           3 : SWIGINTERN size_t GDALExtendedDataTypeHS_GetMaxStringLength(GDALExtendedDataTypeHS *self){
    6815           3 :     return GDALExtendedDataTypeGetMaxStringLength(self);
    6816             :   }
    6817         104 : SWIGINTERN GDALExtendedDataTypeSubType GDALExtendedDataTypeHS_GetSubType(GDALExtendedDataTypeHS *self){
    6818         104 :     return GDALExtendedDataTypeGetSubType(self);
    6819             :   }
    6820          21 : SWIGINTERN void GDALExtendedDataTypeHS_GetComponents(GDALExtendedDataTypeHS *self,GDALEDTComponentHS ***pcomps,size_t *pnCount){
    6821          42 :     *pcomps = GDALExtendedDataTypeGetComponents(self, pnCount);
    6822             :   }
    6823           7 : SWIGINTERN bool GDALExtendedDataTypeHS_CanConvertTo(GDALExtendedDataTypeHS *self,GDALExtendedDataTypeHS *other){
    6824          14 :     return GDALExtendedDataTypeCanConvertTo(self, other);
    6825             :   }
    6826          98 : SWIGINTERN bool GDALExtendedDataTypeHS_Equals(GDALExtendedDataTypeHS *self,GDALExtendedDataTypeHS *other){
    6827         196 :     return GDALExtendedDataTypeEquals(self, other);
    6828             :   }
    6829          61 : SWIGINTERN void delete_GDALEDTComponentHS(GDALEDTComponentHS *self){
    6830          61 :     GDALEDTComponentRelease(self);
    6831          61 :   }
    6832          20 : SWIGINTERN GDALEDTComponentHS *GDALEDTComponentHS_Create(char const *name,size_t offset,GDALExtendedDataTypeHS *type){
    6833          20 :     return GDALEDTComponentCreate(name, offset, type);
    6834             :   }
    6835          33 : SWIGINTERN char const *GDALEDTComponentHS_GetName(GDALEDTComponentHS *self){
    6836          33 :     return GDALEDTComponentGetName(self);
    6837             :   }
    6838          31 : SWIGINTERN size_t GDALEDTComponentHS_GetOffset(GDALEDTComponentHS *self){
    6839          31 :     return GDALEDTComponentGetOffset(self);
    6840             :   }
    6841          49 : SWIGINTERN GDALExtendedDataTypeHS *GDALEDTComponentHS_GetType(GDALEDTComponentHS *self){
    6842          49 :     return GDALEDTComponentGetType(self);
    6843             :   }
    6844             : 
    6845           6 : GDALRasterAttributeTableShadow* CreateRasterAttributeTableFromMDArrays(
    6846             :     GDALRATTableType eTableType, int nArrays, GDALMDArrayHS **ahArrays,
    6847             :     int nUsages = 0, GDALRATFieldUsage *paeUsages = NULL )
    6848             : {
    6849           6 :   if( nUsages != 0 && nUsages != nArrays )
    6850             :   {
    6851           1 :       CPLError(CE_Failure, CPLE_AppDefined, "nUsages != nArrays");
    6852           1 :       return NULL;
    6853             :   }
    6854           5 :   return GDALCreateRasterAttributeTableFromMDArrays( eTableType, nArrays, (const GDALMDArrayH *)ahArrays, paeUsages );
    6855             : }
    6856             : 
    6857             : 
    6858             : /* Returned size is in bytes or 0 if an error occurred. */
    6859             : static
    6860       16382 : GIntBig ComputeBandRasterIOSize (int buf_xsize, int buf_ysize, int nPixelSize,
    6861             :                                  GIntBig nPixelSpace, GIntBig nLineSpace,
    6862             :                                  int bSpacingShouldBeMultipleOfPixelSize )
    6863             : {
    6864       16382 :     if (buf_xsize <= 0 || buf_ysize <= 0)
    6865             :     {
    6866           2 :         CPLError(CE_Failure, CPLE_IllegalArg, "Illegal values for buffer size");
    6867           2 :         return 0;
    6868             :     }
    6869             : 
    6870       16380 :     if (nPixelSpace < 0 || nLineSpace < 0)
    6871             :     {
    6872           0 :         CPLError(CE_Failure, CPLE_IllegalArg, "Illegal values for space arguments");
    6873           0 :         return 0;
    6874             :     }
    6875             : 
    6876       16380 :     if (nPixelSize == 0)
    6877             :     {
    6878           0 :         CPLError(CE_Failure, CPLE_IllegalArg, "Illegal value for data type");
    6879           0 :         return 0;
    6880             :     }
    6881             : 
    6882       16380 :     if( nPixelSpace == 0 )
    6883       16202 :         nPixelSpace = nPixelSize;
    6884         178 :     else if ( bSpacingShouldBeMultipleOfPixelSize && (nPixelSpace % nPixelSize) != 0 )
    6885             :     {
    6886           0 :         CPLError(CE_Failure, CPLE_IllegalArg, "nPixelSpace should be a multiple of nPixelSize");
    6887           0 :         return 0;
    6888             :     }
    6889             : 
    6890       16380 :     if( nLineSpace == 0 )
    6891             :     {
    6892       16358 :         nLineSpace = nPixelSpace * buf_xsize;
    6893             :     }
    6894          22 :     else if ( bSpacingShouldBeMultipleOfPixelSize && (nLineSpace % nPixelSize) != 0 )
    6895             :     {
    6896           0 :         CPLError(CE_Failure, CPLE_IllegalArg, "nLineSpace should be a multiple of nPixelSize");
    6897           0 :         return 0;
    6898             :     }
    6899             : 
    6900       16380 :     GIntBig nRet = (GIntBig)(buf_ysize - 1) * nLineSpace + (GIntBig)(buf_xsize - 1) * nPixelSpace + nPixelSize;
    6901             : #if SIZEOF_VOIDP == 4
    6902             :     if (nRet > INT_MAX)
    6903             :     {
    6904             :         CPLError(CE_Failure, CPLE_IllegalArg, "Integer overflow");
    6905             :         return 0;
    6906             :     }
    6907             : #endif
    6908             : 
    6909       16380 :     return nRet;
    6910             : }
    6911             : 
    6912             : 
    6913             : static
    6914        8723 : CPLErr WriteRaster_internal( GDALRasterBandShadow *obj,
    6915             :                              int xoff, int yoff, int xsize, int ysize,
    6916             :                              int buf_xsize, int buf_ysize,
    6917             :                              GDALDataType buf_type,
    6918             :                              GIntBig buf_size, char *buffer,
    6919             :                              GIntBig pixel_space, GIntBig line_space,
    6920             :                              GDALRasterIOExtraArg* psExtraArg )
    6921             : {
    6922        8723 :     GIntBig min_buffer_size = ComputeBandRasterIOSize (buf_xsize, buf_ysize, GDALGetDataTypeSize( buf_type ) / 8,
    6923             :                                                    pixel_space, line_space, FALSE );
    6924        8723 :     if ( min_buffer_size == 0 )
    6925             :       return CE_Failure;
    6926             : 
    6927        8722 :     if ( buf_size < min_buffer_size ) {
    6928           1 :       CPLError(CE_Failure, CPLE_AppDefined, "Buffer too small");
    6929           1 :       return CE_Failure;
    6930             :     }
    6931             : 
    6932        8721 :     return GDALRasterIOEx( obj, GF_Write, xoff, yoff, xsize, ysize,
    6933        8721 :                            (void *) buffer, buf_xsize, buf_ysize, buf_type, pixel_space, line_space, psExtraArg );
    6934             : }
    6935             : 
    6936          59 : SWIGINTERN GDALDatasetShadow *GDALRasterBandShadow_GetDataset(GDALRasterBandShadow *self){
    6937          59 :     return (GDALDatasetShadow*) GDALGetBandDataset(self);
    6938             :   }
    6939           8 : SWIGINTERN int GDALRasterBandShadow_GetBand(GDALRasterBandShadow *self){
    6940           8 :     return GDALGetBandNumber(self);
    6941             :   }
    6942         373 : SWIGINTERN void GDALRasterBandShadow_GetBlockSize(GDALRasterBandShadow *self,int *pnBlockXSize,int *pnBlockYSize){
    6943         373 :       GDALGetBlockSize(self, pnBlockXSize, pnBlockYSize);
    6944         373 :   }
    6945           6 : SWIGINTERN void GDALRasterBandShadow_GetActualBlockSize(GDALRasterBandShadow *self,int nXBlockOff,int nYBlockOff,int *pnxvalid,int *pnyvalid,int *pisvalid){
    6946          12 :     *pisvalid = (GDALGetActualBlockSize(self, nXBlockOff, nYBlockOff, pnxvalid, pnyvalid) == CE_None);
    6947             :   }
    6948         765 : SWIGINTERN GDALColorInterp GDALRasterBandShadow_GetColorInterpretation(GDALRasterBandShadow *self){
    6949         765 :     return GDALGetRasterColorInterpretation(self);
    6950             :   }
    6951         171 : SWIGINTERN GDALColorInterp GDALRasterBandShadow_GetRasterColorInterpretation(GDALRasterBandShadow *self){
    6952         171 :     return GDALGetRasterColorInterpretation(self);
    6953             :   }
    6954         665 : SWIGINTERN CPLErr GDALRasterBandShadow_SetColorInterpretation(GDALRasterBandShadow *self,GDALColorInterp val){
    6955         665 :     return GDALSetRasterColorInterpretation( self, val );
    6956             :   }
    6957         381 : SWIGINTERN CPLErr GDALRasterBandShadow_SetRasterColorInterpretation(GDALRasterBandShadow *self,GDALColorInterp val){
    6958         381 :     return GDALSetRasterColorInterpretation( self, val );
    6959             :   }
    6960      409964 : SWIGINTERN void GDALRasterBandShadow_GetNoDataValue(GDALRasterBandShadow *self,double *val,int *hasval){
    6961      819928 :     *val = GDALGetRasterNoDataValue( self, hasval );
    6962             :   }
    6963          21 : SWIGINTERN void GDALRasterBandShadow_GetNoDataValueAsInt64(GDALRasterBandShadow *self,GIntBig *val,int *hasval){
    6964          42 :     *val = GDALGetRasterNoDataValueAsInt64( self, hasval );
    6965             :   }
    6966          17 : SWIGINTERN void GDALRasterBandShadow_GetNoDataValueAsUInt64(GDALRasterBandShadow *self,GUIntBig *val,int *hasval){
    6967          34 :     *val = GDALGetRasterNoDataValueAsUInt64( self, hasval );
    6968             :   }
    6969         421 : SWIGINTERN CPLErr GDALRasterBandShadow_SetNoDataValue(GDALRasterBandShadow *self,double d){
    6970         421 :     return GDALSetRasterNoDataValue( self, d );
    6971             :   }
    6972          11 : SWIGINTERN CPLErr GDALRasterBandShadow_SetNoDataValueAsInt64(GDALRasterBandShadow *self,GIntBig v){
    6973          11 :     return GDALSetRasterNoDataValueAsInt64( self, v );
    6974             :   }
    6975          10 : SWIGINTERN CPLErr GDALRasterBandShadow_SetNoDataValueAsUInt64(GDALRasterBandShadow *self,GUIntBig v){
    6976          10 :     return GDALSetRasterNoDataValueAsUInt64( self, v );
    6977             :   }
    6978          35 : SWIGINTERN CPLErr GDALRasterBandShadow_DeleteNoDataValue(GDALRasterBandShadow *self){
    6979          35 :     return GDALDeleteRasterNoDataValue(self);
    6980             :   }
    6981          66 : SWIGINTERN char const *GDALRasterBandShadow_GetUnitType(GDALRasterBandShadow *self){
    6982          66 :       return GDALGetRasterUnitType(self);
    6983             :   }
    6984          18 : SWIGINTERN CPLErr GDALRasterBandShadow_SetUnitType(GDALRasterBandShadow *self,char const *val){
    6985          18 :     return GDALSetRasterUnitType( self, val );
    6986             :   }
    6987          17 : SWIGINTERN char **GDALRasterBandShadow_GetRasterCategoryNames(GDALRasterBandShadow *self){
    6988          17 :     return GDALGetRasterCategoryNames(self);
    6989             :   }
    6990           0 : SWIGINTERN CPLErr GDALRasterBandShadow_SetRasterCategoryNames(GDALRasterBandShadow *self,char **names){
    6991           0 :     return GDALSetRasterCategoryNames( self, names );
    6992             :   }
    6993          54 : SWIGINTERN void GDALRasterBandShadow_GetMinimum(GDALRasterBandShadow *self,double *val,int *hasval){
    6994         108 :     *val = GDALGetRasterMinimum( self, hasval );
    6995             :   }
    6996          46 : SWIGINTERN void GDALRasterBandShadow_GetMaximum(GDALRasterBandShadow *self,double *val,int *hasval){
    6997          92 :     *val = GDALGetRasterMaximum( self, hasval );
    6998             :   }
    6999         120 : SWIGINTERN void GDALRasterBandShadow_GetOffset(GDALRasterBandShadow *self,double *val,int *hasval){
    7000         240 :     *val = GDALGetRasterOffset( self, hasval );
    7001             :   }
    7002         119 : SWIGINTERN void GDALRasterBandShadow_GetScale(GDALRasterBandShadow *self,double *val,int *hasval){
    7003         238 :     *val = GDALGetRasterScale( self, hasval );
    7004             :   }
    7005          41 : SWIGINTERN CPLErr GDALRasterBandShadow_SetOffset(GDALRasterBandShadow *self,double val){
    7006          41 :     return GDALSetRasterOffset( self, val );
    7007             :   }
    7008          42 : SWIGINTERN CPLErr GDALRasterBandShadow_SetScale(GDALRasterBandShadow *self,double val){
    7009          42 :     return GDALSetRasterScale( self, val );
    7010             :   }
    7011         109 : SWIGINTERN CPLErr GDALRasterBandShadow_GetStatistics(GDALRasterBandShadow *self,int approx_ok,int force,double *min,double *max,double *mean,double *stddev){
    7012         109 :     if (min) *min = 0;
    7013         109 :     if (max) *max = 0;
    7014         109 :     if (mean) *mean = 0;
    7015         109 :     if (stddev) *stddev = -1; /* This is the only way to recognize from Python if GetRasterStatistics() has updated the values */
    7016         109 :     return GDALGetRasterStatistics( self, approx_ok, force,
    7017         109 :             min, max, mean, stddev );
    7018             :   }
    7019         137 : SWIGINTERN CPLErr GDALRasterBandShadow_ComputeStatistics(GDALRasterBandShadow *self,bool approx_ok,double *min,double *max,double *mean,double *stddev,GDALProgressFunc callback=NULL,void *callback_data=NULL){
    7020         137 :     return GDALComputeRasterStatistics( self, approx_ok, min, max, mean, stddev, callback, callback_data );
    7021             :   }
    7022           2 : SWIGINTERN CPLErr GDALRasterBandShadow_SetStatistics(GDALRasterBandShadow *self,double min,double max,double mean,double stddev){
    7023           2 :     return GDALSetRasterStatistics( self, min, max, mean, stddev );
    7024             :   }
    7025         475 : SWIGINTERN int GDALRasterBandShadow_GetOverviewCount(GDALRasterBandShadow *self){
    7026         475 :     return GDALGetOverviewCount(self);
    7027             :   }
    7028        1326 : SWIGINTERN GDALRasterBandShadow *GDALRasterBandShadow_GetOverview(GDALRasterBandShadow *self,int i){
    7029        1326 :     return (GDALRasterBandShadow*) GDALGetOverview( self, i );
    7030             :   }
    7031        8891 : SWIGINTERN int GDALRasterBandShadow_Checksum(GDALRasterBandShadow *self,int xoff=0,int yoff=0,int *xsize=0,int *ysize=0){
    7032        8891 :     int nxsize = (xsize!=0) ? *xsize : GDALGetRasterBandXSize( self );
    7033        8891 :     int nysize = (ysize!=0) ? *ysize : GDALGetRasterBandYSize( self );
    7034        8891 :     return GDALChecksumImage( self, xoff, yoff, nxsize, nysize );
    7035             :   }
    7036        1369 : SWIGINTERN void GDALRasterBandShadow_ComputeRasterMinMax(GDALRasterBandShadow *self,double argout[2],int *isvalid,bool approx_ok=false,bool can_return_none=false){
    7037        1369 :     *isvalid = GDALComputeRasterMinMax( self, approx_ok, argout ) == CE_None;
    7038        1369 :     if( !can_return_none && !*isvalid )
    7039             :     {
    7040           3 :         *isvalid = true;
    7041           3 :         argout[0] = CPLAtof("nan");
    7042           3 :         argout[1] = CPLAtof("nan");
    7043             :     }
    7044        1369 :   }
    7045          16 : SWIGINTERN void GDALRasterBandShadow_ComputeBandStats(GDALRasterBandShadow *self,double argout[2],int samplestep=1){
    7046          16 :     GDALComputeBandStats( self, samplestep, argout+0, argout+1,
    7047             :                           NULL, NULL );
    7048          16 :   }
    7049      169085 : SWIGINTERN CPLErr GDALRasterBandShadow_Fill(GDALRasterBandShadow *self,double real_fill,double imag_fill=0.0){
    7050      169085 :     return GDALFillRaster( self, real_fill, imag_fill );
    7051             :   }
    7052        8723 : SWIGINTERN CPLErr GDALRasterBandShadow_WriteRaster(GDALRasterBandShadow *self,int xoff,int yoff,int xsize,int ysize,GIntBig buf_len,char *buf_string,int *buf_xsize=0,int *buf_ysize=0,GDALDataType *buf_type=0,GIntBig *buf_pixel_space=0,GIntBig *buf_line_space=0){
    7053        8723 :     int nxsize = (buf_xsize==0) ? xsize : *buf_xsize;
    7054        8723 :     int nysize = (buf_ysize==0) ? ysize : *buf_ysize;
    7055        8723 :     GDALDataType ntype  = (buf_type==0) ? GDALGetRasterDataType(self)
    7056        8723 :                                         : *buf_type;
    7057        8723 :     GIntBig pixel_space = (buf_pixel_space == 0) ? 0 : *buf_pixel_space;
    7058        8723 :     GIntBig line_space = (buf_line_space == 0) ? 0 : *buf_line_space;
    7059        8723 :     GDALRasterIOExtraArg* psExtraArg = NULL;
    7060        8723 :     return WriteRaster_internal( self, xoff, yoff, xsize, ysize,
    7061        8723 :                                  nxsize, nysize, ntype, buf_len, buf_string, pixel_space, line_space, psExtraArg );
    7062             :   }
    7063          36 : SWIGINTERN void GDALRasterBandShadow_FlushCache(GDALRasterBandShadow *self){
    7064          36 :     GDALFlushRasterCache( self );
    7065          36 :   }
    7066         129 : SWIGINTERN GDALColorTableShadow *GDALRasterBandShadow_GetRasterColorTable(GDALRasterBandShadow *self){
    7067         129 :     return (GDALColorTableShadow*) GDALGetRasterColorTable( self );
    7068             :   }
    7069          62 : SWIGINTERN GDALColorTableShadow *GDALRasterBandShadow_GetColorTable(GDALRasterBandShadow *self){
    7070          62 :     return (GDALColorTableShadow*) GDALGetRasterColorTable( self );
    7071             :   }
    7072          43 : SWIGINTERN int GDALRasterBandShadow_SetRasterColorTable(GDALRasterBandShadow *self,GDALColorTableShadow *arg){
    7073          86 :     return GDALSetRasterColorTable( self, arg );
    7074             :   }
    7075          28 : SWIGINTERN int GDALRasterBandShadow_SetColorTable(GDALRasterBandShadow *self,GDALColorTableShadow *arg){
    7076          56 :     return GDALSetRasterColorTable( self, arg );
    7077             :   }
    7078          45 : SWIGINTERN GDALRasterAttributeTableShadow *GDALRasterBandShadow_GetDefaultRAT(GDALRasterBandShadow *self){
    7079          45 :       return (GDALRasterAttributeTableShadow*) GDALGetDefaultRAT(self);
    7080             :   }
    7081          17 : SWIGINTERN int GDALRasterBandShadow_SetDefaultRAT(GDALRasterBandShadow *self,GDALRasterAttributeTableShadow *table){
    7082          34 :       return GDALSetDefaultRAT(self, table);
    7083             :   }
    7084         643 : SWIGINTERN GDALRasterBandShadow *GDALRasterBandShadow_GetMaskBand(GDALRasterBandShadow *self){
    7085         643 :       return (GDALRasterBandShadow *) GDALGetMaskBand( self );
    7086             :   }
    7087         374 : SWIGINTERN int GDALRasterBandShadow_GetMaskFlags(GDALRasterBandShadow *self){
    7088         374 :       return GDALGetMaskFlags( self );
    7089             :   }
    7090          31 : SWIGINTERN CPLErr GDALRasterBandShadow_CreateMaskBand(GDALRasterBandShadow *self,int nFlags){
    7091          31 :       return GDALCreateMaskBand( self, nFlags );
    7092             :   }
    7093          34 : SWIGINTERN bool GDALRasterBandShadow_IsMaskBand(GDALRasterBandShadow *self){
    7094          34 :       return GDALIsMaskBand( self );
    7095             :   }
    7096          26 : SWIGINTERN CPLErr GDALRasterBandShadow_GetHistogram(GDALRasterBandShadow *self,double min=-0.5,double max=255.5,int buckets=256,GUIntBig *panHistogram=NULL,int include_out_of_range=0,int approx_ok=1,GDALProgressFunc callback=NULL,void *callback_data=NULL){
    7097          26 :     CPLErrorReset();
    7098          26 :     CPLErr err = GDALGetRasterHistogramEx( self, min, max, buckets, panHistogram,
    7099             :                                          include_out_of_range, approx_ok,
    7100             :                                          callback, callback_data );
    7101          26 :     return err;
    7102             :   }
    7103          11 : SWIGINTERN CPLErr GDALRasterBandShadow_GetDefaultHistogram(GDALRasterBandShadow *self,double *min_ret=NULL,double *max_ret=NULL,int *buckets_ret=NULL,GUIntBig **ppanHistogram=NULL,int force=1,GDALProgressFunc callback=NULL,void *callback_data=NULL){
    7104          11 :     return GDALGetDefaultHistogramEx( self, min_ret, max_ret, buckets_ret,
    7105             :                                     ppanHistogram, force,
    7106             :                                     callback, callback_data );
    7107             : }
    7108           5 : SWIGINTERN CPLErr GDALRasterBandShadow_SetDefaultHistogram(GDALRasterBandShadow *self,double min,double max,int buckets_in,GUIntBig *panHistogram_in){
    7109           5 :     return GDALSetDefaultHistogramEx( self, min, max,
    7110             :                                     buckets_in, panHistogram_in );
    7111             : }
    7112          17 : SWIGINTERN bool GDALRasterBandShadow_HasArbitraryOverviews(GDALRasterBandShadow *self){
    7113          34 :       return (GDALHasArbitraryOverviews( self ) != 0) ? true : false;
    7114             :   }
    7115          10 : SWIGINTERN char **GDALRasterBandShadow_GetCategoryNames(GDALRasterBandShadow *self){
    7116          10 :     return GDALGetRasterCategoryNames( self );
    7117             :   }
    7118           2 : SWIGINTERN CPLErr GDALRasterBandShadow_SetCategoryNames(GDALRasterBandShadow *self,char **papszCategoryNames){
    7119           2 :     return GDALSetRasterCategoryNames( self, papszCategoryNames );
    7120             :   }
    7121           1 : SWIGINTERN CPLVirtualMemShadow *GDALRasterBandShadow_GetVirtualMem(GDALRasterBandShadow *self,GDALRWFlag eRWFlag,int nXOff,int nYOff,int nXSize,int nYSize,int nBufXSize,int nBufYSize,GDALDataType eBufType,size_t nCacheSize,size_t nPageSizeHint,char **options=NULL){
    7122           1 :         CPLVirtualMem* vmem = GDALRasterBandGetVirtualMem( self,
    7123             :                                          eRWFlag,
    7124             :                                          nXOff, nYOff,
    7125             :                                          nXSize, nYSize,
    7126             :                                          nBufXSize, nBufYSize,
    7127             :                                          eBufType,
    7128             :                                          0,
    7129             :                                          0,
    7130             :                                          nCacheSize,
    7131             :                                          nPageSizeHint,
    7132             :                                          FALSE,
    7133             :                                          options );
    7134           1 :         if( vmem == NULL )
    7135             :             return NULL;
    7136           1 :         CPLVirtualMemShadow* vmemshadow = (CPLVirtualMemShadow*)calloc(1, sizeof(CPLVirtualMemShadow));
    7137           1 :         vmemshadow->vmem = vmem;
    7138           1 :         vmemshadow->eBufType = eBufType;
    7139           1 :         vmemshadow->bIsBandSequential = TRUE;
    7140           1 :         vmemshadow->bReadOnly = (eRWFlag == GF_Read);
    7141           1 :         vmemshadow->nBufXSize = nBufXSize;
    7142           1 :         vmemshadow->nBufYSize = nBufYSize;
    7143           1 :         vmemshadow->nBandCount = 1;
    7144           1 :         return vmemshadow;
    7145             :     }
    7146          20 : SWIGINTERN CPLVirtualMemShadow *GDALRasterBandShadow_GetVirtualMemAuto(GDALRasterBandShadow *self,GDALRWFlag eRWFlag,char **options=NULL){
    7147          20 :         int            nPixelSpace;
    7148          20 :         GIntBig        nLineSpace;
    7149          20 :         CPLVirtualMem* vmem = GDALGetVirtualMemAuto( self,
    7150             :                                          eRWFlag,
    7151             :                                          &nPixelSpace,
    7152             :                                          &nLineSpace,
    7153             :                                          options );
    7154          20 :         if( vmem == NULL )
    7155             :             return NULL;
    7156          20 :         CPLVirtualMemShadow* vmemshadow = (CPLVirtualMemShadow*)calloc(1, sizeof(CPLVirtualMemShadow));
    7157          20 :         vmemshadow->vmem = vmem;
    7158          20 :         vmemshadow->eBufType = GDALGetRasterDataType( self );
    7159          20 :         vmemshadow->bAuto = TRUE;
    7160          20 :         vmemshadow->bReadOnly = (eRWFlag == GF_Read);
    7161          20 :         vmemshadow->nBandCount = 1;
    7162          20 :         vmemshadow->nPixelSpace = nPixelSpace;
    7163          20 :         vmemshadow->nLineSpace = nLineSpace;
    7164          20 :         vmemshadow->nBufXSize = GDALGetRasterBandXSize(self);
    7165          20 :         vmemshadow->nBufYSize = GDALGetRasterBandYSize(self);
    7166          20 :         return vmemshadow;
    7167             :     }
    7168           1 : SWIGINTERN CPLVirtualMemShadow *GDALRasterBandShadow_GetTiledVirtualMem(GDALRasterBandShadow *self,GDALRWFlag eRWFlag,int nXOff,int nYOff,int nXSize,int nYSize,int nTileXSize,int nTileYSize,GDALDataType eBufType,size_t nCacheSize,char **options=NULL){
    7169           1 :         CPLVirtualMem* vmem = GDALRasterBandGetTiledVirtualMem( self,
    7170             :                                          eRWFlag,
    7171             :                                          nXOff, nYOff,
    7172             :                                          nXSize, nYSize,
    7173             :                                          nTileXSize, nTileYSize,
    7174             :                                          eBufType,
    7175             :                                          nCacheSize,
    7176             :                                          FALSE,
    7177             :                                          options );
    7178           1 :         if( vmem == NULL )
    7179             :             return NULL;
    7180           1 :         CPLVirtualMemShadow* vmemshadow = (CPLVirtualMemShadow*)calloc(1, sizeof(CPLVirtualMemShadow));
    7181           1 :         vmemshadow->vmem = vmem;
    7182           1 :         vmemshadow->eBufType = eBufType;
    7183           1 :         vmemshadow->bIsBandSequential = -1;
    7184           1 :         vmemshadow->bReadOnly = (eRWFlag == GF_Read);
    7185           1 :         vmemshadow->nBufXSize = nXSize;
    7186           1 :         vmemshadow->nBufYSize = nYSize;
    7187           1 :         vmemshadow->eTileOrganization = GTO_BSQ;
    7188           1 :         vmemshadow->nTileXSize = nTileXSize;
    7189           1 :         vmemshadow->nTileYSize = nTileYSize;
    7190           1 :         vmemshadow->nBandCount = 1;
    7191           1 :         return vmemshadow;
    7192             :     }
    7193           8 : SWIGINTERN int GDALRasterBandShadow_GetDataCoverageStatus(GDALRasterBandShadow *self,int nXOff,int nYOff,int nXSize,int nYSize,int nMaskFlagStop=0,double *pdfDataPct=NULL){
    7194           8 :         return GDALGetDataCoverageStatus(self, nXOff, nYOff,
    7195             :                                          nXSize, nYSize,
    7196             :                                          nMaskFlagStop,
    7197             :                                          pdfDataPct);
    7198             :     }
    7199           2 : SWIGINTERN CPLErr GDALRasterBandShadow_AdviseRead(GDALRasterBandShadow *self,int xoff,int yoff,int xsize,int ysize,int *buf_xsize=0,int *buf_ysize=0,GDALDataType *buf_type=0,char **options=NULL){
    7200           2 :     int nxsize = (buf_xsize==0) ? xsize : *buf_xsize;
    7201           2 :     int nysize = (buf_ysize==0) ? ysize : *buf_ysize;
    7202           2 :     GDALDataType ntype;
    7203           2 :     if ( buf_type != 0 ) {
    7204           0 :       ntype = (GDALDataType) *buf_type;
    7205             :     } else {
    7206           2 :       ntype = GDALGetRasterDataType( self );
    7207             :     }
    7208           2 :     return GDALRasterAdviseRead(self, xoff, yoff, xsize, ysize,
    7209           2 :                                 nxsize, nysize, ntype, options);
    7210             : }
    7211          21 : SWIGINTERN GDALMDArrayHS *GDALRasterBandShadow_AsMDArray(GDALRasterBandShadow *self){
    7212          21 :     return GDALRasterBandAsMDArray(self);
    7213             :   }
    7214        6588 : SWIGINTERN void GDALRasterBandShadow__EnablePixelTypeSignedByteWarning(GDALRasterBandShadow *self,bool b){
    7215        6588 :       GDALEnablePixelTypeSignedByteWarning(self, b);
    7216        6588 :   }
    7217        7659 : SWIGINTERN CPLErr GDALRasterBandShadow_ReadRaster1(GDALRasterBandShadow *self,double xoff,double yoff,double xsize,double ysize,void **buf,int *buf_xsize=0,int *buf_ysize=0,GDALDataType *buf_type=0,GIntBig *buf_pixel_space=0,GIntBig *buf_line_space=0,GDALRIOResampleAlg resample_alg=GRIORA_NearestNeighbour,GDALProgressFunc callback=NULL,void *callback_data=NULL,void *inputOutputBuf=NULL){
    7218             : 
    7219        7659 :     *buf = NULL;
    7220             : 
    7221        7659 :     int nxsize = (buf_xsize==0) ? static_cast<int>(xsize) : *buf_xsize;
    7222        7659 :     int nysize = (buf_ysize==0) ? static_cast<int>(ysize) : *buf_ysize;
    7223        7659 :     GDALDataType ntype  = (buf_type==0) ? GDALGetRasterDataType(self)
    7224        7659 :                                         : *buf_type;
    7225        7659 :     GIntBig pixel_space = (buf_pixel_space == 0) ? 0 : *buf_pixel_space;
    7226        7659 :     GIntBig line_space = (buf_line_space == 0) ? 0 : *buf_line_space;
    7227             : 
    7228        7659 :     size_t buf_size = static_cast<size_t>(
    7229        7659 :         ComputeBandRasterIOSize( nxsize, nysize,
    7230        7659 :                                  GDALGetDataTypeSize( ntype ) / 8,
    7231        7659 :                                  pixel_space, line_space, FALSE ) );
    7232        7659 :     if (buf_size == 0)
    7233             :     {
    7234             :         return CE_Failure;
    7235             :     }
    7236             : 
    7237        7658 :     char *data;
    7238        7658 :     Py_buffer view;
    7239        9863 :     if( !readraster_acquirebuffer(buf, inputOutputBuf, buf_size, ntype,
    7240             :                                   GetUseExceptions(), data, view) )
    7241             :     {
    7242             :         return CE_Failure;
    7243             :     }
    7244             : 
    7245             :     /* Should we clear the buffer in case there are hole in it ? */
    7246        7645 :     if( inputOutputBuf == NULL &&
    7247        7633 :         line_space != 0 && pixel_space != 0 && line_space > pixel_space * nxsize )
    7248             :     {
    7249           4 :         memset(data, 0, buf_size);
    7250             :     }
    7251             : 
    7252        7645 :     GDALRasterIOExtraArg sExtraArg;
    7253        7645 :     INIT_RASTERIO_EXTRA_ARG(sExtraArg);
    7254        7645 :     sExtraArg.eResampleAlg = resample_alg;
    7255        7645 :     sExtraArg.pfnProgress = callback;
    7256        7645 :     sExtraArg.pProgressData = callback_data;
    7257        7645 :     int nXOff = (int)(xoff + 0.5);
    7258        7645 :     int nYOff = (int)(yoff + 0.5);
    7259        7645 :     int nXSize = (int)(xsize + 0.5);
    7260        7645 :     int nYSize = (int)(ysize + 0.5);
    7261        7645 :     if( fabs(xoff-nXOff) > 1e-8 || fabs(yoff-nYOff) > 1e-8 ||
    7262        7642 :         fabs(xsize-nXSize) > 1e-8 || fabs(ysize-nYSize) > 1e-8 )
    7263             :     {
    7264           5 :         sExtraArg.bFloatingPointWindowValidity = TRUE;
    7265           5 :         sExtraArg.dfXOff = xoff;
    7266           5 :         sExtraArg.dfYOff = yoff;
    7267           5 :         sExtraArg.dfXSize = xsize;
    7268           5 :         sExtraArg.dfYSize = ysize;
    7269             :     }
    7270             : 
    7271        7645 :     CPLErr eErr = GDALRasterIOEx( self, GF_Read, nXOff, nYOff, nXSize, nYSize,
    7272             :                          data, nxsize, nysize, ntype,
    7273             :                          pixel_space, line_space, &sExtraArg );
    7274             : 
    7275        7645 :     readraster_releasebuffer(eErr, buf, inputOutputBuf, view);
    7276             : 
    7277             :     return eErr;
    7278             :   }
    7279          80 : SWIGINTERN CPLErr GDALRasterBandShadow_ReadBlock(GDALRasterBandShadow *self,int xoff,int yoff,void **buf,void *buf_obj=NULL){
    7280             : 
    7281          80 :     int nBlockXSize, nBlockYSize;
    7282          80 :     GDALGetBlockSize(self, &nBlockXSize, &nBlockYSize);
    7283          80 :     GDALDataType ntype = GDALGetRasterDataType(self);
    7284          80 :     int nDataTypeSize = (GDALGetDataTypeSize(ntype) / 8);
    7285          80 :     size_t buf_size = static_cast<size_t>(nBlockXSize) *
    7286          80 :                                                 nBlockYSize * nDataTypeSize;
    7287             : 
    7288          80 :     *buf = NULL;
    7289             : 
    7290          80 :     char *data;
    7291          80 :     Py_buffer view;
    7292             : 
    7293         104 :     if( !readraster_acquirebuffer(buf, buf_obj, buf_size, ntype,
    7294             :                                   GetUseExceptions(), data, view) )
    7295             :     {
    7296             :         return CE_Failure;
    7297             :     }
    7298             : 
    7299          67 :     CPLErr eErr = GDALReadBlock( self, xoff, yoff, data);
    7300             : 
    7301          67 :     readraster_releasebuffer(eErr, buf, buf_obj, view);
    7302             : 
    7303             :     return eErr;
    7304             :   }
    7305             : 
    7306      846402 : GDALDataType GDALRasterBandShadow_DataType_get( GDALRasterBandShadow *h ) {
    7307      846402 :   return GDALGetRasterDataType( h );
    7308             : }
    7309       14118 : int GDALRasterBandShadow_XSize_get( GDALRasterBandShadow *h ) {
    7310       14118 :   return GDALGetRasterBandXSize( h );
    7311             : }
    7312       13497 : int GDALRasterBandShadow_YSize_get( GDALRasterBandShadow *h ) {
    7313       13497 :   return GDALGetRasterBandYSize( h );
    7314             : }
    7315             : 
    7316          52 : SWIGINTERN GDALColorTableShadow *new_GDALColorTableShadow(GDALPaletteInterp palette=GPI_RGB){
    7317          52 :         return (GDALColorTableShadow*) GDALCreateColorTable(palette);
    7318             :     }
    7319          64 : SWIGINTERN void delete_GDALColorTableShadow(GDALColorTableShadow *self){
    7320          64 :         GDALDestroyColorTable(self);
    7321          64 :     }
    7322          12 : SWIGINTERN GDALColorTableShadow *GDALColorTableShadow_Clone(GDALColorTableShadow *self){
    7323          12 :         return (GDALColorTableShadow*) GDALCloneColorTable (self);
    7324             :     }
    7325           2 : SWIGINTERN GDALPaletteInterp GDALColorTableShadow_GetPaletteInterpretation(GDALColorTableShadow *self){
    7326           2 :         return GDALGetPaletteInterpretation(self);
    7327             :     }
    7328          62 : SWIGINTERN int GDALColorTableShadow_GetColorEntryCount(GDALColorTableShadow *self){
    7329          62 :         return GDALGetColorEntryCount(self);
    7330             :     }
    7331        4643 : SWIGINTERN GDALColorEntry *GDALColorTableShadow_GetColorEntry(GDALColorTableShadow *self,int entry){
    7332        4643 :         return (GDALColorEntry*) GDALGetColorEntry(self, entry);
    7333             :     }
    7334           0 : SWIGINTERN int GDALColorTableShadow_GetColorEntryAsRGB(GDALColorTableShadow *self,int entry,GDALColorEntry *centry){
    7335           0 :         return GDALGetColorEntryAsRGB(self, entry, centry);
    7336             :     }
    7337        1370 : SWIGINTERN void GDALColorTableShadow_SetColorEntry(GDALColorTableShadow *self,int entry,GDALColorEntry const *centry){
    7338        1370 :         GDALSetColorEntry(self, entry, centry);
    7339        1370 :     }
    7340           1 : SWIGINTERN void GDALColorTableShadow_CreateColorRamp(GDALColorTableShadow *self,int nStartIndex,GDALColorEntry const *startcolor,int nEndIndex,GDALColorEntry const *endcolor){
    7341           1 :         GDALCreateColorRamp(self, nStartIndex, startcolor, nEndIndex, endcolor);
    7342           1 :     }
    7343             : 
    7344             : #include "gdalsubdatasetinfo.h"
    7345             : 
    7346          58 : SWIGINTERN void delete_GDALSubdatasetInfoShadow(GDALSubdatasetInfoShadow *self){
    7347          58 :             GDALDestroySubdatasetInfo(reinterpret_cast<GDALSubdatasetInfoH>(self));
    7348          58 :         }
    7349          35 : SWIGINTERN retStringAndCPLFree *GDALSubdatasetInfoShadow_GetPathComponent(GDALSubdatasetInfoShadow *self){
    7350          35 :             return GDALSubdatasetInfoGetPathComponent(reinterpret_cast<GDALSubdatasetInfoH>(self) );
    7351             :         }
    7352          37 : SWIGINTERN retStringAndCPLFree *GDALSubdatasetInfoShadow_GetSubdatasetComponent(GDALSubdatasetInfoShadow *self){
    7353          37 :         return GDALSubdatasetInfoGetSubdatasetComponent(reinterpret_cast<GDALSubdatasetInfoH>(self) );
    7354             :         }
    7355          21 : SWIGINTERN retStringAndCPLFree *GDALSubdatasetInfoShadow_ModifyPathComponent(GDALSubdatasetInfoShadow *self,char const *pszNewFileName){
    7356          21 :         return GDALSubdatasetInfoModifyPathComponent(reinterpret_cast<GDALSubdatasetInfoH>(self), pszNewFileName );
    7357             :         }
    7358             : 
    7359          81 : GDALSubdatasetInfoShadow* GetSubdatasetInfo(const char *pszFileName)
    7360             : {
    7361          81 :     GDALSubdatasetInfoH info { GDALGetSubdatasetInfo(pszFileName) };
    7362             : 
    7363          81 :     if( ! info )
    7364             :     {
    7365          23 :       return nullptr;
    7366             :     }
    7367             : 
    7368             :     return (GDALSubdatasetInfoShadow*)( info );
    7369             : };
    7370             : 
    7371          29 : SWIGINTERN GDALRelationshipShadow *new_GDALRelationshipShadow(char const *name,char const *leftTableName,char const *rightTableName,GDALRelationshipCardinality cardinality){
    7372          29 :         return (GDALRelationshipShadow*)
    7373          29 :         GDALRelationshipCreate(name,
    7374             :                                leftTableName,
    7375             :                                rightTableName,
    7376             :                                cardinality);
    7377             :     }
    7378          29 : SWIGINTERN void delete_GDALRelationshipShadow(GDALRelationshipShadow *self){
    7379          29 :         GDALDestroyRelationship(self);
    7380          29 :     }
    7381          31 : SWIGINTERN char const *GDALRelationshipShadow_GetName(GDALRelationshipShadow *self){
    7382          31 :         return GDALRelationshipGetName( self );
    7383             :     }
    7384          47 : SWIGINTERN GDALRelationshipCardinality GDALRelationshipShadow_GetCardinality(GDALRelationshipShadow *self){
    7385          47 :         return GDALRelationshipGetCardinality( self );
    7386             :     }
    7387          47 : SWIGINTERN char const *GDALRelationshipShadow_GetLeftTableName(GDALRelationshipShadow *self){
    7388          47 :         return GDALRelationshipGetLeftTableName( self );
    7389             :     }
    7390          47 : SWIGINTERN char const *GDALRelationshipShadow_GetRightTableName(GDALRelationshipShadow *self){
    7391          47 :         return GDALRelationshipGetRightTableName( self );
    7392             :     }
    7393          32 : SWIGINTERN char const *GDALRelationshipShadow_GetMappingTableName(GDALRelationshipShadow *self){
    7394          32 :         return GDALRelationshipGetMappingTableName( self );
    7395             :     }
    7396          14 : SWIGINTERN void GDALRelationshipShadow_SetMappingTableName(GDALRelationshipShadow *self,char const *pszName){
    7397          14 :         GDALRelationshipSetMappingTableName( self, pszName );
    7398          14 :     }
    7399          48 : SWIGINTERN char **GDALRelationshipShadow_GetLeftTableFields(GDALRelationshipShadow *self){
    7400          48 :            return GDALRelationshipGetLeftTableFields(self);
    7401             :         }
    7402          48 : SWIGINTERN char **GDALRelationshipShadow_GetRightTableFields(GDALRelationshipShadow *self){
    7403          48 :             return GDALRelationshipGetRightTableFields(self);
    7404             :         }
    7405          37 : SWIGINTERN void GDALRelationshipShadow_SetLeftTableFields(GDALRelationshipShadow *self,char **pFields){
    7406          37 :             GDALRelationshipSetLeftTableFields(self, pFields);
    7407          37 :         }
    7408          38 : SWIGINTERN void GDALRelationshipShadow_SetRightTableFields(GDALRelationshipShadow *self,char **pFields){
    7409          38 :             GDALRelationshipSetRightTableFields(self, pFields);
    7410          38 :         }
    7411          23 : SWIGINTERN char **GDALRelationshipShadow_GetLeftMappingTableFields(GDALRelationshipShadow *self){
    7412          23 :             return GDALRelationshipGetLeftMappingTableFields(self);
    7413             :         }
    7414          23 : SWIGINTERN char **GDALRelationshipShadow_GetRightMappingTableFields(GDALRelationshipShadow *self){
    7415          23 :             return GDALRelationshipGetRightMappingTableFields(self);
    7416             :         }
    7417           9 : SWIGINTERN void GDALRelationshipShadow_SetLeftMappingTableFields(GDALRelationshipShadow *self,char **pFields){
    7418           9 :           GDALRelationshipSetLeftMappingTableFields(self, pFields);
    7419           9 :       }
    7420           9 : SWIGINTERN void GDALRelationshipShadow_SetRightMappingTableFields(GDALRelationshipShadow *self,char **pFields){
    7421           9 :           GDALRelationshipSetRightMappingTableFields(self, pFields);
    7422           9 :       }
    7423          47 : SWIGINTERN GDALRelationshipType GDALRelationshipShadow_GetType(GDALRelationshipShadow *self){
    7424          47 :         return GDALRelationshipGetType( self );
    7425             :     }
    7426          10 : SWIGINTERN void GDALRelationshipShadow_SetType(GDALRelationshipShadow *self,GDALRelationshipType type){
    7427          10 :       return GDALRelationshipSetType( self, type );
    7428             :     }
    7429          14 : SWIGINTERN char const *GDALRelationshipShadow_GetForwardPathLabel(GDALRelationshipShadow *self){
    7430          14 :         return GDALRelationshipGetForwardPathLabel( self );
    7431             :     }
    7432           9 : SWIGINTERN void GDALRelationshipShadow_SetForwardPathLabel(GDALRelationshipShadow *self,char const *pszLabel){
    7433           9 :         GDALRelationshipSetForwardPathLabel( self, pszLabel );
    7434           9 :     }
    7435          14 : SWIGINTERN char const *GDALRelationshipShadow_GetBackwardPathLabel(GDALRelationshipShadow *self){
    7436          14 :         return GDALRelationshipGetBackwardPathLabel( self );
    7437             :     }
    7438           9 : SWIGINTERN void GDALRelationshipShadow_SetBackwardPathLabel(GDALRelationshipShadow *self,char const *pszLabel){
    7439           9 :         GDALRelationshipSetBackwardPathLabel( self, pszLabel );
    7440           9 :     }
    7441          44 : SWIGINTERN char const *GDALRelationshipShadow_GetRelatedTableType(GDALRelationshipShadow *self){
    7442          44 :         return GDALRelationshipGetRelatedTableType( self );
    7443             :     }
    7444          20 : SWIGINTERN void GDALRelationshipShadow_SetRelatedTableType(GDALRelationshipShadow *self,char const *pszType){
    7445          20 :         GDALRelationshipSetRelatedTableType( self, pszType );
    7446          20 :     }
    7447             : 
    7448             : #include "gdalgrid.h"
    7449             : 
    7450             : #ifdef DEBUG
    7451             : typedef struct OGRLayerHS OGRLayerShadow;
    7452             : typedef struct OGRGeometryHS OGRGeometryShadow;
    7453             : #else
    7454             : typedef void OGRLayerShadow;
    7455             : typedef void OGRGeometryShadow;
    7456             : #endif
    7457             : 
    7458             : 
    7459             : static int
    7460        3726 : GDALTermProgress_nocb( double dfProgress, const char * pszMessage=NULL, void *pData=NULL ) {
    7461        3726 :   return GDALTermProgress( dfProgress, pszMessage, pData);
    7462             : }
    7463             : 
    7464             : 
    7465           3 : int  ComputeMedianCutPCT ( GDALRasterBandShadow *red,
    7466             :                               GDALRasterBandShadow *green,
    7467             :                               GDALRasterBandShadow *blue,
    7468             :                               int num_colors,
    7469             :                               GDALColorTableShadow* colors,
    7470             :                               GDALProgressFunc callback = NULL,
    7471             :                               void* callback_data=NULL) {
    7472             : 
    7473           3 :     CPLErrorReset();
    7474             : 
    7475           3 :     int err = GDALComputeMedianCutPCT( red,
    7476             :                                           green,
    7477             :                                           blue,
    7478             :                                           NULL,
    7479             :                                           num_colors,
    7480             :                                           colors,
    7481             :                                           callback,
    7482             :                                           callback_data);
    7483             : 
    7484           3 :     return err;
    7485             : }
    7486             : 
    7487             : 
    7488           6 : int  DitherRGB2PCT ( GDALRasterBandShadow *red,
    7489             :                      GDALRasterBandShadow *green,
    7490             :                      GDALRasterBandShadow *blue,
    7491             :                      GDALRasterBandShadow *target,
    7492             :                      GDALColorTableShadow *colors,
    7493             :                      GDALProgressFunc callback = NULL,
    7494             :                      void* callback_data=NULL) {
    7495             : 
    7496           6 :     CPLErrorReset();
    7497           6 :     int err;
    7498           6 :     err = GDALDitherRGB2PCT(  red,
    7499             :                                   green,
    7500             :                                   blue,
    7501             :                                   target,
    7502             :                                   colors,
    7503             :                                   callback,
    7504             :                                   callback_data);
    7505             : 
    7506           6 :     return err;
    7507             : }
    7508             : 
    7509             : 
    7510          62 : CPLErr  ReprojectImage ( GDALDatasetShadow *src_ds,
    7511             :                          GDALDatasetShadow *dst_ds,
    7512             :                          const char *src_wkt=NULL,
    7513             :                          const char *dst_wkt=NULL,
    7514             :                          GDALResampleAlg eResampleAlg=GRA_NearestNeighbour,
    7515             :                          double WarpMemoryLimit=0.0,
    7516             :                          double maxerror = 0.0,
    7517             :        GDALProgressFunc callback = NULL,
    7518             :                        void* callback_data=NULL,
    7519             :                          char** options = NULL ) {
    7520             : 
    7521          62 :     CPLErrorReset();
    7522             : 
    7523          62 :     GDALWarpOptions* psOptions = NULL;
    7524          62 :     if( options != NULL )
    7525             :     {
    7526           1 :         psOptions = GDALCreateWarpOptions();
    7527           1 :         psOptions->papszWarpOptions = CSLDuplicate(options);
    7528             :     }
    7529             : 
    7530          62 :     CPLErr err = GDALReprojectImage( src_ds,
    7531             :                                      src_wkt,
    7532             :                                      dst_ds,
    7533             :                                      dst_wkt,
    7534             :                                      eResampleAlg,
    7535             :                                      WarpMemoryLimit,
    7536             :                                      maxerror,
    7537             :                                      callback,
    7538             :                                      callback_data,
    7539             :                                      psOptions);
    7540             : 
    7541          62 :     if( psOptions != NULL )
    7542           1 :         GDALDestroyWarpOptions(psOptions);
    7543             : 
    7544          62 :     return err;
    7545             : }
    7546             : 
    7547             : 
    7548           6 : int  ComputeProximity( GDALRasterBandShadow *srcBand,
    7549             :                        GDALRasterBandShadow *proximityBand,
    7550             :                        char **options = NULL,
    7551             :                        GDALProgressFunc callback=NULL,
    7552             :                        void* callback_data=NULL) {
    7553             : 
    7554           6 :     CPLErrorReset();
    7555             : 
    7556           6 :     return GDALComputeProximity( srcBand, proximityBand, options,
    7557           6 :                                  callback, callback_data );
    7558             : }
    7559             : 
    7560             : 
    7561          41 : int  RasterizeLayer( GDALDatasetShadow *dataset,
    7562             :                  int bands, int *band_list,
    7563             :                  OGRLayerShadow *layer,
    7564             :                  void *pfnTransformer = NULL,
    7565             :                  void *pTransformArg = NULL,
    7566             :      int burn_values = 0, double *burn_values_list = NULL,
    7567             :                  char **options = NULL,
    7568             :                  GDALProgressFunc callback=NULL,
    7569             :                  void* callback_data=NULL) {
    7570             : 
    7571          41 :     CPLErr eErr;
    7572             : 
    7573          41 :     CPLErrorReset();
    7574             : 
    7575          41 :     if( burn_values == 0 )
    7576             :     {
    7577           1 :         burn_values_list = (double *) CPLMalloc(sizeof(double)*bands);
    7578           4 :         for( int i = 0; i < bands; i++ )
    7579           3 :             burn_values_list[i] = 255.0;
    7580             :     }
    7581          40 :     else if( burn_values != bands )
    7582             :     {
    7583           0 :         CPLError( CE_Failure, CPLE_AppDefined,
    7584             :                   "Did not get the expected number of burn values in RasterizeLayer()" );
    7585           0 :         return CE_Failure;
    7586             :     }
    7587             : 
    7588          41 :     eErr = GDALRasterizeLayers( dataset, bands, band_list,
    7589             :                                 1, &layer,
    7590             :                                 (GDALTransformerFunc) pfnTransformer,
    7591             :                                 pTransformArg,
    7592             :                                 burn_values_list, options,
    7593             :                                 callback, callback_data );
    7594             : 
    7595          41 :     if( burn_values == 0 )
    7596           1 :         CPLFree( burn_values_list );
    7597             : 
    7598          41 :     return eErr;
    7599             : }
    7600             : 
    7601             : 
    7602          21 : int  Polygonize( GDALRasterBandShadow *srcBand,
    7603             :          GDALRasterBandShadow *maskBand,
    7604             :              OGRLayerShadow *outLayer,
    7605             :                  int iPixValField,
    7606             :                  char **options = NULL,
    7607             :                  GDALProgressFunc callback=NULL,
    7608             :                  void* callback_data=NULL) {
    7609             : 
    7610          21 :     CPLErrorReset();
    7611             : 
    7612          21 :     return GDALPolygonize( srcBand, maskBand, outLayer, iPixValField,
    7613          21 :                            options, callback, callback_data );
    7614             : }
    7615             : 
    7616             : 
    7617           1 : int  FPolygonize( GDALRasterBandShadow *srcBand,
    7618             :                  GDALRasterBandShadow *maskBand,
    7619             :                  OGRLayerShadow *outLayer,
    7620             :                  int iPixValField,
    7621             :                  char **options = NULL,
    7622             :                  GDALProgressFunc callback=NULL,
    7623             :                  void* callback_data=NULL) {
    7624             : 
    7625           1 :     CPLErrorReset();
    7626             : 
    7627           1 :     return GDALFPolygonize( srcBand, maskBand, outLayer, iPixValField,
    7628           1 :                            options, callback, callback_data );
    7629             : }
    7630             : 
    7631             : 
    7632          29 : int  FillNodata( GDALRasterBandShadow *targetBand,
    7633             :          GDALRasterBandShadow *maskBand,
    7634             :                  double maxSearchDist,
    7635             :                  int smoothingIterations,
    7636             :                  char **options = NULL,
    7637             :                  GDALProgressFunc callback=NULL,
    7638             :                  void* callback_data=NULL) {
    7639             : 
    7640          29 :     CPLErrorReset();
    7641             : 
    7642          29 :     return GDALFillNodata( targetBand, maskBand, maxSearchDist,
    7643             :                0, smoothingIterations, options,
    7644          29 :          callback, callback_data );
    7645             : }
    7646             : 
    7647             : 
    7648          10 : int  SieveFilter( GDALRasterBandShadow *srcBand,
    7649             :           GDALRasterBandShadow *maskBand,
    7650             :               GDALRasterBandShadow *dstBand,
    7651             :                   int threshold, int connectedness=4,
    7652             :                   char **options = NULL,
    7653             :                   GDALProgressFunc callback=NULL,
    7654             :                   void* callback_data=NULL) {
    7655             : 
    7656          10 :     CPLErrorReset();
    7657             : 
    7658          10 :     return GDALSieveFilter( srcBand, maskBand, dstBand,
    7659             :                             threshold, connectedness,
    7660          10 :                             options, callback, callback_data );
    7661             : }
    7662             : 
    7663             : 
    7664           2 : int  RegenerateOverviews( GDALRasterBandShadow *srcBand,
    7665             :             int overviewBandCount,
    7666             :                           GDALRasterBandShadow **overviewBands,
    7667             :                           const char *resampling = "average",
    7668             :                           GDALProgressFunc callback=NULL,
    7669             :                           void* callback_data=NULL) {
    7670             : 
    7671           2 :     CPLErrorReset();
    7672             : 
    7673           2 :     return GDALRegenerateOverviews( srcBand, overviewBandCount, overviewBands,
    7674           2 :                   resampling ? resampling : "average", callback, callback_data );
    7675             : }
    7676             : 
    7677             : 
    7678         244 : int  RegenerateOverview( GDALRasterBandShadow *srcBand,
    7679             :                           GDALRasterBandShadow *overviewBand,
    7680             :                           const char *resampling = "average",
    7681             :                           GDALProgressFunc callback=NULL,
    7682             :                           void* callback_data=NULL) {
    7683             : 
    7684         244 :     CPLErrorReset();
    7685             : 
    7686         244 :     return GDALRegenerateOverviews( srcBand, 1, &overviewBand,
    7687         244 :                   resampling ? resampling : "average", callback, callback_data );
    7688             : }
    7689             : 
    7690             : 
    7691           3 : int ContourGenerate( GDALRasterBandShadow *srcBand,
    7692             :                      double contourInterval,
    7693             :                      double contourBase,
    7694             :                      int fixedLevelCount,
    7695             :                      double *fixedLevels,
    7696             :                      int useNoData,
    7697             :                      double noDataValue,
    7698             :                      OGRLayerShadow* dstLayer,
    7699             :                      int idField,
    7700             :                      int elevField,
    7701             :                      GDALProgressFunc callback = NULL,
    7702             :                      void* callback_data = NULL)
    7703             : {
    7704           3 :     CPLErr eErr;
    7705             : 
    7706           3 :     CPLErrorReset();
    7707             : 
    7708           3 :     eErr =  GDALContourGenerate( srcBand,
    7709             :                                  contourInterval,
    7710             :                                  contourBase,
    7711             :                                  fixedLevelCount,
    7712             :                                  fixedLevels,
    7713             :                                  useNoData,
    7714             :                                  noDataValue,
    7715             :                                  dstLayer,
    7716             :                                  idField,
    7717             :                                  elevField,
    7718             :                                  callback,
    7719             :                                  callback_data);
    7720             : 
    7721           3 :     return eErr;
    7722             : }
    7723             : 
    7724             : 
    7725          14 : int ContourGenerateEx( GDALRasterBandShadow *srcBand,
    7726             :                        OGRLayerShadow* dstLayer,
    7727             :                        char** options = NULL,
    7728             :                        GDALProgressFunc callback = NULL,
    7729             :                        void* callback_data = NULL )
    7730             : {
    7731          14 :     CPLErr eErr;
    7732             : 
    7733          14 :     CPLErrorReset();
    7734             : 
    7735          14 :     eErr =  GDALContourGenerateEx( srcBand,
    7736             :                                    dstLayer,
    7737             :                                    options,
    7738             :                                    callback,
    7739             :                                    callback_data);
    7740             : 
    7741          14 :     return eErr;
    7742             : }
    7743             : 
    7744             : 
    7745           1 : GDALDatasetShadow *ViewshedGenerate( GDALRasterBandShadow *srcBand,
    7746             :                         const char* driverName,
    7747             :                         const char* targetRasterName,
    7748             :                         char** creationOptions,
    7749             :                         double observerX, double observerY, double observerHeight,
    7750             :                         double targetHeight, double visibleVal, double invisibleVal,
    7751             :                         double outOfRangeVal,  double noDataVal, double dfCurvCoeff,
    7752             :                         GDALViewshedMode mode, double maxDistance,
    7753             :                         GDALProgressFunc callback = NULL, void* callback_data = NULL,
    7754             :                         GDALViewshedOutputType heightMode = GVOT_NORMAL,
    7755             :                         char** options = NULL)
    7756             : {
    7757           1 :     GDALDatasetShadow* ds = GDALViewshedGenerate( srcBand,
    7758             :                                  driverName,
    7759             :                                  targetRasterName,
    7760             :                                  creationOptions,
    7761             :                                  observerX,
    7762             :                                  observerY,
    7763             :                                  observerHeight,
    7764             :                                  targetHeight,
    7765             :                                  visibleVal,
    7766             :                                  invisibleVal,
    7767             :                                  outOfRangeVal,
    7768             :                                  noDataVal,
    7769             :                                  dfCurvCoeff,
    7770             :                                  mode,
    7771             :                                  maxDistance,
    7772             :                                  callback,
    7773             :                                  callback_data,
    7774             :                                  heightMode,
    7775             :                                  options);
    7776           1 :   if (ds == 0) {
    7777             :     /*throw CPLGetLastErrorMsg(); causes a SWIG_exception later*/
    7778             :   }
    7779           1 :   return ds;
    7780             : }
    7781             : 
    7782             : 
    7783           5 : void IsLineOfSightVisible(GDALRasterBandShadow *band,
    7784             :                           int xA, int yA, double zA,
    7785             :                           int xB, int yB, double zB,
    7786             :                           bool *pbVisible, int *pnXIntersection, int *pnYIntersection,
    7787             :                           char** options = NULL)
    7788             : {
    7789           5 :     *pbVisible = GDALIsLineOfSightVisible(band, xA, yA, zA, xB, yB, zB, pnXIntersection, pnYIntersection, options);
    7790           5 : }
    7791             : 
    7792             : 
    7793          20 : GDALDatasetShadow *AutoCreateWarpedVRT( GDALDatasetShadow *src_ds,
    7794             :                                         const char *src_wkt = 0,
    7795             :                                         const char *dst_wkt = 0,
    7796             :                                         GDALResampleAlg eResampleAlg = GRA_NearestNeighbour,
    7797             :                                         double maxerror = 0.0 ) {
    7798          20 :   GDALDatasetShadow *ds = GDALAutoCreateWarpedVRT( src_ds, src_wkt,
    7799             :                                                    dst_wkt,
    7800             :                                                    eResampleAlg,
    7801             :                                                    maxerror,
    7802             :                                                    0 );
    7803          20 :   if (ds == 0) {
    7804             :     /*throw CPLGetLastErrorMsg(); causes a SWIG_exception later*/
    7805             :   }
    7806          20 :   return ds;
    7807             : 
    7808             : }
    7809             : 
    7810             : 
    7811           8 : GDALDatasetShadow*  CreatePansharpenedVRT( const char* pszXML,
    7812             :                             GDALRasterBandShadow* panchroBand,
    7813             :                             int nInputSpectralBands,
    7814             :                             GDALRasterBandShadow** ahInputSpectralBands )
    7815             : {
    7816           8 :     CPLErrorReset();
    7817             : 
    7818           8 :     return (GDALDatasetShadow*)GDALCreatePansharpenedVRT( pszXML, panchroBand,
    7819           8 :                                       nInputSpectralBands, ahInputSpectralBands );
    7820             : }
    7821             : 
    7822          68 : SWIGINTERN void delete_GDALTransformerInfoShadow(GDALTransformerInfoShadow *self){
    7823          68 :     GDALDestroyTransformer( self );
    7824          68 :   }
    7825           0 : SWIGINTERN int GDALTransformerInfoShadow_TransformPoint__SWIG_0(GDALTransformerInfoShadow *self,int bDstToSrc,double inout[3]){
    7826           0 :     int nRet, nSuccess = TRUE;
    7827             : 
    7828           0 :     nRet = GDALUseTransformer( self, bDstToSrc,
    7829             :                                1, &inout[0], &inout[1], &inout[2],
    7830             :                                &nSuccess );
    7831             : 
    7832           0 :     return nRet && nSuccess;
    7833             :   }
    7834        8674 : SWIGINTERN int GDALTransformerInfoShadow_TransformPoint__SWIG_1(GDALTransformerInfoShadow *self,double argout[3],int bDstToSrc,double x,double y,double z=0.0){
    7835        8674 :     int nRet, nSuccess = TRUE;
    7836             : 
    7837        8674 :     argout[0] = x;
    7838        8674 :     argout[1] = y;
    7839        8674 :     argout[2] = z;
    7840        8674 :     nRet = GDALUseTransformer( self, bDstToSrc,
    7841             :                                1, &argout[0], &argout[1], &argout[2],
    7842             :                                &nSuccess );
    7843             : 
    7844        8674 :     return nRet && nSuccess;
    7845             :   }
    7846             : 
    7847             : static int
    7848           4 : DecomposeSequenceOfCoordinates( PyObject *seq, int nCount, double *x, double *y, double *z )
    7849             : {
    7850          35 :   for( int i = 0; i<nCount; ++i )
    7851             :   {
    7852             : 
    7853          31 :     PyObject *o = PySequence_GetItem(seq, i);
    7854          31 :     if ( !PySequence_Check(o) )
    7855             :     {
    7856           0 :         Py_DECREF(o);
    7857           0 :         PyErr_SetString(PyExc_TypeError, "not a sequence");
    7858             : 
    7859           0 :         return FALSE;
    7860             :     }
    7861             : 
    7862          31 :     Py_ssize_t len = PySequence_Size(o);
    7863             : 
    7864          31 :     if (len == 2 || len == 3)
    7865             :     {
    7866          31 :         PyObject *o1 = PySequence_GetItem(o, 0);
    7867          31 :         if (!PyNumber_Check(o1))
    7868             :         {
    7869           0 :             Py_DECREF(o); Py_DECREF(o1);
    7870           0 :             PyErr_SetString(PyExc_TypeError, "not a number");
    7871             : 
    7872           0 :             return FALSE;
    7873             :         }
    7874          31 :         x[i] = PyFloat_AsDouble(o1);
    7875          31 :         Py_DECREF(o1);
    7876             : 
    7877          31 :         o1 = PySequence_GetItem(o, 1);
    7878          31 :         if (!PyNumber_Check(o1))
    7879             :         {
    7880           0 :             Py_DECREF(o); Py_DECREF(o1);
    7881           0 :             PyErr_SetString(PyExc_TypeError, "not a number");
    7882             : 
    7883           0 :             return FALSE;
    7884             :         }
    7885          31 :         y[i] = PyFloat_AsDouble(o1);
    7886          31 :         Py_DECREF(o1);
    7887             : 
    7888             :         /* The 3rd coordinate is optional, default 0.0 */
    7889          31 :         if (len == 3)
    7890             :         {
    7891           0 :             o1 = PySequence_GetItem(o, 2);
    7892           0 :             if (!PyNumber_Check(o1))
    7893             :             {
    7894           0 :                 Py_DECREF(o); Py_DECREF(o1);
    7895           0 :                 PyErr_SetString(PyExc_TypeError, "not a number");
    7896             : 
    7897           0 :                 return FALSE;
    7898             :             }
    7899           0 :             z[i] = PyFloat_AsDouble(o1);
    7900           0 :             Py_DECREF(o1);
    7901             :         }
    7902             :         else
    7903             :         {
    7904          31 :             z[i] = 0.0;
    7905             :         }
    7906             :     }
    7907             :     else
    7908             :     {
    7909           0 :         Py_DECREF(o);
    7910           0 :         PyErr_SetString(PyExc_TypeError, "invalid coordinate");
    7911             : 
    7912           0 :         return FALSE;
    7913             :     }
    7914             : 
    7915          31 :     Py_DECREF(o);
    7916             :   }
    7917             : 
    7918             :   return TRUE;
    7919             : }
    7920             : 
    7921           4 : SWIGINTERN int GDALTransformerInfoShadow_TransformPoints(GDALTransformerInfoShadow *self,int bDstToSrc,int nCount,double *x,double *y,double *z,int *panSuccess){
    7922           4 :     int nRet;
    7923             : 
    7924           8 :     nRet = GDALUseTransformer( self, bDstToSrc, nCount, x, y, z, panSuccess );
    7925             : 
    7926           4 :     return nRet;
    7927             :   }
    7928           1 : SWIGINTERN int GDALTransformerInfoShadow_TransformGeolocations(GDALTransformerInfoShadow *self,GDALRasterBandShadow *xBand,GDALRasterBandShadow *yBand,GDALRasterBandShadow *zBand,GDALProgressFunc callback=NULL,void *callback_data=NULL,char **options=NULL){
    7929             : 
    7930           1 :     CPLErrorReset();
    7931             : 
    7932           1 :     return GDALTransformGeolocations( xBand, yBand, zBand,
    7933             :                                       GDALUseTransformer, self,
    7934           1 :                                     callback, callback_data, options );
    7935             :   }
    7936             : 
    7937          76 :   GDALTransformerInfoShadow* Transformer( GDALDatasetShadow *src, GDALDatasetShadow *dst,
    7938             :                              char **options ) {
    7939          76 :     GDALTransformerInfoShadow *obj = (GDALTransformerInfoShadow*)
    7940          76 :        GDALCreateGenImgProjTransformer2( (GDALDatasetH)src, (GDALDatasetH)dst,
    7941             :                                          options );
    7942          76 :     return obj;
    7943             :   }
    7944             : 
    7945             : 
    7946             : typedef struct
    7947             : {
    7948             :   int     width;
    7949             :   int     height;
    7950             :   double  xmin;
    7951             :   double  ymin;
    7952             :   double  xmax;
    7953             :   double  ymax;
    7954             :   double  geotransform[6];
    7955             : } SuggestedWarpOutputRes;
    7956             : 
    7957           3 : SWIGINTERN void delete_SuggestedWarpOutputRes(SuggestedWarpOutputRes *self){
    7958           3 :     CPLFree(self);
    7959           3 :   }
    7960           2 : SWIGINTERN void SuggestedWarpOutputRes_GetGeotransform(SuggestedWarpOutputRes *self,double geotransform[6]){
    7961           2 :       memcpy(geotransform, self->geotransform, 6 * sizeof(double));
    7962             :   }
    7963             : 
    7964             : #ifdef SWIGPYTHON
    7965           1 :   SuggestedWarpOutputRes* SuggestedWarpOutputFromTransformer(
    7966             :                                                GDALDatasetShadow *src,
    7967             :                                                GDALTransformerInfoShadow* transformer )
    7968             : #else
    7969             :   SuggestedWarpOutputRes* SuggestedWarpOutput( GDALDatasetShadow *src,
    7970             :                                                GDALTransformerInfoShadow* transformer )
    7971             : #endif
    7972             :   {
    7973           1 :     SuggestedWarpOutputRes* res = (SuggestedWarpOutputRes*)CPLMalloc(sizeof(SuggestedWarpOutputRes));
    7974           1 :     double extent[4];
    7975           1 :     if( GDALSuggestedWarpOutput2(src, GDALGenImgProjTransform, transformer,
    7976           1 :                                  res->geotransform,&(res->width), &(res->height),
    7977             :                                  extent, 0) != CE_None )
    7978             :     {
    7979           0 :         CPLFree(res);
    7980           0 :         return NULL;
    7981             :     }
    7982           1 :     res->xmin = extent[0];
    7983           1 :     res->ymin = extent[1];
    7984           1 :     res->xmax = extent[2];
    7985           1 :     res->ymax = extent[3];
    7986           1 :     return res;
    7987             :   }
    7988             : 
    7989             : 
    7990             : #ifdef SWIGPYTHON
    7991           2 :   SuggestedWarpOutputRes* SuggestedWarpOutputFromOptions( GDALDatasetShadow *src,
    7992             :                                                           char** options )
    7993             : #else
    7994             :   SuggestedWarpOutputRes* SuggestedWarpOutput( GDALDatasetShadow *src,
    7995             :                                                char** options )
    7996             : #endif
    7997             :   {
    7998           2 :     SuggestedWarpOutputRes* res = (SuggestedWarpOutputRes*)CPLMalloc(sizeof(SuggestedWarpOutputRes));
    7999           2 :     double extent[4];
    8000           2 :     void* pTransformArg = GDALCreateGenImgProjTransformer2( src, NULL, options );
    8001           2 :     if( GDALSuggestedWarpOutput2(src, GDALGenImgProjTransform, pTransformArg,
    8002           2 :                                  res->geotransform,&(res->width), &(res->height),
    8003             :                                  extent, 0) != CE_None )
    8004             :     {
    8005           0 :         GDALDestroyTransformer(pTransformArg);
    8006           0 :         CPLFree(res);
    8007           0 :         return NULL;
    8008             :     }
    8009           2 :     GDALDestroyTransformer(pTransformArg);
    8010           2 :     res->xmin = extent[0];
    8011           2 :     res->ymin = extent[1];
    8012           2 :     res->xmax = extent[2];
    8013           2 :     res->ymax = extent[3];
    8014           2 :     return res;
    8015             :   }
    8016             : 
    8017             : 
    8018          23 : GDALDatasetShadow* ApplyVerticalShiftGrid( GDALDatasetShadow *src_ds,
    8019             :                                            GDALDatasetShadow *grid_ds,
    8020             :                                            bool inverse = false,
    8021             :                                            double srcUnitToMeter = 1.0,
    8022             :                                            double dstUnitToMeter = 1.0,
    8023             :                                            char** options = NULL ) {
    8024          23 :   GDALDatasetShadow *ds = GDALApplyVerticalShiftGrid( src_ds, grid_ds,
    8025             :                                                       inverse,
    8026             :                                                       srcUnitToMeter,
    8027             :                                                       dstUnitToMeter,
    8028             :                                                       options );
    8029          23 :   return ds;
    8030             : 
    8031             : }
    8032             : 
    8033             : 
    8034          56 : GIntBig wrapper_GDALGetCacheMax()
    8035             : {
    8036          56 :     return GDALGetCacheMax64();
    8037             : }
    8038             : 
    8039             : 
    8040           2 : GIntBig wrapper_GDALGetCacheUsed()
    8041             : {
    8042           2 :     return GDALGetCacheUsed64();
    8043             : }
    8044             : 
    8045             : 
    8046          76 : void wrapper_GDALSetCacheMax(GIntBig nBytes)
    8047             : {
    8048          76 :     return GDALSetCacheMax64(nBytes);
    8049             : }
    8050             : 
    8051             : 
    8052             : /************************************************************************/
    8053             : /*                          XMLTreeToPyList()                           */
    8054             : /************************************************************************/
    8055       26996 : static PyObject *XMLTreeToPyList( CPLXMLNode *psTree )
    8056             : {
    8057       26996 :     PyObject *pyList;
    8058       26996 :     int      nChildCount = 0, iChild;
    8059       26996 :     CPLXMLNode *psChild;
    8060             : 
    8061       26996 :     if( psTree == NULL )
    8062             :         return Py_None;
    8063             : 
    8064       26983 :     for( psChild = psTree->psChild;
    8065       53900 :          psChild != NULL;
    8066       26917 :          psChild = psChild->psNext )
    8067       26917 :         nChildCount++;
    8068             : 
    8069       26983 :     pyList = PyList_New(nChildCount+2);
    8070             : 
    8071       26983 :     PyList_SetItem( pyList, 0, Py_BuildValue( "i", (int) psTree->eType ) );
    8072       26983 :     PyList_SetItem( pyList, 1, Py_BuildValue( "s", psTree->pszValue ) );
    8073             : 
    8074       26983 :     for( psChild = psTree->psChild, iChild = 2;
    8075       53900 :          psChild != NULL;
    8076       26917 :          psChild = psChild->psNext, iChild++ )
    8077             :     {
    8078       26917 :         PyList_SetItem( pyList, iChild, XMLTreeToPyList( psChild ) );
    8079             :     }
    8080             : 
    8081             :     return pyList;
    8082             : }
    8083             : 
    8084             : 
    8085             : /************************************************************************/
    8086             : /*                          PyListToXMLTree()                           */
    8087             : /************************************************************************/
    8088         339 : static CPLXMLNode *PyListToXMLTree( PyObject *pyList )
    8089             : 
    8090             : {
    8091         339 :     int      nChildCount = 0, iChild, nType = 0;
    8092         339 :     CPLXMLNode *psThisNode;
    8093         339 :     CPLXMLNode *psChild;
    8094         339 :     char       *pszText = NULL;
    8095             : 
    8096         339 :     if( PyList_Size(pyList) > INT_MAX )
    8097             :     {
    8098           0 :         PyErr_SetString(PyExc_TypeError,"Error in input XMLTree." );
    8099           0 :         return NULL;
    8100             :     }
    8101         339 :     nChildCount = static_cast<int>(PyList_Size(pyList)) - 2;
    8102         339 :     if( nChildCount < 0 )
    8103             :     {
    8104           0 :         PyErr_SetString(PyExc_TypeError,"Error in input XMLTree." );
    8105           0 :         return NULL;
    8106             :     }
    8107             : 
    8108         339 :     CPL_IGNORE_RET_VAL(PyArg_Parse( PyList_GET_ITEM(pyList,0), "i", &nType ));
    8109         339 :     CPL_IGNORE_RET_VAL(PyArg_Parse( PyList_GET_ITEM(pyList,1), "s", &pszText ));
    8110             : 
    8111             :     /* Detect "pseudo" root */
    8112         339 :     if (nType == CXT_Element && pszText != NULL && strlen(pszText) == 0 && nChildCount == 2)
    8113             :     {
    8114           2 :         PyObject *pyFirst = PyList_GET_ITEM(pyList, 2);
    8115           2 :         if (PyList_Size(pyFirst) < 2)
    8116             :         {
    8117           0 :             PyErr_SetString(PyExc_TypeError,"Error in input XMLTree." );
    8118           2 :             return NULL;
    8119             :         }
    8120           2 :         int nTypeFirst = 0;
    8121           2 :         char* pszTextFirst = NULL;
    8122           2 :         CPL_IGNORE_RET_VAL(PyArg_Parse( PyList_GET_ITEM(pyFirst,0), "i", &nTypeFirst ));
    8123           2 :         CPL_IGNORE_RET_VAL(PyArg_Parse( PyList_GET_ITEM(pyFirst,1), "s", &pszTextFirst ));
    8124           2 :         if (nTypeFirst == CXT_Element && pszTextFirst != NULL && pszTextFirst[0] == '?')
    8125             :         {
    8126           2 :             psThisNode = PyListToXMLTree( PyList_GET_ITEM(pyList,2) );
    8127           2 :             psThisNode->psNext = PyListToXMLTree( PyList_GET_ITEM(pyList,3) );
    8128           2 :             return psThisNode;
    8129             :         }
    8130             :     }
    8131             : 
    8132         337 :     psThisNode = CPLCreateXMLNode( NULL, (CPLXMLNodeType) nType, pszText );
    8133             : 
    8134         659 :     for( iChild = 0; iChild < nChildCount; iChild++ )
    8135             :     {
    8136         322 :         psChild = PyListToXMLTree( PyList_GET_ITEM(pyList,iChild+2) );
    8137         322 :         CPLAddXMLChild( psThisNode, psChild );
    8138             :     }
    8139             : 
    8140             :     return psThisNode;
    8141             : }
    8142             : 
    8143             : 
    8144           9 : retStringAndCPLFree *GetJPEG2000StructureAsString( const char* pszFilename, char** options = NULL )
    8145             : {
    8146           9 :     CPLXMLNode* psNode = GDALGetJPEG2000Structure(pszFilename, options);
    8147           9 :     if( psNode == NULL )
    8148             :         return NULL;
    8149           9 :     char* pszXML = CPLSerializeXMLTree(psNode);
    8150           9 :     CPLDestroyXMLNode(psNode);
    8151           9 :     return pszXML;
    8152             : }
    8153             : 
    8154             : 
    8155         373 : int GetDriverCount() {
    8156         373 :   return GDALGetDriverCount();
    8157             : }
    8158             : 
    8159             : 
    8160             : static
    8161       10912 : GDALDriverShadow* GetDriverByName( char const *name ) {
    8162       10912 :   return (GDALDriverShadow*) GDALGetDriverByName( name );
    8163             : }
    8164             : 
    8165             : 
    8166       85801 : GDALDriverShadow* GetDriver( int i ) {
    8167       85801 :   return (GDALDriverShadow*) GDALGetDriver( i );
    8168             : }
    8169             : 
    8170             : 
    8171       21359 : GDALDatasetShadow* Open( char const* utf8_path, GDALAccess eAccess = GA_ReadOnly ) {
    8172       21359 :   CPLErrorReset();
    8173       21359 :   GDALDatasetShadow *ds = GDALOpen( utf8_path, eAccess );
    8174             : #ifndef SWIGPYTHON
    8175             :   if( ds != NULL && CPLGetLastErrorType() == CE_Failure )
    8176             :   {
    8177             :       if ( GDALDereferenceDataset( ds ) <= 0 )
    8178             :           GDALClose(ds);
    8179             :       ds = NULL;
    8180             :   }
    8181             : #endif
    8182       21359 :   return (GDALDatasetShadow*) ds;
    8183             : }
    8184             : 
    8185             : 
    8186        4581 : GDALDatasetShadow* OpenEx( char const* utf8_path, unsigned int nOpenFlags = 0,
    8187             :                            char** allowed_drivers = NULL, char** open_options = NULL,
    8188             :                            char** sibling_files = NULL ) {
    8189        4581 :   CPLErrorReset();
    8190             : #ifdef SWIGPYTHON
    8191        5625 :   if( GetUseExceptions() )
    8192        1289 :       nOpenFlags |= GDAL_OF_VERBOSE_ERROR;
    8193             : #endif
    8194        4581 :   GDALDatasetShadow *ds = GDALOpenEx( utf8_path, nOpenFlags, allowed_drivers,
    8195             :                                       open_options, sibling_files );
    8196             : #ifndef SWIGPYTHON
    8197             :   if( ds != NULL && CPLGetLastErrorType() == CE_Failure )
    8198             :   {
    8199             :       if ( GDALDereferenceDataset( ds ) <= 0 )
    8200             :           GDALClose(ds);
    8201             :       ds = NULL;
    8202             :   }
    8203             : #endif
    8204        4581 :   return (GDALDatasetShadow*) ds;
    8205             : }
    8206             : 
    8207             : 
    8208        5053 : GDALDatasetShadow* OpenShared( char const* utf8_path, GDALAccess eAccess = GA_ReadOnly ) {
    8209        5053 :   CPLErrorReset();
    8210        5053 :   GDALDatasetShadow *ds = GDALOpenShared( utf8_path, eAccess );
    8211             : #ifndef SWIGPYTHON
    8212             :   if( ds != NULL && CPLGetLastErrorType() == CE_Failure )
    8213             :   {
    8214             :       if ( GDALDereferenceDataset( ds ) <= 0 )
    8215             :           GDALClose(ds);
    8216             :       ds = NULL;
    8217             :   }
    8218             : #endif
    8219        5053 :   return (GDALDatasetShadow*) ds;
    8220             : }
    8221             : 
    8222             : 
    8223          11 : GDALDriverShadow *IdentifyDriver( const char *utf8_path,
    8224             :                                   char **papszSiblings = NULL ) {
    8225          11 :     return (GDALDriverShadow *) GDALIdentifyDriver( utf8_path,
    8226          11 :                                               papszSiblings );
    8227             : }
    8228             : 
    8229             : 
    8230           6 : GDALDriverShadow *IdentifyDriverEx( const char* utf8_path,
    8231             :                                     unsigned int nIdentifyFlags = 0,
    8232             :                                     char** allowed_drivers = NULL,
    8233             :                                     char** sibling_files = NULL )
    8234             : {
    8235           6 :     return  (GDALDriverShadow *) GDALIdentifyDriverEx( utf8_path,
    8236             :                                                 nIdentifyFlags,
    8237             :                                                 allowed_drivers,
    8238           6 :                                                 sibling_files );
    8239             : }
    8240             : 
    8241             : 
    8242         190 :   char **GeneralCmdLineProcessor( char **papszArgv, int nOptions = 0 ) {
    8243         190 :     int nResArgCount;
    8244             : 
    8245         190 :     if( papszArgv == NULL )
    8246             :         return NULL;
    8247             : 
    8248         380 :     bool bReloadDrivers = ( CSLFindString(papszArgv, "GDAL_SKIP") >= 0 ||
    8249         190 :                             CSLFindString(papszArgv, "OGR_SKIP") >= 0 );
    8250             : 
    8251         190 :     nResArgCount =
    8252         190 :       GDALGeneralCmdLineProcessor( CSLCount(papszArgv), &papszArgv, nOptions );
    8253             : 
    8254         190 :     if( bReloadDrivers )
    8255             :     {
    8256           0 :         GDALAllRegister();
    8257             :     }
    8258             : 
    8259         190 :     if( nResArgCount <= 0 )
    8260             :         return NULL;
    8261             :     else
    8262         175 :         return papszArgv;
    8263             :   }
    8264             : 
    8265             : 
    8266             : #include "gdal_utils.h"
    8267             : 
    8268             : 
    8269             : 
    8270             : #include <vector>
    8271             : 
    8272             : class ErrorStruct
    8273             : {
    8274             :   public:
    8275             :     CPLErr type;
    8276             :     CPLErrorNum no;
    8277             :     char* msg;
    8278             : 
    8279             :     ErrorStruct() = delete;
    8280         168 :     ErrorStruct(CPLErr eErrIn, CPLErrorNum noIn, const char* msgIn) :
    8281         168 :         type(eErrIn), no(noIn), msg(msgIn ? CPLStrdup(msgIn) : nullptr) {}
    8282          47 :     ErrorStruct(const ErrorStruct& other):
    8283          47 :         type(other.type), no(other.no),
    8284          47 :         msg(other.msg ? CPLStrdup(other.msg) : nullptr) {}
    8285         215 :     ~ErrorStruct() { CPLFree(msg); }
    8286             : };
    8287             : 
    8288         168 : static void CPL_STDCALL StackingErrorHandler( CPLErr eErr, CPLErrorNum no,
    8289             :                                            const char* msg )
    8290             : {
    8291         168 :     std::vector<ErrorStruct>* paoErrors =
    8292             :         static_cast<std::vector<ErrorStruct> *>(
    8293         168 :             CPLGetErrorHandlerUserData());
    8294         168 :     paoErrors->emplace_back(eErr, no, msg);
    8295         168 : }
    8296             : 
    8297        1796 : static void PushStackingErrorHandler(std::vector<ErrorStruct>* paoErrors)
    8298             : {
    8299        1796 :     CPLPushErrorHandlerEx(StackingErrorHandler, paoErrors);
    8300        1796 :     CPLSetCurrentErrorHandlerCatchDebug(false);
    8301        1796 : }
    8302             : 
    8303        1796 : static void PopStackingErrorHandler(std::vector<ErrorStruct>* paoErrors, bool bSuccess)
    8304             : {
    8305        1796 :     CPLPopErrorHandler();
    8306             : 
    8307             :     // If the operation was successful, do not emit regular CPLError()
    8308             :     // of CE_Failure type that would be caught by the PythonBindingErrorHandler
    8309             :     // and turned into
    8310             :     // Python exceptions. Just emit them with the previous error handler
    8311             : 
    8312        1964 :     for( size_t iError = 0; iError < paoErrors->size(); ++iError )
    8313             :     {
    8314         168 :         CPLErr eErrClass = (*paoErrors)[iError].type;
    8315         168 :         if( bSuccess && eErrClass == CE_Failure )
    8316             :         {
    8317           9 :             CPLCallPreviousHandler( eErrClass,
    8318           9 :                                 (*paoErrors)[iError].no,
    8319           9 :                                 (*paoErrors)[iError].msg );
    8320             :         }
    8321             :         else
    8322             :         {
    8323         159 :             CPLError( eErrClass,
    8324         159 :                     (*paoErrors)[iError].no,
    8325             :                     "%s",
    8326         159 :                     (*paoErrors)[iError].msg );
    8327             :         }
    8328             :     }
    8329             : 
    8330        1796 :     if( bSuccess )
    8331             :     {
    8332        1718 :         CPLErrorReset();
    8333             :     }
    8334        1796 : }
    8335             : 
    8336          44 : SWIGINTERN GDALInfoOptions *new_GDALInfoOptions(char **options){
    8337          44 :         return GDALInfoOptionsNew(options, NULL);
    8338             :     }
    8339          44 : SWIGINTERN void delete_GDALInfoOptions(GDALInfoOptions *self){
    8340          44 :         GDALInfoOptionsFree( self );
    8341          44 :     }
    8342          33 : SWIGINTERN GDALVectorInfoOptions *new_GDALVectorInfoOptions(char **options){
    8343          33 :         return GDALVectorInfoOptionsNew(options, NULL);
    8344             :     }
    8345          33 : SWIGINTERN void delete_GDALVectorInfoOptions(GDALVectorInfoOptions *self){
    8346          33 :         GDALVectorInfoOptionsFree( self );
    8347          33 :     }
    8348          21 : SWIGINTERN GDALMultiDimInfoOptions *new_GDALMultiDimInfoOptions(char **options){
    8349          21 :         return GDALMultiDimInfoOptionsNew(options, NULL);
    8350             :     }
    8351          21 : SWIGINTERN void delete_GDALMultiDimInfoOptions(GDALMultiDimInfoOptions *self){
    8352          21 :         GDALMultiDimInfoOptionsFree( self );
    8353          21 :     }
    8354         969 : SWIGINTERN GDALTranslateOptions *new_GDALTranslateOptions(char **options){
    8355         969 :         return GDALTranslateOptionsNew(options, NULL);
    8356             :     }
    8357         965 : SWIGINTERN void delete_GDALTranslateOptions(GDALTranslateOptions *self){
    8358         965 :         GDALTranslateOptionsFree( self );
    8359         965 :     }
    8360             : 
    8361         967 : GDALDatasetShadow* wrapper_GDALTranslate( const char* dest,
    8362             :                                       GDALDatasetShadow* dataset,
    8363             :                                       GDALTranslateOptions* translateOptions,
    8364             :                                       GDALProgressFunc callback=NULL,
    8365             :                                       void* callback_data=NULL)
    8366             : {
    8367         967 :     int usageError; /* ignored */
    8368         967 :     bool bFreeOptions = false;
    8369         967 :     if( callback )
    8370             :     {
    8371           2 :         if( translateOptions == NULL )
    8372             :         {
    8373           1 :             bFreeOptions = true;
    8374           1 :             translateOptions = GDALTranslateOptionsNew(NULL, NULL);
    8375             :         }
    8376           2 :         GDALTranslateOptionsSetProgress(translateOptions, callback, callback_data);
    8377             :     }
    8378             : #ifdef SWIGPYTHON
    8379         967 :     std::vector<ErrorStruct> aoErrors;
    8380        1367 :     if( GetUseExceptions() )
    8381             :     {
    8382         402 :         PushStackingErrorHandler(&aoErrors);
    8383             :     }
    8384             : #endif
    8385         967 :     GDALDatasetH hDSRet = GDALTranslate(dest, dataset, translateOptions, &usageError);
    8386         967 :     if( bFreeOptions )
    8387           1 :         GDALTranslateOptionsFree(translateOptions);
    8388             : #ifdef SWIGPYTHON
    8389        1367 :     if( GetUseExceptions() )
    8390             :     {
    8391         402 :         PopStackingErrorHandler(&aoErrors, hDSRet != NULL);
    8392             :     }
    8393             : #endif
    8394         967 :     return hDSRet;
    8395             : }
    8396             : 
    8397         681 : SWIGINTERN GDALWarpAppOptions *new_GDALWarpAppOptions(char **options){
    8398         681 :         return GDALWarpAppOptionsNew(options, NULL);
    8399             :     }
    8400         680 : SWIGINTERN void delete_GDALWarpAppOptions(GDALWarpAppOptions *self){
    8401         680 :         GDALWarpAppOptionsFree( self );
    8402         680 :     }
    8403             : 
    8404             : 
    8405          86 : int wrapper_GDALWarpDestDS( GDALDatasetShadow* dstDS,
    8406             :                             int object_list_count, GDALDatasetShadow** poObjects,
    8407             :                             GDALWarpAppOptions* warpAppOptions,
    8408             :                             GDALProgressFunc callback=NULL,
    8409             :                             void* callback_data=NULL)
    8410             : {
    8411          86 :     int usageError; /* ignored */
    8412          86 :     bool bFreeOptions = false;
    8413          86 :     if( callback )
    8414             :     {
    8415           1 :         if( warpAppOptions == NULL )
    8416             :         {
    8417           1 :             bFreeOptions = true;
    8418           1 :             warpAppOptions = GDALWarpAppOptionsNew(NULL, NULL);
    8419             :         }
    8420           1 :         GDALWarpAppOptionsSetProgress(warpAppOptions, callback, callback_data);
    8421             :     }
    8422             : #ifdef SWIGPYTHON
    8423          86 :     std::vector<ErrorStruct> aoErrors;
    8424         172 :     if( GetUseExceptions() )
    8425             :     {
    8426          86 :         PushStackingErrorHandler(&aoErrors);
    8427             :     }
    8428             : #endif
    8429          86 :     bool bRet = (GDALWarp(NULL, dstDS, object_list_count, poObjects, warpAppOptions, &usageError) != NULL);
    8430          86 :     if( bFreeOptions )
    8431           1 :         GDALWarpAppOptionsFree(warpAppOptions);
    8432             : #ifdef SWIGPYTHON
    8433         172 :     if( GetUseExceptions() )
    8434             :     {
    8435          86 :         PopStackingErrorHandler(&aoErrors, bRet);
    8436             :     }
    8437             : #endif
    8438          86 :     return bRet;
    8439             : }
    8440             : 
    8441             : 
    8442         597 : GDALDatasetShadow* wrapper_GDALWarpDestName( const char* dest,
    8443             :                                              int object_list_count, GDALDatasetShadow** poObjects,
    8444             :                                              GDALWarpAppOptions* warpAppOptions,
    8445             :                                              GDALProgressFunc callback=NULL,
    8446             :                                              void* callback_data=NULL)
    8447             : {
    8448         597 :     int usageError; /* ignored */
    8449         597 :     bool bFreeOptions = false;
    8450         597 :     if( callback )
    8451             :     {
    8452           2 :         if( warpAppOptions == NULL )
    8453             :         {
    8454           1 :             bFreeOptions = true;
    8455           1 :             warpAppOptions = GDALWarpAppOptionsNew(NULL, NULL);
    8456             :         }
    8457           2 :         GDALWarpAppOptionsSetProgress(warpAppOptions, callback, callback_data);
    8458             :     }
    8459             : #ifdef SWIGPYTHON
    8460         597 :     std::vector<ErrorStruct> aoErrors;
    8461        1178 :     if( GetUseExceptions() )
    8462             :     {
    8463         581 :         PushStackingErrorHandler(&aoErrors);
    8464             :     }
    8465             : #endif
    8466         597 :     GDALDatasetH hDSRet = GDALWarp(dest, NULL, object_list_count, poObjects, warpAppOptions, &usageError);
    8467         597 :     if( bFreeOptions )
    8468           1 :         GDALWarpAppOptionsFree(warpAppOptions);
    8469             : #ifdef SWIGPYTHON
    8470        1178 :     if( GetUseExceptions() )
    8471             :     {
    8472         581 :         PopStackingErrorHandler(&aoErrors, hDSRet != NULL);
    8473             :     }
    8474             : #endif
    8475         597 :     return hDSRet;
    8476             : }
    8477             : 
    8478         560 : SWIGINTERN GDALVectorTranslateOptions *new_GDALVectorTranslateOptions(char **options){
    8479         560 :         return GDALVectorTranslateOptionsNew(options, NULL);
    8480             :     }
    8481         534 : SWIGINTERN void delete_GDALVectorTranslateOptions(GDALVectorTranslateOptions *self){
    8482         534 :         GDALVectorTranslateOptionsFree( self );
    8483         534 :     }
    8484             : 
    8485          12 : int wrapper_GDALVectorTranslateDestDS( GDALDatasetShadow* dstDS,
    8486             :                                        GDALDatasetShadow* srcDS,
    8487             :                             GDALVectorTranslateOptions* options,
    8488             :                             GDALProgressFunc callback=NULL,
    8489             :                             void* callback_data=NULL)
    8490             : {
    8491          12 :     int usageError; /* ignored */
    8492          12 :     bool bFreeOptions = false;
    8493          12 :     if( callback )
    8494             :     {
    8495           0 :         if( options == NULL )
    8496             :         {
    8497           0 :             bFreeOptions = true;
    8498           0 :             options = GDALVectorTranslateOptionsNew(NULL, NULL);
    8499             :         }
    8500           0 :         GDALVectorTranslateOptionsSetProgress(options, callback, callback_data);
    8501             :     }
    8502             : #ifdef SWIGPYTHON
    8503          12 :     std::vector<ErrorStruct> aoErrors;
    8504          23 :     if( GetUseExceptions() )
    8505             :     {
    8506          11 :         PushStackingErrorHandler(&aoErrors);
    8507             :     }
    8508             : #endif
    8509          12 :     bool bRet = (GDALVectorTranslate(NULL, dstDS, 1, &srcDS, options, &usageError) != NULL);
    8510          12 :     if( bFreeOptions )
    8511           0 :         GDALVectorTranslateOptionsFree(options);
    8512             : #ifdef SWIGPYTHON
    8513          23 :     if( GetUseExceptions() )
    8514             :     {
    8515          11 :         PopStackingErrorHandler(&aoErrors, bRet);
    8516             :     }
    8517             : #endif
    8518          12 :     return bRet;
    8519             : }
    8520             : 
    8521             : 
    8522         510 : GDALDatasetShadow* wrapper_GDALVectorTranslateDestName( const char* dest,
    8523             :                                              GDALDatasetShadow* srcDS,
    8524             :                                              GDALVectorTranslateOptions* options,
    8525             :                                              GDALProgressFunc callback=NULL,
    8526             :                                              void* callback_data=NULL)
    8527             : {
    8528         510 :     int usageError; /* ignored */
    8529         510 :     bool bFreeOptions = false;
    8530         510 :     if( callback )
    8531             :     {
    8532           2 :         if( options == NULL )
    8533             :         {
    8534           0 :             bFreeOptions = true;
    8535           0 :             options = GDALVectorTranslateOptionsNew(NULL, NULL);
    8536             :         }
    8537           2 :         GDALVectorTranslateOptionsSetProgress(options, callback, callback_data);
    8538             :     }
    8539             : #ifdef SWIGPYTHON
    8540         510 :     std::vector<ErrorStruct> aoErrors;
    8541         866 :     if( GetUseExceptions() )
    8542             :     {
    8543         367 :         PushStackingErrorHandler(&aoErrors);
    8544             :     }
    8545             : #endif
    8546         510 :     GDALDatasetH hDSRet = GDALVectorTranslate(dest, NULL, 1, &srcDS, options, &usageError);
    8547         510 :     if( bFreeOptions )
    8548           0 :         GDALVectorTranslateOptionsFree(options);
    8549             : #ifdef SWIGPYTHON
    8550         866 :     if( GetUseExceptions() )
    8551             :     {
    8552         367 :         PopStackingErrorHandler(&aoErrors, hDSRet != NULL);
    8553             :     }
    8554             : #endif
    8555         510 :     return hDSRet;
    8556             : }
    8557             : 
    8558          39 : SWIGINTERN GDALDEMProcessingOptions *new_GDALDEMProcessingOptions(char **options){
    8559          39 :         return GDALDEMProcessingOptionsNew(options, NULL);
    8560             :     }
    8561          39 : SWIGINTERN void delete_GDALDEMProcessingOptions(GDALDEMProcessingOptions *self){
    8562          39 :         GDALDEMProcessingOptionsFree( self );
    8563          39 :     }
    8564             : 
    8565          39 : GDALDatasetShadow* wrapper_GDALDEMProcessing( const char* dest,
    8566             :                                       GDALDatasetShadow* dataset,
    8567             :                                       const char* pszProcessing,
    8568             :                                       const char* pszColorFilename,
    8569             :                                       GDALDEMProcessingOptions* options,
    8570             :                                       GDALProgressFunc callback=NULL,
    8571             :                                       void* callback_data=NULL)
    8572             : {
    8573          39 :     int usageError; /* ignored */
    8574          39 :     bool bFreeOptions = false;
    8575          39 :     if( callback )
    8576             :     {
    8577           0 :         if( options == NULL )
    8578             :         {
    8579           0 :             bFreeOptions = true;
    8580           0 :             options = GDALDEMProcessingOptionsNew(NULL, NULL);
    8581             :         }
    8582           0 :         GDALDEMProcessingOptionsSetProgress(options, callback, callback_data);
    8583             :     }
    8584             : #ifdef SWIGPYTHON
    8585          39 :     std::vector<ErrorStruct> aoErrors;
    8586          78 :     if( GetUseExceptions() )
    8587             :     {
    8588          39 :         PushStackingErrorHandler(&aoErrors);
    8589             :     }
    8590             : #endif
    8591          39 :     GDALDatasetH hDSRet = GDALDEMProcessing(dest, dataset, pszProcessing, pszColorFilename, options, &usageError);
    8592          39 :     if( bFreeOptions )
    8593           0 :         GDALDEMProcessingOptionsFree(options);
    8594             : #ifdef SWIGPYTHON
    8595          78 :     if( GetUseExceptions() )
    8596             :     {
    8597          39 :         PopStackingErrorHandler(&aoErrors, hDSRet != NULL);
    8598             :     }
    8599             : #endif
    8600          39 :     return hDSRet;
    8601             : }
    8602             : 
    8603          45 : SWIGINTERN GDALNearblackOptions *new_GDALNearblackOptions(char **options){
    8604          45 :         return GDALNearblackOptionsNew(options, NULL);
    8605             :     }
    8606          45 : SWIGINTERN void delete_GDALNearblackOptions(GDALNearblackOptions *self){
    8607          45 :         GDALNearblackOptionsFree( self );
    8608          45 :     }
    8609             : 
    8610           2 : int wrapper_GDALNearblackDestDS( GDALDatasetShadow* dstDS,
    8611             :                             GDALDatasetShadow* srcDS,
    8612             :                             GDALNearblackOptions* options,
    8613             :                             GDALProgressFunc callback=NULL,
    8614             :                             void* callback_data=NULL)
    8615             : {
    8616           2 :     int usageError; /* ignored */
    8617           2 :     bool bFreeOptions = false;
    8618           2 :     if( callback )
    8619             :     {
    8620           0 :         if( options == NULL )
    8621             :         {
    8622           0 :             bFreeOptions = true;
    8623           0 :             options = GDALNearblackOptionsNew(NULL, NULL);
    8624             :         }
    8625           0 :         GDALNearblackOptionsSetProgress(options, callback, callback_data);
    8626             :     }
    8627             : #ifdef SWIGPYTHON
    8628           2 :     std::vector<ErrorStruct> aoErrors;
    8629           4 :     if( GetUseExceptions() )
    8630             :     {
    8631           2 :         PushStackingErrorHandler(&aoErrors);
    8632             :     }
    8633             : #endif
    8634           2 :     bool bRet = (GDALNearblack(NULL, dstDS, srcDS, options, &usageError) != NULL);
    8635           2 :     if( bFreeOptions )
    8636           0 :         GDALNearblackOptionsFree(options);
    8637             : #ifdef SWIGPYTHON
    8638           4 :     if( GetUseExceptions() )
    8639             :     {
    8640           2 :         PopStackingErrorHandler(&aoErrors, bRet);
    8641             :     }
    8642             : #endif
    8643           2 :     return bRet;
    8644             : }
    8645             : 
    8646             : 
    8647          43 : GDALDatasetShadow* wrapper_GDALNearblackDestName( const char* dest,
    8648             :                                              GDALDatasetShadow* srcDS,
    8649             :                                              GDALNearblackOptions* options,
    8650             :                                              GDALProgressFunc callback=NULL,
    8651             :                                              void* callback_data=NULL)
    8652             : {
    8653          43 :     int usageError; /* ignored */
    8654          43 :     bool bFreeOptions = false;
    8655          43 :     if( callback )
    8656             :     {
    8657           0 :         if( options == NULL )
    8658             :         {
    8659           0 :             bFreeOptions = true;
    8660           0 :             options = GDALNearblackOptionsNew(NULL, NULL);
    8661             :         }
    8662           0 :         GDALNearblackOptionsSetProgress(options, callback, callback_data);
    8663             :     }
    8664             : #ifdef SWIGPYTHON
    8665          43 :     std::vector<ErrorStruct> aoErrors;
    8666          86 :     if( GetUseExceptions() )
    8667             :     {
    8668          43 :         PushStackingErrorHandler(&aoErrors);
    8669             :     }
    8670             : #endif
    8671          43 :     GDALDatasetH hDSRet = GDALNearblack(dest, NULL, srcDS, options, &usageError);
    8672          43 :     if( bFreeOptions )
    8673           0 :         GDALNearblackOptionsFree(options);
    8674             : #ifdef SWIGPYTHON
    8675          86 :     if( GetUseExceptions() )
    8676             :     {
    8677          43 :         PopStackingErrorHandler(&aoErrors, hDSRet != NULL);
    8678             :     }
    8679             : #endif
    8680          43 :     return hDSRet;
    8681             : }
    8682             : 
    8683          52 : SWIGINTERN GDALGridOptions *new_GDALGridOptions(char **options){
    8684          52 :         return GDALGridOptionsNew(options, NULL);
    8685             :     }
    8686          52 : SWIGINTERN void delete_GDALGridOptions(GDALGridOptions *self){
    8687          52 :         GDALGridOptionsFree( self );
    8688          52 :     }
    8689             : 
    8690          52 : GDALDatasetShadow* wrapper_GDALGrid( const char* dest,
    8691             :                                       GDALDatasetShadow* dataset,
    8692             :                                       GDALGridOptions* options,
    8693             :                                       GDALProgressFunc callback=NULL,
    8694             :                                       void* callback_data=NULL)
    8695             : {
    8696          52 :     int usageError; /* ignored */
    8697          52 :     bool bFreeOptions = false;
    8698          52 :     if( callback )
    8699             :     {
    8700           0 :         if( options == NULL )
    8701             :         {
    8702           0 :             bFreeOptions = true;
    8703           0 :             options = GDALGridOptionsNew(NULL, NULL);
    8704             :         }
    8705           0 :         GDALGridOptionsSetProgress(options, callback, callback_data);
    8706             :     }
    8707             : #ifdef SWIGPYTHON
    8708          52 :     std::vector<ErrorStruct> aoErrors;
    8709         103 :     if( GetUseExceptions() )
    8710             :     {
    8711          51 :         PushStackingErrorHandler(&aoErrors);
    8712             :     }
    8713             : #endif
    8714          52 :     GDALDatasetH hDSRet = GDALGrid(dest, dataset, options, &usageError);
    8715          52 :     if( bFreeOptions )
    8716           0 :         GDALGridOptionsFree(options);
    8717             : #ifdef SWIGPYTHON
    8718         103 :     if( GetUseExceptions() )
    8719             :     {
    8720          51 :         PopStackingErrorHandler(&aoErrors, hDSRet != NULL);
    8721             :     }
    8722             : #endif
    8723          52 :     return hDSRet;
    8724             : }
    8725             : 
    8726          19 : SWIGINTERN GDALRasterizeOptions *new_GDALRasterizeOptions(char **options){
    8727          19 :         return GDALRasterizeOptionsNew(options, NULL);
    8728             :     }
    8729          19 : SWIGINTERN void delete_GDALRasterizeOptions(GDALRasterizeOptions *self){
    8730          19 :         GDALRasterizeOptionsFree( self );
    8731          19 :     }
    8732             : 
    8733          12 : int wrapper_GDALRasterizeDestDS( GDALDatasetShadow* dstDS,
    8734             :                             GDALDatasetShadow* srcDS,
    8735             :                             GDALRasterizeOptions* options,
    8736             :                             GDALProgressFunc callback=NULL,
    8737             :                             void* callback_data=NULL)
    8738             : {
    8739          12 :     int usageError; /* ignored */
    8740          12 :     bool bFreeOptions = false;
    8741          12 :     if( callback )
    8742             :     {
    8743           0 :         if( options == NULL )
    8744             :         {
    8745           0 :             bFreeOptions = true;
    8746           0 :             options = GDALRasterizeOptionsNew(NULL, NULL);
    8747             :         }
    8748           0 :         GDALRasterizeOptionsSetProgress(options, callback, callback_data);
    8749             :     }
    8750             : #ifdef SWIGPYTHON
    8751          12 :     std::vector<ErrorStruct> aoErrors;
    8752          24 :     if( GetUseExceptions() )
    8753             :     {
    8754          12 :         PushStackingErrorHandler(&aoErrors);
    8755             :     }
    8756             : #endif
    8757          12 :     bool bRet = (GDALRasterize(NULL, dstDS, srcDS, options, &usageError) != NULL);
    8758          12 :     if( bFreeOptions )
    8759           0 :         GDALRasterizeOptionsFree(options);
    8760             : #ifdef SWIGPYTHON
    8761          24 :     if( GetUseExceptions() )
    8762             :     {
    8763          12 :         PopStackingErrorHandler(&aoErrors, bRet);
    8764             :     }
    8765             : #endif
    8766          12 :     return bRet;
    8767             : }
    8768             : 
    8769             : 
    8770           7 : GDALDatasetShadow* wrapper_GDALRasterizeDestName( const char* dest,
    8771             :                                              GDALDatasetShadow* srcDS,
    8772             :                                              GDALRasterizeOptions* options,
    8773             :                                              GDALProgressFunc callback=NULL,
    8774             :                                              void* callback_data=NULL)
    8775             : {
    8776           7 :     int usageError; /* ignored */
    8777           7 :     bool bFreeOptions = false;
    8778           7 :     if( callback )
    8779             :     {
    8780           0 :         if( options == NULL )
    8781             :         {
    8782           0 :             bFreeOptions = true;
    8783           0 :             options = GDALRasterizeOptionsNew(NULL, NULL);
    8784             :         }
    8785           0 :         GDALRasterizeOptionsSetProgress(options, callback, callback_data);
    8786             :     }
    8787             : #ifdef SWIGPYTHON
    8788           7 :     std::vector<ErrorStruct> aoErrors;
    8789          14 :     if( GetUseExceptions() )
    8790             :     {
    8791           7 :         PushStackingErrorHandler(&aoErrors);
    8792             :     }
    8793             : #endif
    8794           7 :     GDALDatasetH hDSRet = GDALRasterize(dest, NULL, srcDS, options, &usageError);
    8795           7 :     if( bFreeOptions )
    8796           0 :         GDALRasterizeOptionsFree(options);
    8797             : #ifdef SWIGPYTHON
    8798          14 :     if( GetUseExceptions() )
    8799             :     {
    8800           7 :         PopStackingErrorHandler(&aoErrors, hDSRet != NULL);
    8801             :     }
    8802             : #endif
    8803           7 :     return hDSRet;
    8804             : }
    8805             : 
    8806          39 : SWIGINTERN GDALFootprintOptions *new_GDALFootprintOptions(char **options){
    8807          39 :         return GDALFootprintOptionsNew(options, NULL);
    8808             :     }
    8809          37 : SWIGINTERN void delete_GDALFootprintOptions(GDALFootprintOptions *self){
    8810          37 :         GDALFootprintOptionsFree( self );
    8811          37 :     }
    8812             : 
    8813           3 : int wrapper_GDALFootprintDestDS( GDALDatasetShadow* dstDS,
    8814             :                             GDALDatasetShadow* srcDS,
    8815             :                             GDALFootprintOptions* options,
    8816             :                             GDALProgressFunc callback=NULL,
    8817             :                             void* callback_data=NULL)
    8818             : {
    8819           3 :     int usageError; /* ignored */
    8820           3 :     bool bFreeOptions = false;
    8821           3 :     if( callback )
    8822             :     {
    8823           0 :         if( options == NULL )
    8824             :         {
    8825           0 :             bFreeOptions = true;
    8826           0 :             options = GDALFootprintOptionsNew(NULL, NULL);
    8827             :         }
    8828           0 :         GDALFootprintOptionsSetProgress(options, callback, callback_data);
    8829             :     }
    8830             : #ifdef SWIGPYTHON
    8831           3 :     std::vector<ErrorStruct> aoErrors;
    8832           6 :     if( GetUseExceptions() )
    8833             :     {
    8834           3 :         PushStackingErrorHandler(&aoErrors);
    8835             :     }
    8836             : #endif
    8837           3 :     bool bRet = (GDALFootprint(NULL, dstDS, srcDS, options, &usageError) != NULL);
    8838           3 :     if( bFreeOptions )
    8839           0 :         GDALFootprintOptionsFree(options);
    8840             : #ifdef SWIGPYTHON
    8841           6 :     if( GetUseExceptions() )
    8842             :     {
    8843           3 :         PopStackingErrorHandler(&aoErrors, bRet);
    8844             :     }
    8845             : #endif
    8846           3 :     return bRet;
    8847             : }
    8848             : 
    8849             : 
    8850          34 : GDALDatasetShadow* wrapper_GDALFootprintDestName( const char* dest,
    8851             :                                              GDALDatasetShadow* srcDS,
    8852             :                                              GDALFootprintOptions* options,
    8853             :                                              GDALProgressFunc callback=NULL,
    8854             :                                              void* callback_data=NULL)
    8855             : {
    8856          34 :     int usageError; /* ignored */
    8857          34 :     bool bFreeOptions = false;
    8858          34 :     if( callback )
    8859             :     {
    8860           0 :         if( options == NULL )
    8861             :         {
    8862           0 :             bFreeOptions = true;
    8863           0 :             options = GDALFootprintOptionsNew(NULL, NULL);
    8864             :         }
    8865           0 :         GDALFootprintOptionsSetProgress(options, callback, callback_data);
    8866             :     }
    8867             : #ifdef SWIGPYTHON
    8868          34 :     std::vector<ErrorStruct> aoErrors;
    8869          68 :     if( GetUseExceptions() )
    8870             :     {
    8871          34 :         PushStackingErrorHandler(&aoErrors);
    8872             :     }
    8873             : #endif
    8874          34 :     GDALDatasetH hDSRet = GDALFootprint(dest, NULL, srcDS, options, &usageError);
    8875          34 :     if( bFreeOptions )
    8876           0 :         GDALFootprintOptionsFree(options);
    8877             : #ifdef SWIGPYTHON
    8878          68 :     if( GetUseExceptions() )
    8879             :     {
    8880          34 :         PopStackingErrorHandler(&aoErrors, hDSRet != NULL);
    8881             :     }
    8882             : #endif
    8883          34 :     return hDSRet;
    8884             : }
    8885             : 
    8886         126 : SWIGINTERN GDALBuildVRTOptions *new_GDALBuildVRTOptions(char **options){
    8887         126 :         return GDALBuildVRTOptionsNew(options, NULL);
    8888             :     }
    8889         126 : SWIGINTERN void delete_GDALBuildVRTOptions(GDALBuildVRTOptions *self){
    8890         126 :         GDALBuildVRTOptionsFree( self );
    8891         126 :     }
    8892             : 
    8893          60 : GDALDatasetShadow* wrapper_GDALBuildVRT_objects( const char* dest,
    8894             :                                              int object_list_count, GDALDatasetShadow** poObjects,
    8895             :                                              GDALBuildVRTOptions* options,
    8896             :                                              GDALProgressFunc callback=NULL,
    8897             :                                              void* callback_data=NULL)
    8898             : {
    8899          60 :     int usageError; /* ignored */
    8900          60 :     bool bFreeOptions = false;
    8901          60 :     if( callback )
    8902             :     {
    8903           0 :         if( options == NULL )
    8904             :         {
    8905           0 :             bFreeOptions = true;
    8906           0 :             options = GDALBuildVRTOptionsNew(NULL, NULL);
    8907             :         }
    8908           0 :         GDALBuildVRTOptionsSetProgress(options, callback, callback_data);
    8909             :     }
    8910             : #ifdef SWIGPYTHON
    8911          60 :     std::vector<ErrorStruct> aoErrors;
    8912         106 :     if( GetUseExceptions() )
    8913             :     {
    8914          48 :         PushStackingErrorHandler(&aoErrors);
    8915             :     }
    8916             : #endif
    8917          60 :     GDALDatasetH hDSRet = GDALBuildVRT(dest, object_list_count, poObjects, NULL, options, &usageError);
    8918          60 :     if( bFreeOptions )
    8919           0 :         GDALBuildVRTOptionsFree(options);
    8920             : #ifdef SWIGPYTHON
    8921         106 :     if( GetUseExceptions() )
    8922             :     {
    8923          48 :         PopStackingErrorHandler(&aoErrors, hDSRet != NULL);
    8924             :     }
    8925             : #endif
    8926          60 :     return hDSRet;
    8927             : }
    8928             : 
    8929             : 
    8930          66 : GDALDatasetShadow* wrapper_GDALBuildVRT_names( const char* dest,
    8931             :                                          char ** source_filenames,
    8932             :                                          GDALBuildVRTOptions* options,
    8933             :                                          GDALProgressFunc callback=NULL,
    8934             :                                          void* callback_data=NULL)
    8935             : {
    8936          66 :     int usageError; /* ignored */
    8937          66 :     bool bFreeOptions = false;
    8938          66 :     if( callback )
    8939             :     {
    8940           1 :         if( options == NULL )
    8941             :         {
    8942           0 :             bFreeOptions = true;
    8943           0 :             options = GDALBuildVRTOptionsNew(NULL, NULL);
    8944             :         }
    8945           1 :         GDALBuildVRTOptionsSetProgress(options, callback, callback_data);
    8946             :     }
    8947             : #ifdef SWIGPYTHON
    8948          66 :     std::vector<ErrorStruct> aoErrors;
    8949         128 :     if( GetUseExceptions() )
    8950             :     {
    8951          64 :         PushStackingErrorHandler(&aoErrors);
    8952             :     }
    8953             : #endif
    8954          66 :     GDALDatasetH hDSRet = GDALBuildVRT(dest, CSLCount(source_filenames), NULL, source_filenames, options, &usageError);
    8955          66 :     if( bFreeOptions )
    8956           0 :         GDALBuildVRTOptionsFree(options);
    8957             : #ifdef SWIGPYTHON
    8958         128 :     if( GetUseExceptions() )
    8959             :     {
    8960          64 :         PopStackingErrorHandler(&aoErrors, hDSRet != NULL);
    8961             :     }
    8962             : #endif
    8963          66 :     return hDSRet;
    8964             : }
    8965             : 
    8966          22 : SWIGINTERN GDALTileIndexOptions *new_GDALTileIndexOptions(char **options){
    8967          22 :         return GDALTileIndexOptionsNew(options, NULL);
    8968             :     }
    8969          22 : SWIGINTERN void delete_GDALTileIndexOptions(GDALTileIndexOptions *self){
    8970          22 :         GDALTileIndexOptionsFree( self );
    8971          22 :     }
    8972             : 
    8973          22 : GDALDatasetShadow* wrapper_TileIndex_names( const char* dest,
    8974             :                                             char ** source_filenames,
    8975             :                                             GDALTileIndexOptions* options,
    8976             :                                             GDALProgressFunc callback=NULL,
    8977             :                                             void* callback_data=NULL)
    8978             : {
    8979          22 :     int usageError; /* ignored */
    8980             : #if 0
    8981             :     bool bFreeOptions = false;
    8982             :     if( callback )
    8983             :     {
    8984             :         if( options == NULL )
    8985             :         {
    8986             :             bFreeOptions = true;
    8987             :             options = GDALTileIndexOptionsNew(NULL, NULL);
    8988             :         }
    8989             :         GDALTileIndexOptionsSetProgress(options, callback, callback_data);
    8990             :     }
    8991             : #endif
    8992             : 
    8993             : #ifdef SWIGPYTHON
    8994          22 :     std::vector<ErrorStruct> aoErrors;
    8995          44 :     if( GetUseExceptions() )
    8996             :     {
    8997          22 :         PushStackingErrorHandler(&aoErrors);
    8998             :     }
    8999             : #endif
    9000          22 :     GDALDatasetH hDSRet = GDALTileIndex(dest, CSLCount(source_filenames), source_filenames, options, &usageError);
    9001             : #if 0
    9002             :     if( bFreeOptions )
    9003             :         GDALTileIndexOptionsFree(options);
    9004             : #endif
    9005             : #ifdef SWIGPYTHON
    9006          44 :     if( GetUseExceptions() )
    9007             :     {
    9008          22 :         PopStackingErrorHandler(&aoErrors, hDSRet != NULL);
    9009             :     }
    9010             : #endif
    9011          22 :     return hDSRet;
    9012             : }
    9013             : 
    9014         103 : SWIGINTERN GDALMultiDimTranslateOptions *new_GDALMultiDimTranslateOptions(char **options){
    9015         103 :         return GDALMultiDimTranslateOptionsNew(options, NULL);
    9016             :     }
    9017         103 : SWIGINTERN void delete_GDALMultiDimTranslateOptions(GDALMultiDimTranslateOptions *self){
    9018         103 :         GDALMultiDimTranslateOptionsFree( self );
    9019         103 :     }
    9020             : 
    9021         103 : GDALDatasetShadow* wrapper_GDALMultiDimTranslateDestName( const char* dest,
    9022             :                                              int object_list_count, GDALDatasetShadow** poObjects,
    9023             :                                              GDALMultiDimTranslateOptions* multiDimTranslateOptions,
    9024             :                                              GDALProgressFunc callback=NULL,
    9025             :                                              void* callback_data=NULL)
    9026             : {
    9027         103 :     int usageError; /* ignored */
    9028         103 :     bool bFreeOptions = false;
    9029         103 :     if( callback )
    9030             :     {
    9031           0 :         if( multiDimTranslateOptions == NULL )
    9032             :         {
    9033           0 :             bFreeOptions = true;
    9034           0 :             multiDimTranslateOptions = GDALMultiDimTranslateOptionsNew(NULL, NULL);
    9035             :         }
    9036           0 :         GDALMultiDimTranslateOptionsSetProgress(multiDimTranslateOptions, callback, callback_data);
    9037             :     }
    9038             : #ifdef SWIGPYTHON
    9039         103 :     std::vector<ErrorStruct> aoErrors;
    9040         127 :     if( GetUseExceptions() )
    9041             :     {
    9042          24 :         PushStackingErrorHandler(&aoErrors);
    9043             :     }
    9044             : #endif
    9045         103 :     GDALDatasetH hDSRet = GDALMultiDimTranslate(dest, NULL, object_list_count, poObjects, multiDimTranslateOptions, &usageError);
    9046         103 :     if( bFreeOptions )
    9047           0 :         GDALMultiDimTranslateOptionsFree(multiDimTranslateOptions);
    9048             : #ifdef SWIGPYTHON
    9049         127 :     if( GetUseExceptions() )
    9050             :     {
    9051          24 :         PopStackingErrorHandler(&aoErrors, hDSRet != NULL);
    9052             :     }
    9053             : #endif
    9054         103 :     return hDSRet;
    9055             : }
    9056             : 
    9057             : #ifdef __cplusplus
    9058             : extern "C" {
    9059             : #endif
    9060          48 : SWIGINTERN PyObject *_wrap_GetUseExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9061          48 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
    9062          48 :   int result;
    9063             :   
    9064          48 :   if (!SWIG_Python_UnpackTuple(args, "GetUseExceptions", 0, 0, 0)) SWIG_fail;
    9065          48 :   {
    9066             : #ifdef SED_HACKS
    9067          48 :     if( bUseExceptions ) bLocalUseExceptionsCode = FALSE;
    9068             : #endif
    9069          48 :     result = GetUseExceptions();
    9070             :   }
    9071          48 :   resultobj = SWIG_From_int(static_cast< int >(result));
    9072          48 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
    9073             :   return resultobj;
    9074           0 : fail:
    9075           0 :   return NULL;
    9076             : }
    9077             : 
    9078             : 
    9079        8629 : SWIGINTERN PyObject *_wrap__GetExceptionsLocal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9080        8629 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
    9081        8629 :   int result;
    9082             :   
    9083        8629 :   if (!SWIG_Python_UnpackTuple(args, "_GetExceptionsLocal", 0, 0, 0)) SWIG_fail;
    9084        8629 :   {
    9085             : #ifdef SED_HACKS
    9086        8629 :     if( bUseExceptions ) bLocalUseExceptionsCode = FALSE;
    9087             : #endif
    9088        8629 :     {
    9089        8629 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    9090        8629 :       result = (int)_GetExceptionsLocal();
    9091        8629 :       SWIG_PYTHON_THREAD_END_ALLOW;
    9092             :     }
    9093             :   }
    9094        8629 :   resultobj = SWIG_From_int(static_cast< int >(result));
    9095        8629 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
    9096             :   return resultobj;
    9097           0 : fail:
    9098           0 :   return NULL;
    9099             : }
    9100             : 
    9101             : 
    9102       17258 : SWIGINTERN PyObject *_wrap__SetExceptionsLocal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9103       17258 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
    9104       17258 :   int arg1 ;
    9105       17258 :   int val1 ;
    9106       17258 :   int ecode1 = 0 ;
    9107       17258 :   PyObject *swig_obj[1] ;
    9108             :   
    9109       17258 :   if (!args) SWIG_fail;
    9110       17258 :   swig_obj[0] = args;
    9111       17258 :   ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
    9112       17258 :   if (!SWIG_IsOK(ecode1)) {
    9113           0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "_SetExceptionsLocal" "', argument " "1"" of type '" "int""'");
    9114             :   } 
    9115       17258 :   arg1 = static_cast< int >(val1);
    9116       17258 :   {
    9117             : #ifdef SED_HACKS
    9118       17258 :     if( bUseExceptions ) bLocalUseExceptionsCode = FALSE;
    9119             : #endif
    9120       17258 :     {
    9121       17258 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    9122       17258 :       _SetExceptionsLocal(arg1);
    9123       17258 :       SWIG_PYTHON_THREAD_END_ALLOW;
    9124             :     }
    9125             :   }
    9126       17258 :   resultobj = SWIG_Py_Void();
    9127       17258 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
    9128             :   return resultobj;
    9129             : fail:
    9130             :   return NULL;
    9131             : }
    9132             : 
    9133             : 
    9134         274 : SWIGINTERN PyObject *_wrap__UseExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9135         274 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
    9136             :   
    9137         274 :   if (!SWIG_Python_UnpackTuple(args, "_UseExceptions", 0, 0, 0)) SWIG_fail;
    9138         274 :   {
    9139         274 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    9140         274 :     _UseExceptions();
    9141         274 :     SWIG_PYTHON_THREAD_END_ALLOW;
    9142             :   }
    9143         274 :   resultobj = SWIG_Py_Void();
    9144         274 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
    9145             :   return resultobj;
    9146           0 : fail:
    9147           0 :   return NULL;
    9148             : }
    9149             : 
    9150             : 
    9151           5 : SWIGINTERN PyObject *_wrap__DontUseExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9152           5 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
    9153             :   
    9154           5 :   if (!SWIG_Python_UnpackTuple(args, "_DontUseExceptions", 0, 0, 0)) SWIG_fail;
    9155           5 :   {
    9156           5 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    9157           5 :     _DontUseExceptions();
    9158           5 :     SWIG_PYTHON_THREAD_END_ALLOW;
    9159             :   }
    9160           5 :   resultobj = SWIG_Py_Void();
    9161           5 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
    9162             :   return resultobj;
    9163           0 : fail:
    9164           0 :   return NULL;
    9165             : }
    9166             : 
    9167             : 
    9168       49560 : SWIGINTERN PyObject *_wrap__UserHasSpecifiedIfUsingExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9169       49560 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
    9170       49560 :   int result;
    9171             :   
    9172       49560 :   if (!SWIG_Python_UnpackTuple(args, "_UserHasSpecifiedIfUsingExceptions", 0, 0, 0)) SWIG_fail;
    9173       49560 :   {
    9174             : #ifdef SED_HACKS
    9175       49560 :     if( bUseExceptions ) bLocalUseExceptionsCode = FALSE;
    9176             : #endif
    9177       49560 :     {
    9178       49560 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    9179       49560 :       result = (int)_UserHasSpecifiedIfUsingExceptions();
    9180       49560 :       SWIG_PYTHON_THREAD_END_ALLOW;
    9181             :     }
    9182             :   }
    9183       49560 :   resultobj = SWIG_From_int(static_cast< int >(result));
    9184       49560 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
    9185             :   return resultobj;
    9186           0 : fail:
    9187           0 :   return NULL;
    9188             : }
    9189             : 
    9190             : 
    9191       26565 : SWIGINTERN PyObject *_wrap_VSIFReadL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9192       26565 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
    9193       26565 :   void **arg1 = (void **) 0 ;
    9194       26565 :   unsigned int arg2 ;
    9195       26565 :   unsigned int arg3 ;
    9196       26565 :   VSILFILE *arg4 = (VSILFILE *) 0 ;
    9197       26565 :   void *pyObject1 = NULL ;
    9198       26565 :   unsigned int val2 ;
    9199       26565 :   int ecode2 = 0 ;
    9200       26565 :   unsigned int val3 ;
    9201       26565 :   int ecode3 = 0 ;
    9202       26565 :   void *argp4 = 0 ;
    9203       26565 :   int res4 = 0 ;
    9204       26565 :   PyObject *swig_obj[3] ;
    9205       26565 :   unsigned int result;
    9206             :   
    9207       26565 :   {
    9208             :     /* %typemap(in,numinputs=0) ( void **outPythonObject ) ( void *pyObject1 = NULL ) */
    9209       26565 :     arg1 = &pyObject1;
    9210             :   }
    9211       26565 :   if (!SWIG_Python_UnpackTuple(args, "VSIFReadL", 3, 3, swig_obj)) SWIG_fail;
    9212       26565 :   ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[0], &val2);
    9213       26565 :   if (!SWIG_IsOK(ecode2)) {
    9214           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VSIFReadL" "', argument " "2"" of type '" "unsigned int""'");
    9215             :   } 
    9216       26565 :   arg2 = static_cast< unsigned int >(val2);
    9217       26565 :   ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val3);
    9218       26565 :   if (!SWIG_IsOK(ecode3)) {
    9219           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VSIFReadL" "', argument " "3"" of type '" "unsigned int""'");
    9220             :   } 
    9221       26565 :   arg3 = static_cast< unsigned int >(val3);
    9222       26565 :   res4 = SWIG_ConvertPtr(swig_obj[2], &argp4,SWIGTYPE_p_VSILFILE, 0 |  0 );
    9223       26565 :   if (!SWIG_IsOK(res4)) {
    9224           0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "VSIFReadL" "', argument " "4"" of type '" "VSILFILE *""'"); 
    9225             :   }
    9226       26565 :   arg4 = reinterpret_cast< VSILFILE * >(argp4);
    9227       26565 :   {
    9228       26565 :     if (!arg4) {
    9229           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    9230             :     }
    9231             :   }
    9232       26564 :   {
    9233       26564 :     const int bLocalUseExceptions = GetUseExceptions();
    9234       26564 :     if ( bLocalUseExceptions ) {
    9235         749 :       pushErrorHandler();
    9236             :     }
    9237       26564 :     {
    9238       26564 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    9239       26564 :       result = (unsigned int)wrapper_VSIFReadL(arg1,arg2,arg3,arg4);
    9240       26564 :       SWIG_PYTHON_THREAD_END_ALLOW;
    9241             :     }
    9242       26564 :     if ( bLocalUseExceptions ) {
    9243         749 :       popErrorHandler();
    9244             :     }
    9245             : #ifndef SED_HACKS
    9246             :     if ( bLocalUseExceptions ) {
    9247             :       CPLErr eclass = CPLGetLastErrorType();
    9248             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9249             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9250             :       }
    9251             :     }
    9252             : #endif
    9253             :   }
    9254       26564 :   resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
    9255       26564 :   {
    9256             :     /* %typemap(argout) ( void **outPythonObject ) */
    9257       26564 :     Py_XDECREF(resultobj);
    9258       26564 :     if (*arg1)
    9259             :     {
    9260             :       resultobj = (PyObject*)*arg1;
    9261             :     }
    9262             :     else
    9263             :     {
    9264          12 :       resultobj = Py_None;
    9265          12 :       Py_INCREF(resultobj);
    9266             :     }
    9267             :   }
    9268       26565 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
    9269             :   return resultobj;
    9270             : fail:
    9271             :   return NULL;
    9272             : }
    9273             : 
    9274             : 
    9275           2 : SWIGINTERN PyObject *_wrap_VSIGetMemFileBuffer_unsafe(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9276           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
    9277           2 :   char *arg1 = (char *) 0 ;
    9278           2 :   GByte **arg2 = (GByte **) 0 ;
    9279           2 :   vsi_l_offset *arg3 = (vsi_l_offset *) 0 ;
    9280           2 :   int bToFree1 = 0 ;
    9281           2 :   GByte *out2 = NULL ;
    9282           2 :   vsi_l_offset length2 ;
    9283           2 :   PyObject *swig_obj[1] ;
    9284             :   
    9285           2 :   {
    9286           2 :     arg2 = &out2;
    9287           2 :     arg3 = &length2;
    9288             :   }
    9289           2 :   if (!args) SWIG_fail;
    9290           2 :   swig_obj[0] = args;
    9291           2 :   {
    9292             :     /* %typemap(in) (const char *utf8_path) */
    9293           2 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
    9294             :     {
    9295           2 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
    9296             :     }
    9297             :     else
    9298             :     {
    9299           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
    9300             :       
    9301             :     }
    9302           2 :     if (arg1 == NULL)
    9303             :     {
    9304           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
    9305           0 :       SWIG_fail;
    9306             :     }
    9307             :   }
    9308           2 :   {
    9309           2 :     const int bLocalUseExceptions = GetUseExceptions();
    9310           2 :     if ( bLocalUseExceptions ) {
    9311           0 :       pushErrorHandler();
    9312             :     }
    9313           2 :     {
    9314           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    9315           2 :       wrapper_VSIGetMemFileBuffer((char const *)arg1,arg2,arg3);
    9316           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
    9317             :     }
    9318           2 :     if ( bLocalUseExceptions ) {
    9319           0 :       popErrorHandler();
    9320             :     }
    9321             : #ifndef SED_HACKS
    9322             :     if ( bLocalUseExceptions ) {
    9323             :       CPLErr eclass = CPLGetLastErrorType();
    9324             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9325             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9326             :       }
    9327             :     }
    9328             : #endif
    9329             :   }
    9330           2 :   resultobj = SWIG_Py_Void();
    9331           2 :   {
    9332           2 :     if (*arg2 == NULL) {
    9333           1 :       if( GetUseExceptions() ) {
    9334           0 :         PyErr_SetString(PyExc_RuntimeError, "Could not find path");
    9335             :         resultobj = NULL;
    9336             :       } else {
    9337           1 :         CPLError(CE_Failure, CPLE_AppDefined, "Could not find path");
    9338           1 :         resultobj = Py_None;
    9339           1 :         Py_INCREF(resultobj);
    9340             :       }
    9341             :     } else {
    9342           1 :       do {
    9343           1 :         resultobj = PyMemoryView_FromMemory(reinterpret_cast<char *>(*arg2), *arg3, PyBUF_READ);
    9344           1 :         if (resultobj == NULL) {
    9345           0 :           if( GetUseExceptions() ) {
    9346           0 :             PyErr_SetString(PyExc_RuntimeError, "Could not allocate result buffer");
    9347             :             resultobj = NULL;
    9348             :           } else {
    9349           0 :             CPLError(CE_Failure, CPLE_AppDefined, "Could not allocate result buffer");
    9350           0 :             resultobj = Py_None;
    9351           0 :             Py_INCREF(resultobj);
    9352             :           }
    9353             :         }
    9354             :       } while(0);
    9355             :     }
    9356             :   }
    9357           2 :   {
    9358             :     /* %typemap(freearg) (const char *utf8_path) */
    9359           2 :     GDALPythonFreeCStr(arg1, bToFree1);
    9360             :   }
    9361           2 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
    9362             :   return resultobj;
    9363           0 : fail:
    9364           0 :   {
    9365             :     /* %typemap(freearg) (const char *utf8_path) */
    9366           2 :     GDALPythonFreeCStr(arg1, bToFree1);
    9367             :   }
    9368             :   return NULL;
    9369             : }
    9370             : 
    9371             : 
    9372         122 : SWIGINTERN PyObject *_wrap_Debug(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9373         122 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
    9374         122 :   char *arg1 = (char *) 0 ;
    9375         122 :   char *arg2 = (char *) 0 ;
    9376         122 :   int res1 ;
    9377         122 :   char *buf1 = 0 ;
    9378         122 :   int alloc1 = 0 ;
    9379         122 :   int res2 ;
    9380         122 :   char *buf2 = 0 ;
    9381         122 :   int alloc2 = 0 ;
    9382         122 :   PyObject *swig_obj[2] ;
    9383             :   
    9384         122 :   if (!SWIG_Python_UnpackTuple(args, "Debug", 2, 2, swig_obj)) SWIG_fail;
    9385         122 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
    9386         122 :   if (!SWIG_IsOK(res1)) {
    9387           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Debug" "', argument " "1"" of type '" "char const *""'");
    9388             :   }
    9389         122 :   arg1 = reinterpret_cast< char * >(buf1);
    9390         122 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
    9391         122 :   if (!SWIG_IsOK(res2)) {
    9392           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Debug" "', argument " "2"" of type '" "char const *""'");
    9393             :   }
    9394         122 :   arg2 = reinterpret_cast< char * >(buf2);
    9395         122 :   {
    9396         122 :     if (!arg2) {
    9397           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    9398             :     }
    9399             :   }
    9400         122 :   {
    9401         122 :     const int bLocalUseExceptions = GetUseExceptions();
    9402         122 :     if ( bLocalUseExceptions ) {
    9403          99 :       pushErrorHandler();
    9404             :     }
    9405         122 :     {
    9406         122 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    9407         122 :       Debug((char const *)arg1,(char const *)arg2);
    9408         122 :       SWIG_PYTHON_THREAD_END_ALLOW;
    9409             :     }
    9410         122 :     if ( bLocalUseExceptions ) {
    9411          99 :       popErrorHandler();
    9412             :     }
    9413             : #ifndef SED_HACKS
    9414             :     if ( bLocalUseExceptions ) {
    9415             :       CPLErr eclass = CPLGetLastErrorType();
    9416             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9417             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9418             :       }
    9419             :     }
    9420             : #endif
    9421             :   }
    9422         122 :   resultobj = SWIG_Py_Void();
    9423         122 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
    9424         122 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    9425         122 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
    9426             :   return resultobj;
    9427           0 : fail:
    9428           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
    9429           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    9430             :   return NULL;
    9431             : }
    9432             : 
    9433             : 
    9434           6 : SWIGINTERN PyObject *_wrap_SetErrorHandler(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9435           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
    9436           6 :   CPLErrorHandler arg1 = (CPLErrorHandler) NULL ;
    9437           6 :   void *arg2 = (void *) NULL ;
    9438           6 :   PyObject *swig_obj[1] ;
    9439           6 :   CPLErr result;
    9440             :   
    9441           6 :   if (!SWIG_Python_UnpackTuple(args, "SetErrorHandler", 0, 1, swig_obj)) SWIG_fail;
    9442           6 :   if (swig_obj[0]) {
    9443           6 :     {
    9444             :       /* %typemap(in) (CPLErrorHandler pfnErrorHandler = NULL, void* user_data = NULL) */
    9445           6 :       int alloc = 0;
    9446           6 :       char* pszCallbackName = NULL;
    9447           6 :       arg2 = NULL;
    9448           6 :       if( SWIG_IsOK(SWIG_AsCharPtrAndSize(swig_obj[0], &pszCallbackName, NULL, &alloc)) )
    9449             :       {
    9450           3 :         if( pszCallbackName == NULL || EQUAL(pszCallbackName,"CPLQuietErrorHandler") )
    9451             :         arg1 = CPLQuietErrorHandler;
    9452           3 :         else if( EQUAL(pszCallbackName,"CPLDefaultErrorHandler") )
    9453             :         arg1 = CPLDefaultErrorHandler;
    9454           0 :         else if( EQUAL(pszCallbackName,"CPLLoggingErrorHandler") )
    9455             :         arg1 = CPLLoggingErrorHandler;
    9456             :         else
    9457             :         {
    9458           0 :           if (alloc == SWIG_NEWOBJ) delete[] pszCallbackName;
    9459           0 :           PyErr_SetString( PyExc_RuntimeError, "Unhandled value for passed string" );
    9460           0 :           SWIG_fail;
    9461             :         }
    9462             :         
    9463           3 :         if (alloc == SWIG_NEWOBJ) delete[] pszCallbackName;
    9464             :       }
    9465           3 :       else if (!PyCallable_Check(swig_obj[0]))
    9466             :       {
    9467           0 :         PyErr_SetString( PyExc_RuntimeError,
    9468             :           "Object given is not a String or a Python function" );
    9469           0 :         SWIG_fail;
    9470             :       }
    9471             :       else
    9472             :       {
    9473           3 :         Py_INCREF(swig_obj[0]);
    9474           3 :         arg1 = PyCPLErrorHandler;
    9475           3 :         arg2 = swig_obj[0];
    9476             :       }
    9477             :     }
    9478             :   }
    9479           6 :   {
    9480           6 :     const int bLocalUseExceptions = GetUseExceptions();
    9481           6 :     if ( bLocalUseExceptions ) {
    9482           0 :       pushErrorHandler();
    9483             :     }
    9484           6 :     {
    9485           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    9486           6 :       CPL_IGNORE_RET_VAL(result = (CPLErr)SetErrorHandler(arg1,arg2));
    9487           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
    9488             :     }
    9489           6 :     if ( bLocalUseExceptions ) {
    9490           0 :       popErrorHandler();
    9491             :     }
    9492             : #ifndef SED_HACKS
    9493             :     if ( bLocalUseExceptions ) {
    9494             :       CPLErr eclass = CPLGetLastErrorType();
    9495             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9496             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9497             :       }
    9498             :     }
    9499             : #endif
    9500             :   }
    9501           6 :   resultobj = SWIG_From_int(static_cast< int >(result));
    9502           6 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
    9503             :   return resultobj;
    9504             : fail:
    9505             :   return NULL;
    9506             : }
    9507             : 
    9508             : 
    9509           1 : SWIGINTERN PyObject *_wrap_SetCurrentErrorHandlerCatchDebug(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9510           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
    9511           1 :   int arg1 ;
    9512           1 :   int val1 ;
    9513           1 :   int ecode1 = 0 ;
    9514           1 :   PyObject *swig_obj[1] ;
    9515             :   
    9516           1 :   if (!args) SWIG_fail;
    9517           1 :   swig_obj[0] = args;
    9518           1 :   ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
    9519           1 :   if (!SWIG_IsOK(ecode1)) {
    9520           0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "SetCurrentErrorHandlerCatchDebug" "', argument " "1"" of type '" "int""'");
    9521             :   } 
    9522           1 :   arg1 = static_cast< int >(val1);
    9523           1 :   {
    9524           1 :     const int bLocalUseExceptions = GetUseExceptions();
    9525           1 :     if ( bLocalUseExceptions ) {
    9526           0 :       pushErrorHandler();
    9527             :     }
    9528           1 :     {
    9529           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    9530           1 :       CPLSetCurrentErrorHandlerCatchDebug(arg1);
    9531           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
    9532             :     }
    9533           1 :     if ( bLocalUseExceptions ) {
    9534           0 :       popErrorHandler();
    9535             :     }
    9536             : #ifndef SED_HACKS
    9537             :     if ( bLocalUseExceptions ) {
    9538             :       CPLErr eclass = CPLGetLastErrorType();
    9539             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9540             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9541             :       }
    9542             :     }
    9543             : #endif
    9544             :   }
    9545           1 :   resultobj = SWIG_Py_Void();
    9546           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
    9547             :   return resultobj;
    9548             : fail:
    9549             :   return NULL;
    9550             : }
    9551             : 
    9552             : 
    9553       28421 : SWIGINTERN PyObject *_wrap_PushErrorHandler(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9554       28421 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
    9555       28421 :   CPLErrorHandler arg1 = (CPLErrorHandler) NULL ;
    9556       28421 :   void *arg2 = (void *) NULL ;
    9557       28421 :   PyObject *swig_obj[1] ;
    9558       28421 :   CPLErr result;
    9559             :   
    9560       28421 :   if (!SWIG_Python_UnpackTuple(args, "PushErrorHandler", 0, 1, swig_obj)) SWIG_fail;
    9561       28421 :   if (swig_obj[0]) {
    9562       28350 :     {
    9563             :       /* %typemap(in) (CPLErrorHandler pfnErrorHandler = NULL, void* user_data = NULL) */
    9564       28350 :       int alloc = 0;
    9565       28350 :       char* pszCallbackName = NULL;
    9566       28350 :       arg2 = NULL;
    9567       28350 :       if( SWIG_IsOK(SWIG_AsCharPtrAndSize(swig_obj[0], &pszCallbackName, NULL, &alloc)) )
    9568             :       {
    9569       28273 :         if( pszCallbackName == NULL || EQUAL(pszCallbackName,"CPLQuietErrorHandler") )
    9570             :         arg1 = CPLQuietErrorHandler;
    9571           0 :         else if( EQUAL(pszCallbackName,"CPLDefaultErrorHandler") )
    9572             :         arg1 = CPLDefaultErrorHandler;
    9573           0 :         else if( EQUAL(pszCallbackName,"CPLLoggingErrorHandler") )
    9574             :         arg1 = CPLLoggingErrorHandler;
    9575             :         else
    9576             :         {
    9577           0 :           if (alloc == SWIG_NEWOBJ) delete[] pszCallbackName;
    9578           0 :           PyErr_SetString( PyExc_RuntimeError, "Unhandled value for passed string" );
    9579           0 :           SWIG_fail;
    9580             :         }
    9581             :         
    9582       28273 :         if (alloc == SWIG_NEWOBJ) delete[] pszCallbackName;
    9583             :       }
    9584          77 :       else if (!PyCallable_Check(swig_obj[0]))
    9585             :       {
    9586           0 :         PyErr_SetString( PyExc_RuntimeError,
    9587             :           "Object given is not a String or a Python function" );
    9588           0 :         SWIG_fail;
    9589             :       }
    9590             :       else
    9591             :       {
    9592          77 :         Py_INCREF(swig_obj[0]);
    9593          77 :         arg1 = PyCPLErrorHandler;
    9594          77 :         arg2 = swig_obj[0];
    9595             :       }
    9596             :     }
    9597             :   }
    9598       28421 :   {
    9599       28944 :     if( GetUseExceptions() ) bLocalUseExceptionsCode = FALSE;
    9600       28421 :     CPL_IGNORE_RET_VAL(result = (CPLErr)PushErrorHandler(arg1,arg2));
    9601             :   }
    9602       28421 :   resultobj = SWIG_From_int(static_cast< int >(result));
    9603       28421 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
    9604             :   return resultobj;
    9605             : fail:
    9606             :   return NULL;
    9607             : }
    9608             : 
    9609             : 
    9610       28416 : SWIGINTERN PyObject *_wrap_PopErrorHandler(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9611       28416 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
    9612             :   
    9613       28416 :   if (!SWIG_Python_UnpackTuple(args, "PopErrorHandler", 0, 0, 0)) SWIG_fail;
    9614       28416 :   {
    9615       28932 :     if( GetUseExceptions() ) bLocalUseExceptionsCode = FALSE;
    9616       28416 :     PopErrorHandler();
    9617             :   }
    9618       28416 :   resultobj = SWIG_Py_Void();
    9619       28416 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
    9620             :   return resultobj;
    9621           0 : fail:
    9622           0 :   return NULL;
    9623             : }
    9624             : 
    9625             : 
    9626          21 : SWIGINTERN PyObject *_wrap_Error(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9627          21 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
    9628          21 :   CPLErr arg1 = (CPLErr) CE_Failure ;
    9629          21 :   int arg2 = (int) 0 ;
    9630          21 :   char *arg3 = (char *) "error" ;
    9631          21 :   int val1 ;
    9632          21 :   int ecode1 = 0 ;
    9633          21 :   int val2 ;
    9634          21 :   int ecode2 = 0 ;
    9635          21 :   int res3 ;
    9636          21 :   char *buf3 = 0 ;
    9637          21 :   int alloc3 = 0 ;
    9638          21 :   PyObject *swig_obj[3] ;
    9639             :   
    9640          21 :   if (!SWIG_Python_UnpackTuple(args, "Error", 0, 3, swig_obj)) SWIG_fail;
    9641          21 :   if (swig_obj[0]) {
    9642          21 :     ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
    9643          21 :     if (!SWIG_IsOK(ecode1)) {
    9644           0 :       SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "Error" "', argument " "1"" of type '" "CPLErr""'");
    9645             :     } 
    9646          21 :     arg1 = static_cast< CPLErr >(val1);
    9647             :   }
    9648          21 :   if (swig_obj[1]) {
    9649          21 :     ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
    9650          21 :     if (!SWIG_IsOK(ecode2)) {
    9651           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Error" "', argument " "2"" of type '" "int""'");
    9652             :     } 
    9653             :     arg2 = static_cast< int >(val2);
    9654             :   }
    9655          21 :   if (swig_obj[2]) {
    9656          21 :     res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
    9657          21 :     if (!SWIG_IsOK(res3)) {
    9658           0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Error" "', argument " "3"" of type '" "char const *""'");
    9659             :     }
    9660          21 :     arg3 = reinterpret_cast< char * >(buf3);
    9661             :   }
    9662          21 :   {
    9663          21 :     const int bLocalUseExceptions = GetUseExceptions();
    9664          21 :     if ( bLocalUseExceptions ) {
    9665           0 :       pushErrorHandler();
    9666             :     }
    9667          21 :     {
    9668          21 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    9669          21 :       Error(arg1,arg2,(char const *)arg3);
    9670          21 :       SWIG_PYTHON_THREAD_END_ALLOW;
    9671             :     }
    9672          21 :     if ( bLocalUseExceptions ) {
    9673           0 :       popErrorHandler();
    9674             :     }
    9675             : #ifndef SED_HACKS
    9676             :     if ( bLocalUseExceptions ) {
    9677             :       CPLErr eclass = CPLGetLastErrorType();
    9678             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9679             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9680             :       }
    9681             :     }
    9682             : #endif
    9683             :   }
    9684          21 :   resultobj = SWIG_Py_Void();
    9685          21 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    9686          21 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
    9687             :   return resultobj;
    9688           0 : fail:
    9689           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    9690             :   return NULL;
    9691             : }
    9692             : 
    9693             : 
    9694           0 : SWIGINTERN PyObject *_wrap_GOA2GetAuthorizationURL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9695           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
    9696           0 :   char *arg1 = (char *) 0 ;
    9697           0 :   int res1 ;
    9698           0 :   char *buf1 = 0 ;
    9699           0 :   int alloc1 = 0 ;
    9700           0 :   PyObject *swig_obj[1] ;
    9701           0 :   retStringAndCPLFree *result = 0 ;
    9702             :   
    9703           0 :   if (!args) SWIG_fail;
    9704           0 :   swig_obj[0] = args;
    9705           0 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
    9706           0 :   if (!SWIG_IsOK(res1)) {
    9707           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GOA2GetAuthorizationURL" "', argument " "1"" of type '" "char const *""'");
    9708             :   }
    9709           0 :   arg1 = reinterpret_cast< char * >(buf1);
    9710           0 :   {
    9711           0 :     if (!arg1) {
    9712           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    9713             :     }
    9714             :   }
    9715           0 :   {
    9716           0 :     const int bLocalUseExceptions = GetUseExceptions();
    9717           0 :     if ( bLocalUseExceptions ) {
    9718           0 :       pushErrorHandler();
    9719             :     }
    9720           0 :     {
    9721           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    9722           0 :       result = (retStringAndCPLFree *)GOA2GetAuthorizationURL((char const *)arg1);
    9723           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
    9724             :     }
    9725           0 :     if ( bLocalUseExceptions ) {
    9726           0 :       popErrorHandler();
    9727             :     }
    9728             : #ifndef SED_HACKS
    9729             :     if ( bLocalUseExceptions ) {
    9730             :       CPLErr eclass = CPLGetLastErrorType();
    9731             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9732             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9733             :       }
    9734             :     }
    9735             : #endif
    9736             :   }
    9737           0 :   {
    9738             :     /* %typemap(out) (retStringAndCPLFree*) */
    9739           0 :     Py_XDECREF(resultobj);
    9740           0 :     if(result)
    9741             :     {
    9742           0 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
    9743           0 :       CPLFree(result);
    9744             :     }
    9745             :     else
    9746             :     {
    9747           0 :       resultobj = Py_None;
    9748           0 :       Py_INCREF(resultobj);
    9749             :     }
    9750             :   }
    9751           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
    9752           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
    9753             :   return resultobj;
    9754           0 : fail:
    9755           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
    9756             :   return NULL;
    9757             : }
    9758             : 
    9759             : 
    9760           0 : SWIGINTERN PyObject *_wrap_GOA2GetRefreshToken(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9761           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
    9762           0 :   char *arg1 = (char *) 0 ;
    9763           0 :   char *arg2 = (char *) 0 ;
    9764           0 :   int res1 ;
    9765           0 :   char *buf1 = 0 ;
    9766           0 :   int alloc1 = 0 ;
    9767           0 :   int res2 ;
    9768           0 :   char *buf2 = 0 ;
    9769           0 :   int alloc2 = 0 ;
    9770           0 :   PyObject *swig_obj[2] ;
    9771           0 :   retStringAndCPLFree *result = 0 ;
    9772             :   
    9773           0 :   if (!SWIG_Python_UnpackTuple(args, "GOA2GetRefreshToken", 2, 2, swig_obj)) SWIG_fail;
    9774           0 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
    9775           0 :   if (!SWIG_IsOK(res1)) {
    9776           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GOA2GetRefreshToken" "', argument " "1"" of type '" "char const *""'");
    9777             :   }
    9778           0 :   arg1 = reinterpret_cast< char * >(buf1);
    9779           0 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
    9780           0 :   if (!SWIG_IsOK(res2)) {
    9781           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GOA2GetRefreshToken" "', argument " "2"" of type '" "char const *""'");
    9782             :   }
    9783           0 :   arg2 = reinterpret_cast< char * >(buf2);
    9784           0 :   {
    9785           0 :     if (!arg1) {
    9786           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    9787             :     }
    9788             :   }
    9789           0 :   {
    9790           0 :     const int bLocalUseExceptions = GetUseExceptions();
    9791           0 :     if ( bLocalUseExceptions ) {
    9792           0 :       pushErrorHandler();
    9793             :     }
    9794           0 :     {
    9795           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    9796           0 :       result = (retStringAndCPLFree *)GOA2GetRefreshToken((char const *)arg1,(char const *)arg2);
    9797           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
    9798             :     }
    9799           0 :     if ( bLocalUseExceptions ) {
    9800           0 :       popErrorHandler();
    9801             :     }
    9802             : #ifndef SED_HACKS
    9803             :     if ( bLocalUseExceptions ) {
    9804             :       CPLErr eclass = CPLGetLastErrorType();
    9805             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9806             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9807             :       }
    9808             :     }
    9809             : #endif
    9810             :   }
    9811           0 :   {
    9812             :     /* %typemap(out) (retStringAndCPLFree*) */
    9813           0 :     Py_XDECREF(resultobj);
    9814           0 :     if(result)
    9815             :     {
    9816           0 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
    9817           0 :       CPLFree(result);
    9818             :     }
    9819             :     else
    9820             :     {
    9821           0 :       resultobj = Py_None;
    9822           0 :       Py_INCREF(resultobj);
    9823             :     }
    9824             :   }
    9825           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
    9826           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    9827           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
    9828             :   return resultobj;
    9829           0 : fail:
    9830           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
    9831           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    9832             :   return NULL;
    9833             : }
    9834             : 
    9835             : 
    9836           0 : SWIGINTERN PyObject *_wrap_GOA2GetAccessToken(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9837           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
    9838           0 :   char *arg1 = (char *) 0 ;
    9839           0 :   char *arg2 = (char *) 0 ;
    9840           0 :   int res1 ;
    9841           0 :   char *buf1 = 0 ;
    9842           0 :   int alloc1 = 0 ;
    9843           0 :   int res2 ;
    9844           0 :   char *buf2 = 0 ;
    9845           0 :   int alloc2 = 0 ;
    9846           0 :   PyObject *swig_obj[2] ;
    9847           0 :   retStringAndCPLFree *result = 0 ;
    9848             :   
    9849           0 :   if (!SWIG_Python_UnpackTuple(args, "GOA2GetAccessToken", 2, 2, swig_obj)) SWIG_fail;
    9850           0 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
    9851           0 :   if (!SWIG_IsOK(res1)) {
    9852           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GOA2GetAccessToken" "', argument " "1"" of type '" "char const *""'");
    9853             :   }
    9854           0 :   arg1 = reinterpret_cast< char * >(buf1);
    9855           0 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
    9856           0 :   if (!SWIG_IsOK(res2)) {
    9857           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GOA2GetAccessToken" "', argument " "2"" of type '" "char const *""'");
    9858             :   }
    9859           0 :   arg2 = reinterpret_cast< char * >(buf2);
    9860           0 :   {
    9861           0 :     if (!arg1) {
    9862           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    9863             :     }
    9864             :   }
    9865           0 :   {
    9866           0 :     const int bLocalUseExceptions = GetUseExceptions();
    9867           0 :     if ( bLocalUseExceptions ) {
    9868           0 :       pushErrorHandler();
    9869             :     }
    9870           0 :     {
    9871           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    9872           0 :       result = (retStringAndCPLFree *)GOA2GetAccessToken((char const *)arg1,(char const *)arg2);
    9873           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
    9874             :     }
    9875           0 :     if ( bLocalUseExceptions ) {
    9876           0 :       popErrorHandler();
    9877             :     }
    9878             : #ifndef SED_HACKS
    9879             :     if ( bLocalUseExceptions ) {
    9880             :       CPLErr eclass = CPLGetLastErrorType();
    9881             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9882             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9883             :       }
    9884             :     }
    9885             : #endif
    9886             :   }
    9887           0 :   {
    9888             :     /* %typemap(out) (retStringAndCPLFree*) */
    9889           0 :     Py_XDECREF(resultobj);
    9890           0 :     if(result)
    9891             :     {
    9892           0 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
    9893           0 :       CPLFree(result);
    9894             :     }
    9895             :     else
    9896             :     {
    9897           0 :       resultobj = Py_None;
    9898           0 :       Py_INCREF(resultobj);
    9899             :     }
    9900             :   }
    9901           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
    9902           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    9903           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
    9904             :   return resultobj;
    9905           0 : fail:
    9906           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
    9907           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    9908             :   return NULL;
    9909             : }
    9910             : 
    9911             : 
    9912        1590 : SWIGINTERN PyObject *_wrap_ErrorReset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9913        1590 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
    9914             :   
    9915        1590 :   if (!SWIG_Python_UnpackTuple(args, "ErrorReset", 0, 0, 0)) SWIG_fail;
    9916        1590 :   {
    9917        1590 :     const int bLocalUseExceptions = GetUseExceptions();
    9918        1590 :     if ( bLocalUseExceptions ) {
    9919         168 :       pushErrorHandler();
    9920             :     }
    9921        1590 :     {
    9922        1590 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    9923        1590 :       CPLErrorReset();
    9924        1590 :       SWIG_PYTHON_THREAD_END_ALLOW;
    9925             :     }
    9926        1590 :     if ( bLocalUseExceptions ) {
    9927         168 :       popErrorHandler();
    9928             :     }
    9929             : #ifndef SED_HACKS
    9930             :     if ( bLocalUseExceptions ) {
    9931             :       CPLErr eclass = CPLGetLastErrorType();
    9932             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9933             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9934             :       }
    9935             :     }
    9936             : #endif
    9937             :   }
    9938        1590 :   resultobj = SWIG_Py_Void();
    9939        1590 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
    9940             :   return resultobj;
    9941           0 : fail:
    9942           0 :   return NULL;
    9943             : }
    9944             : 
    9945             : 
    9946         167 : SWIGINTERN PyObject *_wrap_wrapper_EscapeString(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
    9947         167 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
    9948         167 :   int arg1 ;
    9949         167 :   char *arg2 = (char *) 0 ;
    9950         167 :   int arg3 = (int) CPLES_SQL ;
    9951         167 :   int alloc1 = 0 ;
    9952         167 :   bool viewIsValid1 = false ;
    9953         167 :   Py_buffer view1 ;
    9954         167 :   int val3 ;
    9955         167 :   int ecode3 = 0 ;
    9956         167 :   PyObject * obj0 = 0 ;
    9957         167 :   PyObject * obj1 = 0 ;
    9958         167 :   char * kwnames[] = {
    9959             :     (char *)"len",  (char *)"scheme",  NULL 
    9960             :   };
    9961         167 :   retStringAndCPLFree *result = 0 ;
    9962             :   
    9963         167 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:wrapper_EscapeString", kwnames, &obj0, &obj1)) SWIG_fail;
    9964         167 :   {
    9965             :     /* %typemap(in,numinputs=1) (int nLen, char *pBuf ) */
    9966         167 :     char* ptr = NULL;
    9967         167 :     if( !GetBufferAsCharPtrIntSize(obj0, &arg1, &ptr, &alloc1, &viewIsValid1, &view1) ) {
    9968           0 :       SWIG_fail;
    9969             :     }
    9970         167 :     arg2 = (char *)ptr;
    9971             :   }
    9972         167 :   if (obj1) {
    9973         167 :     ecode3 = SWIG_AsVal_int(obj1, &val3);
    9974         167 :     if (!SWIG_IsOK(ecode3)) {
    9975           0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "wrapper_EscapeString" "', argument " "3"" of type '" "int""'");
    9976             :     } 
    9977             :     arg3 = static_cast< int >(val3);
    9978             :   }
    9979         167 :   {
    9980         167 :     const int bLocalUseExceptions = GetUseExceptions();
    9981         167 :     if ( bLocalUseExceptions ) {
    9982         134 :       pushErrorHandler();
    9983             :     }
    9984         167 :     {
    9985         167 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    9986         167 :       result = (retStringAndCPLFree *)wrapper_EscapeString(arg1,arg2,arg3);
    9987         167 :       SWIG_PYTHON_THREAD_END_ALLOW;
    9988             :     }
    9989         167 :     if ( bLocalUseExceptions ) {
    9990         134 :       popErrorHandler();
    9991             :     }
    9992             : #ifndef SED_HACKS
    9993             :     if ( bLocalUseExceptions ) {
    9994             :       CPLErr eclass = CPLGetLastErrorType();
    9995             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9996             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9997             :       }
    9998             :     }
    9999             : #endif
   10000             :   }
   10001         167 :   {
   10002             :     /* %typemap(out) (retStringAndCPLFree*) */
   10003         167 :     Py_XDECREF(resultobj);
   10004         167 :     if(result)
   10005             :     {
   10006         167 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   10007         167 :       CPLFree(result);
   10008             :     }
   10009             :     else
   10010             :     {
   10011           0 :       resultobj = Py_None;
   10012           0 :       Py_INCREF(resultobj);
   10013             :     }
   10014             :   }
   10015         167 :   {
   10016             :     /* %typemap(freearg) (int *nLen, char *pBuf ) */
   10017         167 :     if( viewIsValid1 ) {
   10018           0 :       PyBuffer_Release(&view1);
   10019             :     }
   10020         167 :     else if (ReturnSame(alloc1) == SWIG_NEWOBJ ) {
   10021         167 :       delete[] arg2;
   10022             :     }
   10023             :   }
   10024         167 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   10025             :   return resultobj;
   10026           0 : fail:
   10027           0 :   {
   10028             :     /* %typemap(freearg) (int *nLen, char *pBuf ) */
   10029           0 :     if( viewIsValid1 ) {
   10030           0 :       PyBuffer_Release(&view1);
   10031             :     }
   10032         167 :     else if (ReturnSame(alloc1) == SWIG_NEWOBJ ) {
   10033           0 :       delete[] arg2;
   10034             :     }
   10035             :   }
   10036             :   return NULL;
   10037             : }
   10038             : 
   10039             : 
   10040          81 : SWIGINTERN PyObject *_wrap_EscapeBinary(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   10041          81 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10042          81 :   int arg1 ;
   10043          81 :   char *arg2 = (char *) 0 ;
   10044          81 :   size_t *arg3 = (size_t *) 0 ;
   10045          81 :   char **arg4 = (char **) 0 ;
   10046          81 :   int arg5 = (int) CPLES_SQL ;
   10047          81 :   int alloc1 = 0 ;
   10048          81 :   bool viewIsValid1 = false ;
   10049          81 :   Py_buffer view1 ;
   10050          81 :   size_t nLen3 = 0 ;
   10051          81 :   char *pBuf3 = 0 ;
   10052          81 :   int val5 ;
   10053          81 :   int ecode5 = 0 ;
   10054          81 :   PyObject * obj0 = 0 ;
   10055          81 :   PyObject * obj1 = 0 ;
   10056          81 :   char * kwnames[] = {
   10057             :     (char *)"len",  (char *)"scheme",  NULL 
   10058             :   };
   10059             :   
   10060          81 :   {
   10061             :     /* %typemap(in,numinputs=0) (size_t *nLen3, char **pBuf3 ) */
   10062          81 :     arg3 = &nLen3;
   10063          81 :     arg4 = &pBuf3;
   10064             :   }
   10065          81 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:EscapeBinary", kwnames, &obj0, &obj1)) SWIG_fail;
   10066          81 :   {
   10067             :     /* %typemap(in,numinputs=1) (int nLen, char *pBuf ) */
   10068          81 :     char* ptr = NULL;
   10069          81 :     if( !GetBufferAsCharPtrIntSize(obj0, &arg1, &ptr, &alloc1, &viewIsValid1, &view1) ) {
   10070           0 :       SWIG_fail;
   10071             :     }
   10072          81 :     arg2 = (char *)ptr;
   10073             :   }
   10074          81 :   if (obj1) {
   10075          81 :     ecode5 = SWIG_AsVal_int(obj1, &val5);
   10076          81 :     if (!SWIG_IsOK(ecode5)) {
   10077           0 :       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "EscapeBinary" "', argument " "5"" of type '" "int""'");
   10078             :     } 
   10079             :     arg5 = static_cast< int >(val5);
   10080             :   }
   10081          81 :   {
   10082          81 :     const int bLocalUseExceptions = GetUseExceptions();
   10083          81 :     if ( bLocalUseExceptions ) {
   10084          72 :       pushErrorHandler();
   10085             :     }
   10086          81 :     {
   10087          81 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   10088          81 :       EscapeBinary(arg1,arg2,arg3,arg4,arg5);
   10089          81 :       SWIG_PYTHON_THREAD_END_ALLOW;
   10090             :     }
   10091          81 :     if ( bLocalUseExceptions ) {
   10092          72 :       popErrorHandler();
   10093             :     }
   10094             : #ifndef SED_HACKS
   10095             :     if ( bLocalUseExceptions ) {
   10096             :       CPLErr eclass = CPLGetLastErrorType();
   10097             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10098             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10099             :       }
   10100             :     }
   10101             : #endif
   10102             :   }
   10103          81 :   resultobj = SWIG_Py_Void();
   10104          81 :   {
   10105             :     /* %typemap(argout) (size_t *nLen, char **pBuf ) */
   10106          81 :     Py_XDECREF(resultobj);
   10107          81 :     if( *arg4 ) {
   10108          81 :       resultobj = PyByteArray_FromStringAndSize( *arg4, *arg3 );
   10109             :     }
   10110             :     else {
   10111           0 :       resultobj = Py_None;
   10112           0 :       Py_INCREF(Py_None);
   10113             :     }
   10114             :   }
   10115          81 :   {
   10116             :     /* %typemap(freearg) (int *nLen, char *pBuf ) */
   10117          81 :     if( viewIsValid1 ) {
   10118          81 :       PyBuffer_Release(&view1);
   10119             :     }
   10120           0 :     else if (ReturnSame(alloc1) == SWIG_NEWOBJ ) {
   10121           0 :       delete[] arg2;
   10122             :     }
   10123             :   }
   10124          81 :   {
   10125             :     /* %typemap(freearg) (size_t *nLen, char **pBuf ) */
   10126          81 :     VSIFree( *arg4 );
   10127             :   }
   10128          81 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   10129             :   return resultobj;
   10130           0 : fail:
   10131           0 :   {
   10132             :     /* %typemap(freearg) (int *nLen, char *pBuf ) */
   10133           0 :     if( viewIsValid1 ) {
   10134           0 :       PyBuffer_Release(&view1);
   10135             :     }
   10136           0 :     else if (ReturnSame(alloc1) == SWIG_NEWOBJ ) {
   10137           0 :       delete[] arg2;
   10138             :     }
   10139             :   }
   10140           0 :   {
   10141             :     /* %typemap(freearg) (size_t *nLen, char **pBuf ) */
   10142           0 :     VSIFree( *arg4 );
   10143             :   }
   10144             :   return NULL;
   10145             : }
   10146             : 
   10147             : 
   10148           2 : SWIGINTERN PyObject *_wrap_GetLastErrorNo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10149           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10150           2 :   int result;
   10151             :   
   10152           2 :   if (!SWIG_Python_UnpackTuple(args, "GetLastErrorNo", 0, 0, 0)) SWIG_fail;
   10153           2 :   {
   10154             : #ifdef SED_HACKS
   10155           2 :     if( GetUseExceptions() ) bLocalUseExceptionsCode = FALSE;
   10156             : #endif
   10157             :     
   10158           2 :     result = CPLGetLastErrorNo();
   10159             :   }
   10160           2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   10161           2 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   10162             :   return resultobj;
   10163           0 : fail:
   10164           0 :   return NULL;
   10165             : }
   10166             : 
   10167             : 
   10168         197 : SWIGINTERN PyObject *_wrap_GetLastErrorType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10169         197 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10170         197 :   int result;
   10171             :   
   10172         197 :   if (!SWIG_Python_UnpackTuple(args, "GetLastErrorType", 0, 0, 0)) SWIG_fail;
   10173         197 :   {
   10174             : #ifdef SED_HACKS
   10175         209 :     if( GetUseExceptions() ) bLocalUseExceptionsCode = FALSE;
   10176             : #endif
   10177             :     
   10178         197 :     result = CPLGetLastErrorType();
   10179             :   }
   10180         197 :   resultobj = SWIG_From_int(static_cast< int >(result));
   10181         197 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   10182             :   return resultobj;
   10183           0 : fail:
   10184           0 :   return NULL;
   10185             : }
   10186             : 
   10187             : 
   10188        1822 : SWIGINTERN PyObject *_wrap_GetLastErrorMsg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10189        1822 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10190        1822 :   char *result = 0 ;
   10191             :   
   10192        1822 :   if (!SWIG_Python_UnpackTuple(args, "GetLastErrorMsg", 0, 0, 0)) SWIG_fail;
   10193        1822 :   {
   10194             : #ifdef SED_HACKS
   10195        2001 :     if( GetUseExceptions() ) bLocalUseExceptionsCode = FALSE;
   10196             : #endif
   10197             :     
   10198        1822 :     result = (char*)CPLGetLastErrorMsg();
   10199             :   }
   10200        1822 :   resultobj = SWIG_FromCharPtr((const char *)result);
   10201        1822 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   10202             :   return resultobj;
   10203           0 : fail:
   10204           0 :   return NULL;
   10205             : }
   10206             : 
   10207             : 
   10208           0 : SWIGINTERN PyObject *_wrap_GetErrorCounter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10209           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10210           0 :   unsigned int result;
   10211             :   
   10212           0 :   if (!SWIG_Python_UnpackTuple(args, "GetErrorCounter", 0, 0, 0)) SWIG_fail;
   10213           0 :   {
   10214             : #ifdef SED_HACKS
   10215           0 :     if( GetUseExceptions() ) bLocalUseExceptionsCode = FALSE;
   10216             : #endif
   10217             :     
   10218           0 :     result = CPLGetErrorCounter();
   10219             :   }
   10220           0 :   resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
   10221           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   10222             :   return resultobj;
   10223           0 : fail:
   10224           0 :   return NULL;
   10225             : }
   10226             : 
   10227             : 
   10228           4 : SWIGINTERN PyObject *_wrap_VSIGetLastErrorNo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10229           4 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10230           4 :   int result;
   10231             :   
   10232           4 :   if (!SWIG_Python_UnpackTuple(args, "VSIGetLastErrorNo", 0, 0, 0)) SWIG_fail;
   10233           4 :   {
   10234           4 :     const int bLocalUseExceptions = GetUseExceptions();
   10235           4 :     if ( bLocalUseExceptions ) {
   10236           0 :       pushErrorHandler();
   10237             :     }
   10238           4 :     {
   10239           4 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   10240           4 :       result = (int)VSIGetLastErrorNo();
   10241           4 :       SWIG_PYTHON_THREAD_END_ALLOW;
   10242             :     }
   10243           4 :     if ( bLocalUseExceptions ) {
   10244           0 :       popErrorHandler();
   10245             :     }
   10246             : #ifndef SED_HACKS
   10247             :     if ( bLocalUseExceptions ) {
   10248             :       CPLErr eclass = CPLGetLastErrorType();
   10249             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10250             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10251             :       }
   10252             :     }
   10253             : #endif
   10254             :   }
   10255           4 :   resultobj = SWIG_From_int(static_cast< int >(result));
   10256           4 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   10257             :   return resultobj;
   10258           0 : fail:
   10259           0 :   return NULL;
   10260             : }
   10261             : 
   10262             : 
   10263          38 : SWIGINTERN PyObject *_wrap_VSIGetLastErrorMsg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10264          38 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10265          38 :   char *result = 0 ;
   10266             :   
   10267          38 :   if (!SWIG_Python_UnpackTuple(args, "VSIGetLastErrorMsg", 0, 0, 0)) SWIG_fail;
   10268          38 :   {
   10269          38 :     const int bLocalUseExceptions = GetUseExceptions();
   10270          38 :     if ( bLocalUseExceptions ) {
   10271           9 :       pushErrorHandler();
   10272             :     }
   10273          38 :     {
   10274          38 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   10275          38 :       result = (char *)VSIGetLastErrorMsg();
   10276          38 :       SWIG_PYTHON_THREAD_END_ALLOW;
   10277             :     }
   10278          38 :     if ( bLocalUseExceptions ) {
   10279           9 :       popErrorHandler();
   10280             :     }
   10281             : #ifndef SED_HACKS
   10282             :     if ( bLocalUseExceptions ) {
   10283             :       CPLErr eclass = CPLGetLastErrorType();
   10284             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10285             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10286             :       }
   10287             :     }
   10288             : #endif
   10289             :   }
   10290          38 :   resultobj = SWIG_FromCharPtr((const char *)result);
   10291          38 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   10292             :   return resultobj;
   10293           0 : fail:
   10294           0 :   return NULL;
   10295             : }
   10296             : 
   10297             : 
   10298           2 : SWIGINTERN PyObject *_wrap_VSIErrorReset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10299           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10300             :   
   10301           2 :   if (!SWIG_Python_UnpackTuple(args, "VSIErrorReset", 0, 0, 0)) SWIG_fail;
   10302           2 :   {
   10303           2 :     const int bLocalUseExceptions = GetUseExceptions();
   10304           2 :     if ( bLocalUseExceptions ) {
   10305           0 :       pushErrorHandler();
   10306             :     }
   10307           2 :     {
   10308           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   10309           2 :       VSIErrorReset();
   10310           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   10311             :     }
   10312           2 :     if ( bLocalUseExceptions ) {
   10313           0 :       popErrorHandler();
   10314             :     }
   10315             : #ifndef SED_HACKS
   10316             :     if ( bLocalUseExceptions ) {
   10317             :       CPLErr eclass = CPLGetLastErrorType();
   10318             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10319             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10320             :       }
   10321             :     }
   10322             : #endif
   10323             :   }
   10324           2 :   resultobj = SWIG_Py_Void();
   10325           2 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   10326             :   return resultobj;
   10327           0 : fail:
   10328           0 :   return NULL;
   10329             : }
   10330             : 
   10331             : 
   10332           0 : SWIGINTERN PyObject *_wrap_PushFinderLocation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10333           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10334           0 :   char *arg1 = (char *) 0 ;
   10335           0 :   int bToFree1 = 0 ;
   10336           0 :   PyObject *swig_obj[1] ;
   10337             :   
   10338           0 :   if (!args) SWIG_fail;
   10339           0 :   swig_obj[0] = args;
   10340           0 :   {
   10341             :     /* %typemap(in) (const char *utf8_path) */
   10342           0 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   10343             :     {
   10344           0 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   10345             :     }
   10346             :     else
   10347             :     {
   10348           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   10349             :       
   10350             :     }
   10351           0 :     if (arg1 == NULL)
   10352             :     {
   10353           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   10354           0 :       SWIG_fail;
   10355             :     }
   10356             :   }
   10357           0 :   {
   10358           0 :     if (!arg1) {
   10359           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10360             :     }
   10361             :   }
   10362           0 :   {
   10363           0 :     const int bLocalUseExceptions = GetUseExceptions();
   10364           0 :     if ( bLocalUseExceptions ) {
   10365           0 :       pushErrorHandler();
   10366             :     }
   10367           0 :     {
   10368           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   10369           0 :       CPLPushFinderLocation((char const *)arg1);
   10370           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   10371             :     }
   10372           0 :     if ( bLocalUseExceptions ) {
   10373           0 :       popErrorHandler();
   10374             :     }
   10375             : #ifndef SED_HACKS
   10376             :     if ( bLocalUseExceptions ) {
   10377             :       CPLErr eclass = CPLGetLastErrorType();
   10378             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10379             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10380             :       }
   10381             :     }
   10382             : #endif
   10383             :   }
   10384           0 :   resultobj = SWIG_Py_Void();
   10385           0 :   {
   10386             :     /* %typemap(freearg) (const char *utf8_path) */
   10387           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   10388             :   }
   10389           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   10390             :   return resultobj;
   10391           0 : fail:
   10392           0 :   {
   10393             :     /* %typemap(freearg) (const char *utf8_path) */
   10394           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   10395             :   }
   10396             :   return NULL;
   10397             : }
   10398             : 
   10399             : 
   10400           0 : SWIGINTERN PyObject *_wrap_PopFinderLocation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10401           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10402             :   
   10403           0 :   if (!SWIG_Python_UnpackTuple(args, "PopFinderLocation", 0, 0, 0)) SWIG_fail;
   10404           0 :   {
   10405           0 :     const int bLocalUseExceptions = GetUseExceptions();
   10406           0 :     if ( bLocalUseExceptions ) {
   10407           0 :       pushErrorHandler();
   10408             :     }
   10409           0 :     {
   10410           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   10411           0 :       CPLPopFinderLocation();
   10412           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   10413             :     }
   10414           0 :     if ( bLocalUseExceptions ) {
   10415           0 :       popErrorHandler();
   10416             :     }
   10417             : #ifndef SED_HACKS
   10418             :     if ( bLocalUseExceptions ) {
   10419             :       CPLErr eclass = CPLGetLastErrorType();
   10420             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10421             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10422             :       }
   10423             :     }
   10424             : #endif
   10425             :   }
   10426           0 :   resultobj = SWIG_Py_Void();
   10427           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   10428             :   return resultobj;
   10429           0 : fail:
   10430           0 :   return NULL;
   10431             : }
   10432             : 
   10433             : 
   10434           0 : SWIGINTERN PyObject *_wrap_FinderClean(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10435           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10436             :   
   10437           0 :   if (!SWIG_Python_UnpackTuple(args, "FinderClean", 0, 0, 0)) SWIG_fail;
   10438           0 :   {
   10439           0 :     const int bLocalUseExceptions = GetUseExceptions();
   10440           0 :     if ( bLocalUseExceptions ) {
   10441           0 :       pushErrorHandler();
   10442             :     }
   10443           0 :     {
   10444           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   10445           0 :       CPLFinderClean();
   10446           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   10447             :     }
   10448           0 :     if ( bLocalUseExceptions ) {
   10449           0 :       popErrorHandler();
   10450             :     }
   10451             : #ifndef SED_HACKS
   10452             :     if ( bLocalUseExceptions ) {
   10453             :       CPLErr eclass = CPLGetLastErrorType();
   10454             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10455             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10456             :       }
   10457             :     }
   10458             : #endif
   10459             :   }
   10460           0 :   resultobj = SWIG_Py_Void();
   10461           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   10462             :   return resultobj;
   10463           0 : fail:
   10464           0 :   return NULL;
   10465             : }
   10466             : 
   10467             : 
   10468          41 : SWIGINTERN PyObject *_wrap_FindFile(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10469          41 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10470          41 :   char *arg1 = (char *) 0 ;
   10471          41 :   char *arg2 = (char *) 0 ;
   10472          41 :   int res1 ;
   10473          41 :   char *buf1 = 0 ;
   10474          41 :   int alloc1 = 0 ;
   10475          41 :   int bToFree2 = 0 ;
   10476          41 :   PyObject *swig_obj[2] ;
   10477          41 :   char *result = 0 ;
   10478             :   
   10479          41 :   if (!SWIG_Python_UnpackTuple(args, "FindFile", 2, 2, swig_obj)) SWIG_fail;
   10480          41 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   10481          41 :   if (!SWIG_IsOK(res1)) {
   10482           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FindFile" "', argument " "1"" of type '" "char const *""'");
   10483             :   }
   10484          41 :   arg1 = reinterpret_cast< char * >(buf1);
   10485          41 :   {
   10486             :     /* %typemap(in) (const char *utf8_path) */
   10487          41 :     if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
   10488             :     {
   10489          41 :       arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
   10490             :     }
   10491             :     else
   10492             :     {
   10493           0 :       arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
   10494             :       
   10495             :     }
   10496          41 :     if (arg2 == NULL)
   10497             :     {
   10498           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   10499           0 :       SWIG_fail;
   10500             :     }
   10501             :   }
   10502          41 :   {
   10503          41 :     if (!arg2) {
   10504          41 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10505             :     }
   10506             :   }
   10507          41 :   {
   10508          41 :     const int bLocalUseExceptions = GetUseExceptions();
   10509          41 :     if ( bLocalUseExceptions ) {
   10510          41 :       pushErrorHandler();
   10511             :     }
   10512          41 :     {
   10513          41 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   10514          41 :       result = (char *)CPLFindFile((char const *)arg1,(char const *)arg2);
   10515          41 :       SWIG_PYTHON_THREAD_END_ALLOW;
   10516             :     }
   10517          41 :     if ( bLocalUseExceptions ) {
   10518          41 :       popErrorHandler();
   10519             :     }
   10520             : #ifndef SED_HACKS
   10521             :     if ( bLocalUseExceptions ) {
   10522             :       CPLErr eclass = CPLGetLastErrorType();
   10523             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10524             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10525             :       }
   10526             :     }
   10527             : #endif
   10528             :   }
   10529          41 :   resultobj = SWIG_FromCharPtr((const char *)result);
   10530          41 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   10531          41 :   {
   10532             :     /* %typemap(freearg) (const char *utf8_path) */
   10533          41 :     GDALPythonFreeCStr(arg2, bToFree2);
   10534             :   }
   10535          41 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   10536             :   return resultobj;
   10537           0 : fail:
   10538           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   10539           0 :   {
   10540             :     /* %typemap(freearg) (const char *utf8_path) */
   10541          41 :     GDALPythonFreeCStr(arg2, bToFree2);
   10542             :   }
   10543             :   return NULL;
   10544             : }
   10545             : 
   10546             : 
   10547        3064 : SWIGINTERN PyObject *_wrap_ReadDir(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10548        3064 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10549        3064 :   char *arg1 = (char *) 0 ;
   10550        3064 :   int arg2 = (int) 0 ;
   10551        3064 :   int bToFree1 = 0 ;
   10552        3064 :   int val2 ;
   10553        3064 :   int ecode2 = 0 ;
   10554        3064 :   PyObject *swig_obj[2] ;
   10555        3064 :   char **result = 0 ;
   10556             :   
   10557        3064 :   if (!SWIG_Python_UnpackTuple(args, "ReadDir", 1, 2, swig_obj)) SWIG_fail;
   10558        3064 :   {
   10559             :     /* %typemap(in) (const char *utf8_path) */
   10560        3064 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   10561             :     {
   10562        3057 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   10563             :     }
   10564             :     else
   10565             :     {
   10566           7 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   10567             :       
   10568             :     }
   10569        3064 :     if (arg1 == NULL)
   10570             :     {
   10571           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   10572           0 :       SWIG_fail;
   10573             :     }
   10574             :   }
   10575        3064 :   if (swig_obj[1]) {
   10576           5 :     ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   10577           5 :     if (!SWIG_IsOK(ecode2)) {
   10578           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ReadDir" "', argument " "2"" of type '" "int""'");
   10579             :     } 
   10580             :     arg2 = static_cast< int >(val2);
   10581             :   }
   10582        3064 :   {
   10583        3064 :     if (!arg1) {
   10584        3064 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10585             :     }
   10586             :   }
   10587        3064 :   {
   10588        3064 :     const int bLocalUseExceptions = GetUseExceptions();
   10589        3064 :     if ( bLocalUseExceptions ) {
   10590        2317 :       pushErrorHandler();
   10591             :     }
   10592        3064 :     {
   10593        3064 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   10594        3064 :       result = (char **)wrapper_VSIReadDirEx((char const *)arg1,arg2);
   10595        3064 :       SWIG_PYTHON_THREAD_END_ALLOW;
   10596             :     }
   10597        3064 :     if ( bLocalUseExceptions ) {
   10598        2317 :       popErrorHandler();
   10599             :     }
   10600             : #ifndef SED_HACKS
   10601             :     if ( bLocalUseExceptions ) {
   10602             :       CPLErr eclass = CPLGetLastErrorType();
   10603             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10604             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10605             :       }
   10606             :     }
   10607             : #endif
   10608             :   }
   10609        3064 :   {
   10610             :     /* %typemap(out) char **CSL -> ( string ) */
   10611        3064 :     bool bErr = false;
   10612        3064 :     resultobj = CSLToList(result, &bErr);
   10613        3064 :     CSLDestroy(result);
   10614        3064 :     if( bErr ) {
   10615           0 :       SWIG_fail;
   10616             :     }
   10617             :   }
   10618        3064 :   {
   10619             :     /* %typemap(freearg) (const char *utf8_path) */
   10620        3064 :     GDALPythonFreeCStr(arg1, bToFree1);
   10621             :   }
   10622        3064 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   10623             :   return resultobj;
   10624           0 : fail:
   10625           0 :   {
   10626             :     /* %typemap(freearg) (const char *utf8_path) */
   10627        3064 :     GDALPythonFreeCStr(arg1, bToFree1);
   10628             :   }
   10629             :   return NULL;
   10630             : }
   10631             : 
   10632             : 
   10633        1255 : SWIGINTERN PyObject *_wrap_ReadDirRecursive(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10634        1255 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10635        1255 :   char *arg1 = (char *) 0 ;
   10636        1255 :   int bToFree1 = 0 ;
   10637        1255 :   PyObject *swig_obj[1] ;
   10638        1255 :   char **result = 0 ;
   10639             :   
   10640        1255 :   if (!args) SWIG_fail;
   10641        1255 :   swig_obj[0] = args;
   10642        1255 :   {
   10643             :     /* %typemap(in) (const char *utf8_path) */
   10644        1255 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   10645             :     {
   10646        1255 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   10647             :     }
   10648             :     else
   10649             :     {
   10650           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   10651             :       
   10652             :     }
   10653        1255 :     if (arg1 == NULL)
   10654             :     {
   10655           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   10656           0 :       SWIG_fail;
   10657             :     }
   10658             :   }
   10659        1255 :   {
   10660        1255 :     if (!arg1) {
   10661        1255 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10662             :     }
   10663             :   }
   10664        1255 :   {
   10665        1255 :     const int bLocalUseExceptions = GetUseExceptions();
   10666        1255 :     if ( bLocalUseExceptions ) {
   10667         237 :       pushErrorHandler();
   10668             :     }
   10669        1255 :     {
   10670        1255 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   10671        1255 :       result = (char **)VSIReadDirRecursive((char const *)arg1);
   10672        1255 :       SWIG_PYTHON_THREAD_END_ALLOW;
   10673             :     }
   10674        1255 :     if ( bLocalUseExceptions ) {
   10675         237 :       popErrorHandler();
   10676             :     }
   10677             : #ifndef SED_HACKS
   10678             :     if ( bLocalUseExceptions ) {
   10679             :       CPLErr eclass = CPLGetLastErrorType();
   10680             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10681             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10682             :       }
   10683             :     }
   10684             : #endif
   10685             :   }
   10686        1255 :   {
   10687             :     /* %typemap(out) char **CSL -> ( string ) */
   10688        1255 :     bool bErr = false;
   10689        1255 :     resultobj = CSLToList(result, &bErr);
   10690        1255 :     CSLDestroy(result);
   10691        1255 :     if( bErr ) {
   10692           0 :       SWIG_fail;
   10693             :     }
   10694             :   }
   10695        1255 :   {
   10696             :     /* %typemap(freearg) (const char *utf8_path) */
   10697        1255 :     GDALPythonFreeCStr(arg1, bToFree1);
   10698             :   }
   10699        1255 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   10700             :   return resultobj;
   10701           0 : fail:
   10702           0 :   {
   10703             :     /* %typemap(freearg) (const char *utf8_path) */
   10704        1255 :     GDALPythonFreeCStr(arg1, bToFree1);
   10705             :   }
   10706             :   return NULL;
   10707             : }
   10708             : 
   10709             : 
   10710          31 : SWIGINTERN PyObject *_wrap_OpenDir(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10711          31 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10712          31 :   char *arg1 = (char *) 0 ;
   10713          31 :   int arg2 = (int) -1 ;
   10714          31 :   char **arg3 = (char **) NULL ;
   10715          31 :   int bToFree1 = 0 ;
   10716          31 :   int val2 ;
   10717          31 :   int ecode2 = 0 ;
   10718          31 :   PyObject *swig_obj[3] ;
   10719          31 :   VSIDIR *result = 0 ;
   10720             :   
   10721          31 :   if (!SWIG_Python_UnpackTuple(args, "OpenDir", 1, 3, swig_obj)) SWIG_fail;
   10722          31 :   {
   10723             :     /* %typemap(in) (const char *utf8_path) */
   10724          31 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   10725             :     {
   10726          31 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   10727             :     }
   10728             :     else
   10729             :     {
   10730           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   10731             :       
   10732             :     }
   10733          31 :     if (arg1 == NULL)
   10734             :     {
   10735           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   10736           0 :       SWIG_fail;
   10737             :     }
   10738             :   }
   10739          31 :   if (swig_obj[1]) {
   10740          22 :     ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   10741          22 :     if (!SWIG_IsOK(ecode2)) {
   10742           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OpenDir" "', argument " "2"" of type '" "int""'");
   10743             :     } 
   10744             :     arg2 = static_cast< int >(val2);
   10745             :   }
   10746          31 :   if (swig_obj[2]) {
   10747          18 :     {
   10748             :       /* %typemap(in) char **dict */
   10749          18 :       arg3 = NULL;
   10750          18 :       if ( PySequence_Check( swig_obj[2] ) ) {
   10751          18 :         int bErr = FALSE;
   10752          18 :         arg3 = CSLFromPySequence(swig_obj[2], &bErr);
   10753          18 :         if ( bErr )
   10754             :         {
   10755           0 :           SWIG_fail;
   10756             :         }
   10757             :       }
   10758           0 :       else if ( PyMapping_Check( swig_obj[2] ) ) {
   10759           0 :         int bErr = FALSE;
   10760           0 :         arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
   10761           0 :         if ( bErr )
   10762             :         {
   10763           0 :           SWIG_fail;
   10764             :         }
   10765             :       }
   10766             :       else {
   10767           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   10768           0 :         SWIG_fail;
   10769             :       }
   10770             :     }
   10771             :   }
   10772          31 :   {
   10773          31 :     if (!arg1) {
   10774          31 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10775             :     }
   10776             :   }
   10777          31 :   {
   10778          31 :     const int bLocalUseExceptions = GetUseExceptions();
   10779          31 :     if ( bLocalUseExceptions ) {
   10780           0 :       pushErrorHandler();
   10781             :     }
   10782          31 :     {
   10783          31 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   10784          31 :       result = (VSIDIR *)wrapper_VSIOpenDir((char const *)arg1,arg2,arg3);
   10785          31 :       SWIG_PYTHON_THREAD_END_ALLOW;
   10786             :     }
   10787          31 :     if ( bLocalUseExceptions ) {
   10788           0 :       popErrorHandler();
   10789             :     }
   10790             : #ifndef SED_HACKS
   10791             :     if ( bLocalUseExceptions ) {
   10792             :       CPLErr eclass = CPLGetLastErrorType();
   10793             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10794             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10795             :       }
   10796             :     }
   10797             : #endif
   10798             :   }
   10799          31 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VSIDIR, 0 |  0 );
   10800          31 :   {
   10801             :     /* %typemap(freearg) (const char *utf8_path) */
   10802          31 :     GDALPythonFreeCStr(arg1, bToFree1);
   10803             :   }
   10804          31 :   {
   10805             :     /* %typemap(freearg) char **dict */
   10806          31 :     CSLDestroy( arg3 );
   10807             :   }
   10808          31 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   10809             :   return resultobj;
   10810           0 : fail:
   10811           0 :   {
   10812             :     /* %typemap(freearg) (const char *utf8_path) */
   10813           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   10814             :   }
   10815           0 :   {
   10816             :     /* %typemap(freearg) char **dict */
   10817           0 :     CSLDestroy( arg3 );
   10818             :   }
   10819             :   return NULL;
   10820             : }
   10821             : 
   10822             : 
   10823          73 : SWIGINTERN PyObject *_wrap_DirEntry_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10824          73 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10825          73 :   DirEntry *arg1 = (DirEntry *) 0 ;
   10826          73 :   void *argp1 = 0 ;
   10827          73 :   int res1 = 0 ;
   10828          73 :   PyObject *swig_obj[1] ;
   10829          73 :   char *result = 0 ;
   10830             :   
   10831          73 :   if (!args) SWIG_fail;
   10832          73 :   swig_obj[0] = args;
   10833          73 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DirEntry, 0 |  0 );
   10834          73 :   if (!SWIG_IsOK(res1)) {
   10835           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DirEntry_name_get" "', argument " "1"" of type '" "DirEntry *""'"); 
   10836             :   }
   10837          73 :   arg1 = reinterpret_cast< DirEntry * >(argp1);
   10838          73 :   {
   10839          73 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   10840          73 :     result = (char *) ((arg1)->name);
   10841          73 :     SWIG_PYTHON_THREAD_END_ALLOW;
   10842             :   }
   10843          73 :   resultobj = SWIG_FromCharPtr((const char *)result);
   10844          73 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   10845             :   return resultobj;
   10846             : fail:
   10847             :   return NULL;
   10848             : }
   10849             : 
   10850             : 
   10851          37 : SWIGINTERN PyObject *_wrap_DirEntry_mode_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10852          37 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10853          37 :   DirEntry *arg1 = (DirEntry *) 0 ;
   10854          37 :   void *argp1 = 0 ;
   10855          37 :   int res1 = 0 ;
   10856          37 :   PyObject *swig_obj[1] ;
   10857          37 :   int result;
   10858             :   
   10859          37 :   if (!args) SWIG_fail;
   10860          37 :   swig_obj[0] = args;
   10861          37 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DirEntry, 0 |  0 );
   10862          37 :   if (!SWIG_IsOK(res1)) {
   10863           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DirEntry_mode_get" "', argument " "1"" of type '" "DirEntry *""'"); 
   10864             :   }
   10865          37 :   arg1 = reinterpret_cast< DirEntry * >(argp1);
   10866          37 :   {
   10867          37 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   10868          37 :     result = (int) ((arg1)->mode);
   10869          37 :     SWIG_PYTHON_THREAD_END_ALLOW;
   10870             :   }
   10871          37 :   resultobj = SWIG_From_int(static_cast< int >(result));
   10872          37 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   10873             :   return resultobj;
   10874             : fail:
   10875             :   return NULL;
   10876             : }
   10877             : 
   10878             : 
   10879          15 : SWIGINTERN PyObject *_wrap_DirEntry_size_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10880          15 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10881          15 :   DirEntry *arg1 = (DirEntry *) 0 ;
   10882          15 :   void *argp1 = 0 ;
   10883          15 :   int res1 = 0 ;
   10884          15 :   PyObject *swig_obj[1] ;
   10885          15 :   GIntBig result;
   10886             :   
   10887          15 :   if (!args) SWIG_fail;
   10888          15 :   swig_obj[0] = args;
   10889          15 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DirEntry, 0 |  0 );
   10890          15 :   if (!SWIG_IsOK(res1)) {
   10891           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DirEntry_size_get" "', argument " "1"" of type '" "DirEntry *""'"); 
   10892             :   }
   10893          15 :   arg1 = reinterpret_cast< DirEntry * >(argp1);
   10894          15 :   {
   10895          15 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   10896          15 :     result =  ((arg1)->size);
   10897          15 :     SWIG_PYTHON_THREAD_END_ALLOW;
   10898             :   }
   10899          15 :   {
   10900          15 :     resultobj = PyLong_FromLongLong(result);
   10901             :   }
   10902          15 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   10903             :   return resultobj;
   10904             : fail:
   10905             :   return NULL;
   10906             : }
   10907             : 
   10908             : 
   10909          12 : SWIGINTERN PyObject *_wrap_DirEntry_mtime_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10910          12 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10911          12 :   DirEntry *arg1 = (DirEntry *) 0 ;
   10912          12 :   void *argp1 = 0 ;
   10913          12 :   int res1 = 0 ;
   10914          12 :   PyObject *swig_obj[1] ;
   10915          12 :   GIntBig result;
   10916             :   
   10917          12 :   if (!args) SWIG_fail;
   10918          12 :   swig_obj[0] = args;
   10919          12 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DirEntry, 0 |  0 );
   10920          12 :   if (!SWIG_IsOK(res1)) {
   10921           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DirEntry_mtime_get" "', argument " "1"" of type '" "DirEntry *""'"); 
   10922             :   }
   10923          12 :   arg1 = reinterpret_cast< DirEntry * >(argp1);
   10924          12 :   {
   10925          12 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   10926          12 :     result =  ((arg1)->mtime);
   10927          12 :     SWIG_PYTHON_THREAD_END_ALLOW;
   10928             :   }
   10929          12 :   {
   10930          12 :     resultobj = PyLong_FromLongLong(result);
   10931             :   }
   10932          12 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   10933             :   return resultobj;
   10934             : fail:
   10935             :   return NULL;
   10936             : }
   10937             : 
   10938             : 
   10939           2 : SWIGINTERN PyObject *_wrap_DirEntry_modeKnown_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10940           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10941           2 :   DirEntry *arg1 = (DirEntry *) 0 ;
   10942           2 :   void *argp1 = 0 ;
   10943           2 :   int res1 = 0 ;
   10944           2 :   PyObject *swig_obj[1] ;
   10945           2 :   bool result;
   10946             :   
   10947           2 :   if (!args) SWIG_fail;
   10948           2 :   swig_obj[0] = args;
   10949           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DirEntry, 0 |  0 );
   10950           2 :   if (!SWIG_IsOK(res1)) {
   10951           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DirEntry_modeKnown_get" "', argument " "1"" of type '" "DirEntry *""'"); 
   10952             :   }
   10953           2 :   arg1 = reinterpret_cast< DirEntry * >(argp1);
   10954           2 :   {
   10955           2 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   10956           2 :     result = (bool) ((arg1)->modeKnown);
   10957           2 :     SWIG_PYTHON_THREAD_END_ALLOW;
   10958             :   }
   10959           2 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   10960           2 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   10961             :   return resultobj;
   10962             : fail:
   10963             :   return NULL;
   10964             : }
   10965             : 
   10966             : 
   10967           2 : SWIGINTERN PyObject *_wrap_DirEntry_sizeKnown_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10968           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10969           2 :   DirEntry *arg1 = (DirEntry *) 0 ;
   10970           2 :   void *argp1 = 0 ;
   10971           2 :   int res1 = 0 ;
   10972           2 :   PyObject *swig_obj[1] ;
   10973           2 :   bool result;
   10974             :   
   10975           2 :   if (!args) SWIG_fail;
   10976           2 :   swig_obj[0] = args;
   10977           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DirEntry, 0 |  0 );
   10978           2 :   if (!SWIG_IsOK(res1)) {
   10979           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DirEntry_sizeKnown_get" "', argument " "1"" of type '" "DirEntry *""'"); 
   10980             :   }
   10981           2 :   arg1 = reinterpret_cast< DirEntry * >(argp1);
   10982           2 :   {
   10983           2 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   10984           2 :     result = (bool) ((arg1)->sizeKnown);
   10985           2 :     SWIG_PYTHON_THREAD_END_ALLOW;
   10986             :   }
   10987           2 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   10988           2 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   10989             :   return resultobj;
   10990             : fail:
   10991             :   return NULL;
   10992             : }
   10993             : 
   10994             : 
   10995           2 : SWIGINTERN PyObject *_wrap_DirEntry_mtimeKnown_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10996           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10997           2 :   DirEntry *arg1 = (DirEntry *) 0 ;
   10998           2 :   void *argp1 = 0 ;
   10999           2 :   int res1 = 0 ;
   11000           2 :   PyObject *swig_obj[1] ;
   11001           2 :   bool result;
   11002             :   
   11003           2 :   if (!args) SWIG_fail;
   11004           2 :   swig_obj[0] = args;
   11005           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DirEntry, 0 |  0 );
   11006           2 :   if (!SWIG_IsOK(res1)) {
   11007           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DirEntry_mtimeKnown_get" "', argument " "1"" of type '" "DirEntry *""'"); 
   11008             :   }
   11009           2 :   arg1 = reinterpret_cast< DirEntry * >(argp1);
   11010           2 :   {
   11011           2 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11012           2 :     result = (bool) ((arg1)->mtimeKnown);
   11013           2 :     SWIG_PYTHON_THREAD_END_ALLOW;
   11014             :   }
   11015           2 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   11016           2 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   11017             :   return resultobj;
   11018             : fail:
   11019             :   return NULL;
   11020             : }
   11021             : 
   11022             : 
   11023           2 : SWIGINTERN PyObject *_wrap_DirEntry_extra_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11024           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11025           2 :   DirEntry *arg1 = (DirEntry *) 0 ;
   11026           2 :   void *argp1 = 0 ;
   11027           2 :   int res1 = 0 ;
   11028           2 :   PyObject *swig_obj[1] ;
   11029           2 :   char **result = 0 ;
   11030             :   
   11031           2 :   if (!args) SWIG_fail;
   11032           2 :   swig_obj[0] = args;
   11033           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DirEntry, 0 |  0 );
   11034           2 :   if (!SWIG_IsOK(res1)) {
   11035           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DirEntry_extra_get" "', argument " "1"" of type '" "DirEntry *""'"); 
   11036             :   }
   11037           2 :   arg1 = reinterpret_cast< DirEntry * >(argp1);
   11038           2 :   {
   11039           2 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11040           2 :     result = (char **) ((arg1)->extra);
   11041           2 :     SWIG_PYTHON_THREAD_END_ALLOW;
   11042             :   }
   11043           2 :   {
   11044             :     /* %typemap(out) char **dict */
   11045           2 :     resultobj = GetCSLStringAsPyDict(result, false);
   11046             :   }
   11047           2 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   11048             :   return resultobj;
   11049             : fail:
   11050             :   return NULL;
   11051             : }
   11052             : 
   11053             : 
   11054           0 : SWIGINTERN PyObject *_wrap_new_DirEntry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11055           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11056           0 :   DirEntry *arg1 = (DirEntry *) 0 ;
   11057           0 :   void *argp1 = 0 ;
   11058           0 :   int res1 = 0 ;
   11059           0 :   PyObject *swig_obj[1] ;
   11060           0 :   DirEntry *result = 0 ;
   11061             :   
   11062           0 :   if (!args) SWIG_fail;
   11063           0 :   swig_obj[0] = args;
   11064           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DirEntry, 0 |  0 );
   11065           0 :   if (!SWIG_IsOK(res1)) {
   11066           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DirEntry" "', argument " "1"" of type '" "DirEntry const *""'"); 
   11067             :   }
   11068           0 :   arg1 = reinterpret_cast< DirEntry * >(argp1);
   11069           0 :   {
   11070           0 :     const int bLocalUseExceptions = GetUseExceptions();
   11071           0 :     if ( bLocalUseExceptions ) {
   11072           0 :       pushErrorHandler();
   11073             :     }
   11074           0 :     {
   11075           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11076           0 :       result = (DirEntry *)new_DirEntry((DirEntry const *)arg1);
   11077           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   11078             :     }
   11079           0 :     if ( bLocalUseExceptions ) {
   11080           0 :       popErrorHandler();
   11081             :     }
   11082             : #ifndef SED_HACKS
   11083             :     if ( bLocalUseExceptions ) {
   11084             :       CPLErr eclass = CPLGetLastErrorType();
   11085             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11086             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11087             :       }
   11088             :     }
   11089             : #endif
   11090             :   }
   11091           0 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DirEntry, SWIG_POINTER_NEW |  0 );
   11092           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   11093             :   return resultobj;
   11094             : fail:
   11095             :   return NULL;
   11096             : }
   11097             : 
   11098             : 
   11099          71 : SWIGINTERN PyObject *_wrap_delete_DirEntry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11100          71 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11101          71 :   DirEntry *arg1 = (DirEntry *) 0 ;
   11102          71 :   void *argp1 = 0 ;
   11103          71 :   int res1 = 0 ;
   11104          71 :   PyObject *swig_obj[1] ;
   11105             :   
   11106          71 :   if (!args) SWIG_fail;
   11107          71 :   swig_obj[0] = args;
   11108          71 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DirEntry, SWIG_POINTER_DISOWN |  0 );
   11109          71 :   if (!SWIG_IsOK(res1)) {
   11110           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DirEntry" "', argument " "1"" of type '" "DirEntry *""'"); 
   11111             :   }
   11112          71 :   arg1 = reinterpret_cast< DirEntry * >(argp1);
   11113          71 :   {
   11114          71 :     const int bLocalUseExceptions = GetUseExceptions();
   11115          71 :     if ( bLocalUseExceptions ) {
   11116           0 :       pushErrorHandler();
   11117             :     }
   11118          71 :     {
   11119          71 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11120          71 :       delete_DirEntry(arg1);
   11121          71 :       SWIG_PYTHON_THREAD_END_ALLOW;
   11122             :     }
   11123          71 :     if ( bLocalUseExceptions ) {
   11124           0 :       popErrorHandler();
   11125             :     }
   11126             : #ifndef SED_HACKS
   11127             :     if ( bLocalUseExceptions ) {
   11128             :       CPLErr eclass = CPLGetLastErrorType();
   11129             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11130             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11131             :       }
   11132             :     }
   11133             : #endif
   11134             :   }
   11135          71 :   resultobj = SWIG_Py_Void();
   11136          71 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   11137             :   return resultobj;
   11138             : fail:
   11139             :   return NULL;
   11140             : }
   11141             : 
   11142             : 
   11143           0 : SWIGINTERN PyObject *_wrap_DirEntry_IsDirectory(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11144           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11145           0 :   DirEntry *arg1 = (DirEntry *) 0 ;
   11146           0 :   void *argp1 = 0 ;
   11147           0 :   int res1 = 0 ;
   11148           0 :   PyObject *swig_obj[1] ;
   11149           0 :   bool result;
   11150             :   
   11151           0 :   if (!args) SWIG_fail;
   11152           0 :   swig_obj[0] = args;
   11153           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DirEntry, 0 |  0 );
   11154           0 :   if (!SWIG_IsOK(res1)) {
   11155           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DirEntry_IsDirectory" "', argument " "1"" of type '" "DirEntry *""'"); 
   11156             :   }
   11157           0 :   arg1 = reinterpret_cast< DirEntry * >(argp1);
   11158           0 :   {
   11159           0 :     const int bLocalUseExceptions = GetUseExceptions();
   11160           0 :     if ( bLocalUseExceptions ) {
   11161           0 :       pushErrorHandler();
   11162             :     }
   11163           0 :     {
   11164           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11165           0 :       result = (bool)DirEntry_IsDirectory(arg1);
   11166           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   11167             :     }
   11168           0 :     if ( bLocalUseExceptions ) {
   11169           0 :       popErrorHandler();
   11170             :     }
   11171             : #ifndef SED_HACKS
   11172             :     if ( bLocalUseExceptions ) {
   11173             :       CPLErr eclass = CPLGetLastErrorType();
   11174             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11175             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11176             :       }
   11177             :     }
   11178             : #endif
   11179             :   }
   11180           0 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   11181           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   11182             :   return resultobj;
   11183             : fail:
   11184             :   return NULL;
   11185             : }
   11186             : 
   11187             : 
   11188         271 : SWIGINTERN PyObject *DirEntry_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11189         271 :   PyObject *obj;
   11190         271 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   11191         271 :   SWIG_TypeNewClientData(SWIGTYPE_p_DirEntry, SWIG_NewClientData(obj));
   11192         271 :   return SWIG_Py_Void();
   11193             : }
   11194             : 
   11195           0 : SWIGINTERN PyObject *DirEntry_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11196           0 :   return SWIG_Python_InitShadowInstance(args);
   11197             : }
   11198             : 
   11199         100 : SWIGINTERN PyObject *_wrap_GetNextDirEntry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11200         100 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11201         100 :   VSIDIR *arg1 = (VSIDIR *) 0 ;
   11202         100 :   void *argp1 = 0 ;
   11203         100 :   int res1 = 0 ;
   11204         100 :   PyObject *swig_obj[1] ;
   11205         100 :   DirEntry *result = 0 ;
   11206             :   
   11207         100 :   if (!args) SWIG_fail;
   11208         100 :   swig_obj[0] = args;
   11209         100 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_VSIDIR, 0 |  0 );
   11210         100 :   if (!SWIG_IsOK(res1)) {
   11211           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetNextDirEntry" "', argument " "1"" of type '" "VSIDIR *""'"); 
   11212             :   }
   11213         100 :   arg1 = reinterpret_cast< VSIDIR * >(argp1);
   11214         100 :   {
   11215         100 :     if (!arg1) {
   11216           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   11217             :     }
   11218             :   }
   11219         100 :   {
   11220         100 :     const int bLocalUseExceptions = GetUseExceptions();
   11221         100 :     if ( bLocalUseExceptions ) {
   11222           0 :       pushErrorHandler();
   11223             :     }
   11224         100 :     {
   11225         100 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11226         100 :       result = (DirEntry *)wrapper_VSIGetNextDirEntry(arg1);
   11227         100 :       SWIG_PYTHON_THREAD_END_ALLOW;
   11228             :     }
   11229         100 :     if ( bLocalUseExceptions ) {
   11230           0 :       popErrorHandler();
   11231             :     }
   11232             : #ifndef SED_HACKS
   11233             :     if ( bLocalUseExceptions ) {
   11234             :       CPLErr eclass = CPLGetLastErrorType();
   11235             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11236             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11237             :       }
   11238             :     }
   11239             : #endif
   11240             :   }
   11241         100 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DirEntry, SWIG_POINTER_OWN |  0 );
   11242         100 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   11243             :   return resultobj;
   11244             : fail:
   11245             :   return NULL;
   11246             : }
   11247             : 
   11248             : 
   11249          29 : SWIGINTERN PyObject *_wrap_CloseDir(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11250          29 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11251          29 :   VSIDIR *arg1 = (VSIDIR *) 0 ;
   11252          29 :   void *argp1 = 0 ;
   11253          29 :   int res1 = 0 ;
   11254          29 :   PyObject *swig_obj[1] ;
   11255             :   
   11256          29 :   if (!args) SWIG_fail;
   11257          29 :   swig_obj[0] = args;
   11258          29 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_VSIDIR, 0 |  0 );
   11259          29 :   if (!SWIG_IsOK(res1)) {
   11260           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CloseDir" "', argument " "1"" of type '" "VSIDIR *""'"); 
   11261             :   }
   11262          29 :   arg1 = reinterpret_cast< VSIDIR * >(argp1);
   11263          29 :   {
   11264          29 :     if (!arg1) {
   11265           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   11266             :     }
   11267             :   }
   11268          29 :   {
   11269          29 :     const int bLocalUseExceptions = GetUseExceptions();
   11270          29 :     if ( bLocalUseExceptions ) {
   11271           0 :       pushErrorHandler();
   11272             :     }
   11273          29 :     {
   11274          29 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11275          29 :       VSICloseDir(arg1);
   11276          29 :       SWIG_PYTHON_THREAD_END_ALLOW;
   11277             :     }
   11278          29 :     if ( bLocalUseExceptions ) {
   11279           0 :       popErrorHandler();
   11280             :     }
   11281             : #ifndef SED_HACKS
   11282             :     if ( bLocalUseExceptions ) {
   11283             :       CPLErr eclass = CPLGetLastErrorType();
   11284             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11285             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11286             :       }
   11287             :     }
   11288             : #endif
   11289             :   }
   11290          29 :   resultobj = SWIG_Py_Void();
   11291          29 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   11292             :   return resultobj;
   11293             : fail:
   11294             :   return NULL;
   11295             : }
   11296             : 
   11297             : 
   11298        3385 : SWIGINTERN PyObject *_wrap_SetConfigOption(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11299        3385 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11300        3385 :   char *arg1 = (char *) 0 ;
   11301        3385 :   char *arg2 = (char *) 0 ;
   11302        3385 :   int res1 ;
   11303        3385 :   char *buf1 = 0 ;
   11304        3385 :   int alloc1 = 0 ;
   11305        3385 :   int res2 ;
   11306        3385 :   char *buf2 = 0 ;
   11307        3385 :   int alloc2 = 0 ;
   11308        3385 :   PyObject *swig_obj[2] ;
   11309             :   
   11310        3385 :   if (!SWIG_Python_UnpackTuple(args, "SetConfigOption", 2, 2, swig_obj)) SWIG_fail;
   11311        3385 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   11312        3385 :   if (!SWIG_IsOK(res1)) {
   11313           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SetConfigOption" "', argument " "1"" of type '" "char const *""'");
   11314             :   }
   11315        3385 :   arg1 = reinterpret_cast< char * >(buf1);
   11316        3385 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   11317        3385 :   if (!SWIG_IsOK(res2)) {
   11318           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SetConfigOption" "', argument " "2"" of type '" "char const *""'");
   11319             :   }
   11320        3385 :   arg2 = reinterpret_cast< char * >(buf2);
   11321        3385 :   {
   11322        3385 :     if (!arg1) {
   11323           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   11324             :     }
   11325             :   }
   11326        3385 :   {
   11327        3385 :     const int bLocalUseExceptions = GetUseExceptions();
   11328        3385 :     if ( bLocalUseExceptions ) {
   11329         214 :       pushErrorHandler();
   11330             :     }
   11331        3385 :     {
   11332        3385 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11333        3385 :       CPLSetConfigOption((char const *)arg1,(char const *)arg2);
   11334        3385 :       SWIG_PYTHON_THREAD_END_ALLOW;
   11335             :     }
   11336        3385 :     if ( bLocalUseExceptions ) {
   11337         214 :       popErrorHandler();
   11338             :     }
   11339             : #ifndef SED_HACKS
   11340             :     if ( bLocalUseExceptions ) {
   11341             :       CPLErr eclass = CPLGetLastErrorType();
   11342             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11343             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11344             :       }
   11345             :     }
   11346             : #endif
   11347             :   }
   11348        3385 :   resultobj = SWIG_Py_Void();
   11349        3385 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   11350        3385 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   11351        3385 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   11352             :   return resultobj;
   11353           0 : fail:
   11354           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   11355           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   11356             :   return NULL;
   11357             : }
   11358             : 
   11359             : 
   11360        5048 : SWIGINTERN PyObject *_wrap_SetThreadLocalConfigOption(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11361        5048 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11362        5048 :   char *arg1 = (char *) 0 ;
   11363        5048 :   char *arg2 = (char *) 0 ;
   11364        5048 :   int res1 ;
   11365        5048 :   char *buf1 = 0 ;
   11366        5048 :   int alloc1 = 0 ;
   11367        5048 :   int res2 ;
   11368        5048 :   char *buf2 = 0 ;
   11369        5048 :   int alloc2 = 0 ;
   11370        5048 :   PyObject *swig_obj[2] ;
   11371             :   
   11372        5048 :   if (!SWIG_Python_UnpackTuple(args, "SetThreadLocalConfigOption", 2, 2, swig_obj)) SWIG_fail;
   11373        5048 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   11374        5048 :   if (!SWIG_IsOK(res1)) {
   11375           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SetThreadLocalConfigOption" "', argument " "1"" of type '" "char const *""'");
   11376             :   }
   11377        5048 :   arg1 = reinterpret_cast< char * >(buf1);
   11378        5048 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   11379        5048 :   if (!SWIG_IsOK(res2)) {
   11380           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SetThreadLocalConfigOption" "', argument " "2"" of type '" "char const *""'");
   11381             :   }
   11382        5048 :   arg2 = reinterpret_cast< char * >(buf2);
   11383        5048 :   {
   11384        5048 :     if (!arg1) {
   11385           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   11386             :     }
   11387             :   }
   11388        5048 :   {
   11389        5048 :     const int bLocalUseExceptions = GetUseExceptions();
   11390        5048 :     if ( bLocalUseExceptions ) {
   11391        2034 :       pushErrorHandler();
   11392             :     }
   11393        5048 :     {
   11394        5048 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11395        5048 :       CPLSetThreadLocalConfigOption((char const *)arg1,(char const *)arg2);
   11396        5048 :       SWIG_PYTHON_THREAD_END_ALLOW;
   11397             :     }
   11398        5048 :     if ( bLocalUseExceptions ) {
   11399        2034 :       popErrorHandler();
   11400             :     }
   11401             : #ifndef SED_HACKS
   11402             :     if ( bLocalUseExceptions ) {
   11403             :       CPLErr eclass = CPLGetLastErrorType();
   11404             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11405             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11406             :       }
   11407             :     }
   11408             : #endif
   11409             :   }
   11410        5048 :   resultobj = SWIG_Py_Void();
   11411        5048 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   11412        5048 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   11413        5048 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   11414             :   return resultobj;
   11415           0 : fail:
   11416           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   11417           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   11418             :   return NULL;
   11419             : }
   11420             : 
   11421             : 
   11422       15819 : SWIGINTERN PyObject *_wrap_GetConfigOption(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11423       15819 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11424       15819 :   char *arg1 = (char *) 0 ;
   11425       15819 :   char *arg2 = (char *) NULL ;
   11426       15819 :   int res1 ;
   11427       15819 :   char *buf1 = 0 ;
   11428       15819 :   int alloc1 = 0 ;
   11429       15819 :   int res2 ;
   11430       15819 :   char *buf2 = 0 ;
   11431       15819 :   int alloc2 = 0 ;
   11432       15819 :   PyObject *swig_obj[2] ;
   11433       15819 :   char *result = 0 ;
   11434             :   
   11435       15819 :   if (!SWIG_Python_UnpackTuple(args, "GetConfigOption", 1, 2, swig_obj)) SWIG_fail;
   11436       15819 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   11437       15819 :   if (!SWIG_IsOK(res1)) {
   11438           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetConfigOption" "', argument " "1"" of type '" "char const *""'");
   11439             :   }
   11440       15819 :   arg1 = reinterpret_cast< char * >(buf1);
   11441       15819 :   if (swig_obj[1]) {
   11442        1057 :     res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   11443        1057 :     if (!SWIG_IsOK(res2)) {
   11444           0 :       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GetConfigOption" "', argument " "2"" of type '" "char const *""'");
   11445             :     }
   11446        1057 :     arg2 = reinterpret_cast< char * >(buf2);
   11447             :   }
   11448       15819 :   {
   11449       15819 :     if (!arg1) {
   11450           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   11451             :     }
   11452             :   }
   11453       15819 :   {
   11454       15819 :     const int bLocalUseExceptions = GetUseExceptions();
   11455       15819 :     if ( bLocalUseExceptions ) {
   11456       15295 :       pushErrorHandler();
   11457             :     }
   11458       15819 :     {
   11459       15819 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11460       15819 :       result = (char *)wrapper_CPLGetConfigOption((char const *)arg1,(char const *)arg2);
   11461       15819 :       SWIG_PYTHON_THREAD_END_ALLOW;
   11462             :     }
   11463       15819 :     if ( bLocalUseExceptions ) {
   11464       15295 :       popErrorHandler();
   11465             :     }
   11466             : #ifndef SED_HACKS
   11467             :     if ( bLocalUseExceptions ) {
   11468             :       CPLErr eclass = CPLGetLastErrorType();
   11469             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11470             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11471             :       }
   11472             :     }
   11473             : #endif
   11474             :   }
   11475       15819 :   resultobj = SWIG_FromCharPtr((const char *)result);
   11476       15819 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   11477       15819 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   11478       15819 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   11479             :   return resultobj;
   11480           0 : fail:
   11481           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   11482           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   11483             :   return NULL;
   11484             : }
   11485             : 
   11486             : 
   11487        1512 : SWIGINTERN PyObject *_wrap_GetGlobalConfigOption(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11488        1512 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11489        1512 :   char *arg1 = (char *) 0 ;
   11490        1512 :   char *arg2 = (char *) NULL ;
   11491        1512 :   int res1 ;
   11492        1512 :   char *buf1 = 0 ;
   11493        1512 :   int alloc1 = 0 ;
   11494        1512 :   int res2 ;
   11495        1512 :   char *buf2 = 0 ;
   11496        1512 :   int alloc2 = 0 ;
   11497        1512 :   PyObject *swig_obj[2] ;
   11498        1512 :   char *result = 0 ;
   11499             :   
   11500        1512 :   if (!SWIG_Python_UnpackTuple(args, "GetGlobalConfigOption", 1, 2, swig_obj)) SWIG_fail;
   11501        1512 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   11502        1512 :   if (!SWIG_IsOK(res1)) {
   11503           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetGlobalConfigOption" "', argument " "1"" of type '" "char const *""'");
   11504             :   }
   11505        1512 :   arg1 = reinterpret_cast< char * >(buf1);
   11506        1512 :   if (swig_obj[1]) {
   11507           0 :     res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   11508           0 :     if (!SWIG_IsOK(res2)) {
   11509           0 :       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GetGlobalConfigOption" "', argument " "2"" of type '" "char const *""'");
   11510             :     }
   11511           0 :     arg2 = reinterpret_cast< char * >(buf2);
   11512             :   }
   11513        1512 :   {
   11514        1512 :     if (!arg1) {
   11515           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   11516             :     }
   11517             :   }
   11518        1512 :   {
   11519        1512 :     const int bLocalUseExceptions = GetUseExceptions();
   11520        1512 :     if ( bLocalUseExceptions ) {
   11521          66 :       pushErrorHandler();
   11522             :     }
   11523        1512 :     {
   11524        1512 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11525        1512 :       result = (char *)wrapper_CPLGetGlobalConfigOption((char const *)arg1,(char const *)arg2);
   11526        1512 :       SWIG_PYTHON_THREAD_END_ALLOW;
   11527             :     }
   11528        1512 :     if ( bLocalUseExceptions ) {
   11529          66 :       popErrorHandler();
   11530             :     }
   11531             : #ifndef SED_HACKS
   11532             :     if ( bLocalUseExceptions ) {
   11533             :       CPLErr eclass = CPLGetLastErrorType();
   11534             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11535             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11536             :       }
   11537             :     }
   11538             : #endif
   11539             :   }
   11540        1512 :   resultobj = SWIG_FromCharPtr((const char *)result);
   11541        1512 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   11542        1512 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   11543        1512 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   11544             :   return resultobj;
   11545           0 : fail:
   11546           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   11547           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   11548             :   return NULL;
   11549             : }
   11550             : 
   11551             : 
   11552        2529 : SWIGINTERN PyObject *_wrap_GetThreadLocalConfigOption(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11553        2529 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11554        2529 :   char *arg1 = (char *) 0 ;
   11555        2529 :   char *arg2 = (char *) NULL ;
   11556        2529 :   int res1 ;
   11557        2529 :   char *buf1 = 0 ;
   11558        2529 :   int alloc1 = 0 ;
   11559        2529 :   int res2 ;
   11560        2529 :   char *buf2 = 0 ;
   11561        2529 :   int alloc2 = 0 ;
   11562        2529 :   PyObject *swig_obj[2] ;
   11563        2529 :   char *result = 0 ;
   11564             :   
   11565        2529 :   if (!SWIG_Python_UnpackTuple(args, "GetThreadLocalConfigOption", 1, 2, swig_obj)) SWIG_fail;
   11566        2529 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   11567        2529 :   if (!SWIG_IsOK(res1)) {
   11568           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetThreadLocalConfigOption" "', argument " "1"" of type '" "char const *""'");
   11569             :   }
   11570        2529 :   arg1 = reinterpret_cast< char * >(buf1);
   11571        2529 :   if (swig_obj[1]) {
   11572           0 :     res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   11573           0 :     if (!SWIG_IsOK(res2)) {
   11574           0 :       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GetThreadLocalConfigOption" "', argument " "2"" of type '" "char const *""'");
   11575             :     }
   11576           0 :     arg2 = reinterpret_cast< char * >(buf2);
   11577             :   }
   11578        2529 :   {
   11579        2529 :     if (!arg1) {
   11580           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   11581             :     }
   11582             :   }
   11583        2529 :   {
   11584        2529 :     const int bLocalUseExceptions = GetUseExceptions();
   11585        2529 :     if ( bLocalUseExceptions ) {
   11586        1017 :       pushErrorHandler();
   11587             :     }
   11588        2529 :     {
   11589        2529 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11590        2529 :       result = (char *)wrapper_CPLGetThreadLocalConfigOption((char const *)arg1,(char const *)arg2);
   11591        2529 :       SWIG_PYTHON_THREAD_END_ALLOW;
   11592             :     }
   11593        2529 :     if ( bLocalUseExceptions ) {
   11594        1017 :       popErrorHandler();
   11595             :     }
   11596             : #ifndef SED_HACKS
   11597             :     if ( bLocalUseExceptions ) {
   11598             :       CPLErr eclass = CPLGetLastErrorType();
   11599             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11600             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11601             :       }
   11602             :     }
   11603             : #endif
   11604             :   }
   11605        2529 :   resultobj = SWIG_FromCharPtr((const char *)result);
   11606        2529 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   11607        2529 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   11608        2529 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   11609             :   return resultobj;
   11610           0 : fail:
   11611           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   11612           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   11613             :   return NULL;
   11614             : }
   11615             : 
   11616             : 
   11617           6 : SWIGINTERN PyObject *_wrap_GetConfigOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11618           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11619           6 :   char **result = 0 ;
   11620             :   
   11621           6 :   if (!SWIG_Python_UnpackTuple(args, "GetConfigOptions", 0, 0, 0)) SWIG_fail;
   11622           6 :   {
   11623           6 :     const int bLocalUseExceptions = GetUseExceptions();
   11624           6 :     if ( bLocalUseExceptions ) {
   11625           0 :       pushErrorHandler();
   11626             :     }
   11627           6 :     {
   11628           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11629           6 :       result = (char **)wrapper_GetConfigOptions();
   11630           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   11631             :     }
   11632           6 :     if ( bLocalUseExceptions ) {
   11633           0 :       popErrorHandler();
   11634             :     }
   11635             : #ifndef SED_HACKS
   11636             :     if ( bLocalUseExceptions ) {
   11637             :       CPLErr eclass = CPLGetLastErrorType();
   11638             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11639             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11640             :       }
   11641             :     }
   11642             : #endif
   11643             :   }
   11644           6 :   {
   11645             :     /* %typemap(out) char **dict */
   11646           6 :     resultobj = GetCSLStringAsPyDict(result, true);
   11647             :   }
   11648           6 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   11649             :   return resultobj;
   11650           0 : fail:
   11651           0 :   return NULL;
   11652             : }
   11653             : 
   11654             : 
   11655          19 : SWIGINTERN PyObject *_wrap_SetPathSpecificOption(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11656          19 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11657          19 :   char *arg1 = (char *) 0 ;
   11658          19 :   char *arg2 = (char *) 0 ;
   11659          19 :   char *arg3 = (char *) 0 ;
   11660          19 :   int res1 ;
   11661          19 :   char *buf1 = 0 ;
   11662          19 :   int alloc1 = 0 ;
   11663          19 :   int res2 ;
   11664          19 :   char *buf2 = 0 ;
   11665          19 :   int alloc2 = 0 ;
   11666          19 :   int res3 ;
   11667          19 :   char *buf3 = 0 ;
   11668          19 :   int alloc3 = 0 ;
   11669          19 :   PyObject *swig_obj[3] ;
   11670             :   
   11671          19 :   if (!SWIG_Python_UnpackTuple(args, "SetPathSpecificOption", 3, 3, swig_obj)) SWIG_fail;
   11672          19 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   11673          19 :   if (!SWIG_IsOK(res1)) {
   11674           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SetPathSpecificOption" "', argument " "1"" of type '" "char const *""'");
   11675             :   }
   11676          19 :   arg1 = reinterpret_cast< char * >(buf1);
   11677          19 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   11678          19 :   if (!SWIG_IsOK(res2)) {
   11679           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SetPathSpecificOption" "', argument " "2"" of type '" "char const *""'");
   11680             :   }
   11681          19 :   arg2 = reinterpret_cast< char * >(buf2);
   11682          19 :   res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   11683          19 :   if (!SWIG_IsOK(res3)) {
   11684           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SetPathSpecificOption" "', argument " "3"" of type '" "char const *""'");
   11685             :   }
   11686          19 :   arg3 = reinterpret_cast< char * >(buf3);
   11687          19 :   {
   11688          19 :     if (!arg1) {
   11689           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   11690             :     }
   11691             :   }
   11692          18 :   {
   11693          18 :     if (!arg2) {
   11694           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   11695             :     }
   11696             :   }
   11697          17 :   {
   11698          17 :     const int bLocalUseExceptions = GetUseExceptions();
   11699          17 :     if ( bLocalUseExceptions ) {
   11700           8 :       pushErrorHandler();
   11701             :     }
   11702          17 :     {
   11703          17 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11704          17 :       VSISetPathSpecificOption((char const *)arg1,(char const *)arg2,(char const *)arg3);
   11705          17 :       SWIG_PYTHON_THREAD_END_ALLOW;
   11706             :     }
   11707          17 :     if ( bLocalUseExceptions ) {
   11708           8 :       popErrorHandler();
   11709             :     }
   11710             : #ifndef SED_HACKS
   11711             :     if ( bLocalUseExceptions ) {
   11712             :       CPLErr eclass = CPLGetLastErrorType();
   11713             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11714             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11715             :       }
   11716             :     }
   11717             : #endif
   11718             :   }
   11719          17 :   resultobj = SWIG_Py_Void();
   11720          17 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   11721          17 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   11722          17 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   11723          19 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   11724             :   return resultobj;
   11725           2 : fail:
   11726           2 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   11727           2 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   11728           2 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   11729             :   return NULL;
   11730             : }
   11731             : 
   11732             : 
   11733          57 : SWIGINTERN PyObject *_wrap_SetCredential(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11734          57 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11735          57 :   char *arg1 = (char *) 0 ;
   11736          57 :   char *arg2 = (char *) 0 ;
   11737          57 :   char *arg3 = (char *) 0 ;
   11738          57 :   int res1 ;
   11739          57 :   char *buf1 = 0 ;
   11740          57 :   int alloc1 = 0 ;
   11741          57 :   int res2 ;
   11742          57 :   char *buf2 = 0 ;
   11743          57 :   int alloc2 = 0 ;
   11744          57 :   int res3 ;
   11745          57 :   char *buf3 = 0 ;
   11746          57 :   int alloc3 = 0 ;
   11747          57 :   PyObject *swig_obj[3] ;
   11748             :   
   11749          57 :   if (!SWIG_Python_UnpackTuple(args, "SetCredential", 3, 3, swig_obj)) SWIG_fail;
   11750          57 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   11751          57 :   if (!SWIG_IsOK(res1)) {
   11752           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SetCredential" "', argument " "1"" of type '" "char const *""'");
   11753             :   }
   11754          57 :   arg1 = reinterpret_cast< char * >(buf1);
   11755          57 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   11756          57 :   if (!SWIG_IsOK(res2)) {
   11757           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SetCredential" "', argument " "2"" of type '" "char const *""'");
   11758             :   }
   11759          57 :   arg2 = reinterpret_cast< char * >(buf2);
   11760          57 :   res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   11761          57 :   if (!SWIG_IsOK(res3)) {
   11762           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SetCredential" "', argument " "3"" of type '" "char const *""'");
   11763             :   }
   11764          57 :   arg3 = reinterpret_cast< char * >(buf3);
   11765          57 :   {
   11766          57 :     if (!arg1) {
   11767           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   11768             :     }
   11769             :   }
   11770          57 :   {
   11771          57 :     if (!arg2) {
   11772           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   11773             :     }
   11774             :   }
   11775          57 :   {
   11776          57 :     const int bLocalUseExceptions = GetUseExceptions();
   11777          57 :     if ( bLocalUseExceptions ) {
   11778           0 :       pushErrorHandler();
   11779             :     }
   11780          57 :     {
   11781          57 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11782          57 :       wrapper_VSISetCredential((char const *)arg1,(char const *)arg2,(char const *)arg3);
   11783          57 :       SWIG_PYTHON_THREAD_END_ALLOW;
   11784             :     }
   11785          57 :     if ( bLocalUseExceptions ) {
   11786           0 :       popErrorHandler();
   11787             :     }
   11788             : #ifndef SED_HACKS
   11789             :     if ( bLocalUseExceptions ) {
   11790             :       CPLErr eclass = CPLGetLastErrorType();
   11791             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11792             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11793             :       }
   11794             :     }
   11795             : #endif
   11796             :   }
   11797          57 :   resultobj = SWIG_Py_Void();
   11798          57 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   11799          57 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   11800          57 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   11801          57 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   11802             :   return resultobj;
   11803           0 : fail:
   11804           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   11805           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   11806           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   11807             :   return NULL;
   11808             : }
   11809             : 
   11810             : 
   11811           0 : SWIGINTERN PyObject *_wrap_GetCredential(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11812           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11813           0 :   char *arg1 = (char *) 0 ;
   11814           0 :   char *arg2 = (char *) 0 ;
   11815           0 :   char *arg3 = (char *) NULL ;
   11816           0 :   int res1 ;
   11817           0 :   char *buf1 = 0 ;
   11818           0 :   int alloc1 = 0 ;
   11819           0 :   int res2 ;
   11820           0 :   char *buf2 = 0 ;
   11821           0 :   int alloc2 = 0 ;
   11822           0 :   int res3 ;
   11823           0 :   char *buf3 = 0 ;
   11824           0 :   int alloc3 = 0 ;
   11825           0 :   PyObject *swig_obj[3] ;
   11826           0 :   char *result = 0 ;
   11827             :   
   11828           0 :   if (!SWIG_Python_UnpackTuple(args, "GetCredential", 2, 3, swig_obj)) SWIG_fail;
   11829           0 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   11830           0 :   if (!SWIG_IsOK(res1)) {
   11831           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetCredential" "', argument " "1"" of type '" "char const *""'");
   11832             :   }
   11833           0 :   arg1 = reinterpret_cast< char * >(buf1);
   11834           0 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   11835           0 :   if (!SWIG_IsOK(res2)) {
   11836           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GetCredential" "', argument " "2"" of type '" "char const *""'");
   11837             :   }
   11838           0 :   arg2 = reinterpret_cast< char * >(buf2);
   11839           0 :   if (swig_obj[2]) {
   11840           0 :     res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   11841           0 :     if (!SWIG_IsOK(res3)) {
   11842           0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "GetCredential" "', argument " "3"" of type '" "char const *""'");
   11843             :     }
   11844           0 :     arg3 = reinterpret_cast< char * >(buf3);
   11845             :   }
   11846           0 :   {
   11847           0 :     if (!arg1) {
   11848           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   11849             :     }
   11850             :   }
   11851           0 :   {
   11852           0 :     if (!arg2) {
   11853           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   11854             :     }
   11855             :   }
   11856           0 :   {
   11857           0 :     const int bLocalUseExceptions = GetUseExceptions();
   11858           0 :     if ( bLocalUseExceptions ) {
   11859           0 :       pushErrorHandler();
   11860             :     }
   11861           0 :     {
   11862           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11863           0 :       result = (char *)wrapper_VSIGetCredential((char const *)arg1,(char const *)arg2,(char const *)arg3);
   11864           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   11865             :     }
   11866           0 :     if ( bLocalUseExceptions ) {
   11867           0 :       popErrorHandler();
   11868             :     }
   11869             : #ifndef SED_HACKS
   11870             :     if ( bLocalUseExceptions ) {
   11871             :       CPLErr eclass = CPLGetLastErrorType();
   11872             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11873             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11874             :       }
   11875             :     }
   11876             : #endif
   11877             :   }
   11878           0 :   resultobj = SWIG_FromCharPtr((const char *)result);
   11879           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   11880           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   11881           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   11882           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   11883             :   return resultobj;
   11884           0 : fail:
   11885           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   11886           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   11887           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   11888             :   return NULL;
   11889             : }
   11890             : 
   11891             : 
   11892          12 : SWIGINTERN PyObject *_wrap_GetPathSpecificOption(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11893          12 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11894          12 :   char *arg1 = (char *) 0 ;
   11895          12 :   char *arg2 = (char *) 0 ;
   11896          12 :   char *arg3 = (char *) NULL ;
   11897          12 :   int res1 ;
   11898          12 :   char *buf1 = 0 ;
   11899          12 :   int alloc1 = 0 ;
   11900          12 :   int res2 ;
   11901          12 :   char *buf2 = 0 ;
   11902          12 :   int alloc2 = 0 ;
   11903          12 :   int res3 ;
   11904          12 :   char *buf3 = 0 ;
   11905          12 :   int alloc3 = 0 ;
   11906          12 :   PyObject *swig_obj[3] ;
   11907          12 :   char *result = 0 ;
   11908             :   
   11909          12 :   if (!SWIG_Python_UnpackTuple(args, "GetPathSpecificOption", 2, 3, swig_obj)) SWIG_fail;
   11910          12 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   11911          12 :   if (!SWIG_IsOK(res1)) {
   11912           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetPathSpecificOption" "', argument " "1"" of type '" "char const *""'");
   11913             :   }
   11914          12 :   arg1 = reinterpret_cast< char * >(buf1);
   11915          12 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   11916          12 :   if (!SWIG_IsOK(res2)) {
   11917           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GetPathSpecificOption" "', argument " "2"" of type '" "char const *""'");
   11918             :   }
   11919          12 :   arg2 = reinterpret_cast< char * >(buf2);
   11920          12 :   if (swig_obj[2]) {
   11921           2 :     res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   11922           2 :     if (!SWIG_IsOK(res3)) {
   11923           0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "GetPathSpecificOption" "', argument " "3"" of type '" "char const *""'");
   11924             :     }
   11925           2 :     arg3 = reinterpret_cast< char * >(buf3);
   11926             :   }
   11927          12 :   {
   11928          12 :     if (!arg1) {
   11929           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   11930             :     }
   11931             :   }
   11932          11 :   {
   11933          11 :     if (!arg2) {
   11934           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   11935             :     }
   11936             :   }
   11937          10 :   {
   11938          10 :     const int bLocalUseExceptions = GetUseExceptions();
   11939          10 :     if ( bLocalUseExceptions ) {
   11940          10 :       pushErrorHandler();
   11941             :     }
   11942          10 :     {
   11943          10 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11944          10 :       result = (char *)wrapper_VSIGetPathSpecificOption((char const *)arg1,(char const *)arg2,(char const *)arg3);
   11945          10 :       SWIG_PYTHON_THREAD_END_ALLOW;
   11946             :     }
   11947          10 :     if ( bLocalUseExceptions ) {
   11948          10 :       popErrorHandler();
   11949             :     }
   11950             : #ifndef SED_HACKS
   11951             :     if ( bLocalUseExceptions ) {
   11952             :       CPLErr eclass = CPLGetLastErrorType();
   11953             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11954             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11955             :       }
   11956             :     }
   11957             : #endif
   11958             :   }
   11959          10 :   resultobj = SWIG_FromCharPtr((const char *)result);
   11960          10 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   11961          10 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   11962          10 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   11963          12 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   11964             :   return resultobj;
   11965           2 : fail:
   11966           2 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   11967           2 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   11968           2 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   11969             :   return NULL;
   11970             : }
   11971             : 
   11972             : 
   11973           8 : SWIGINTERN PyObject *_wrap_ClearCredentials(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11974           8 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11975           8 :   char *arg1 = (char *) NULL ;
   11976           8 :   int res1 ;
   11977           8 :   char *buf1 = 0 ;
   11978           8 :   int alloc1 = 0 ;
   11979           8 :   PyObject *swig_obj[1] ;
   11980             :   
   11981           8 :   if (!SWIG_Python_UnpackTuple(args, "ClearCredentials", 0, 1, swig_obj)) SWIG_fail;
   11982           8 :   if (swig_obj[0]) {
   11983           8 :     res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   11984           8 :     if (!SWIG_IsOK(res1)) {
   11985           0 :       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ClearCredentials" "', argument " "1"" of type '" "char const *""'");
   11986             :     }
   11987           8 :     arg1 = reinterpret_cast< char * >(buf1);
   11988             :   }
   11989           8 :   {
   11990           8 :     const int bLocalUseExceptions = GetUseExceptions();
   11991           8 :     if ( bLocalUseExceptions ) {
   11992           0 :       pushErrorHandler();
   11993             :     }
   11994           8 :     {
   11995           8 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11996           8 :       wrapper_VSIClearCredentials((char const *)arg1);
   11997           8 :       SWIG_PYTHON_THREAD_END_ALLOW;
   11998             :     }
   11999           8 :     if ( bLocalUseExceptions ) {
   12000           0 :       popErrorHandler();
   12001             :     }
   12002             : #ifndef SED_HACKS
   12003             :     if ( bLocalUseExceptions ) {
   12004             :       CPLErr eclass = CPLGetLastErrorType();
   12005             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12006             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12007             :       }
   12008             :     }
   12009             : #endif
   12010             :   }
   12011           8 :   resultobj = SWIG_Py_Void();
   12012           8 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12013           8 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   12014             :   return resultobj;
   12015           0 : fail:
   12016           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12017             :   return NULL;
   12018             : }
   12019             : 
   12020             : 
   12021           7 : SWIGINTERN PyObject *_wrap_ClearPathSpecificOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12022           7 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12023           7 :   char *arg1 = (char *) NULL ;
   12024           7 :   int res1 ;
   12025           7 :   char *buf1 = 0 ;
   12026           7 :   int alloc1 = 0 ;
   12027           7 :   PyObject *swig_obj[1] ;
   12028             :   
   12029           7 :   if (!SWIG_Python_UnpackTuple(args, "ClearPathSpecificOptions", 0, 1, swig_obj)) SWIG_fail;
   12030           7 :   if (swig_obj[0]) {
   12031           5 :     res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   12032           5 :     if (!SWIG_IsOK(res1)) {
   12033           0 :       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ClearPathSpecificOptions" "', argument " "1"" of type '" "char const *""'");
   12034             :     }
   12035           5 :     arg1 = reinterpret_cast< char * >(buf1);
   12036             :   }
   12037           7 :   {
   12038           7 :     const int bLocalUseExceptions = GetUseExceptions();
   12039           7 :     if ( bLocalUseExceptions ) {
   12040           3 :       pushErrorHandler();
   12041             :     }
   12042           7 :     {
   12043           7 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   12044           7 :       wrapper_VSIClearPathSpecificOptions((char const *)arg1);
   12045           7 :       SWIG_PYTHON_THREAD_END_ALLOW;
   12046             :     }
   12047           7 :     if ( bLocalUseExceptions ) {
   12048           3 :       popErrorHandler();
   12049             :     }
   12050             : #ifndef SED_HACKS
   12051             :     if ( bLocalUseExceptions ) {
   12052             :       CPLErr eclass = CPLGetLastErrorType();
   12053             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12054             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12055             :       }
   12056             :     }
   12057             : #endif
   12058             :   }
   12059           7 :   resultobj = SWIG_Py_Void();
   12060           7 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12061           7 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   12062             :   return resultobj;
   12063           0 : fail:
   12064           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12065             :   return NULL;
   12066             : }
   12067             : 
   12068             : 
   12069           0 : SWIGINTERN PyObject *_wrap_CPLBinaryToHex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12070           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12071           0 :   int arg1 ;
   12072           0 :   GByte *arg2 = (GByte *) 0 ;
   12073           0 :   int alloc1 = 0 ;
   12074           0 :   bool viewIsValid1 = false ;
   12075           0 :   Py_buffer view1 ;
   12076           0 :   PyObject *swig_obj[1] ;
   12077           0 :   retStringAndCPLFree *result = 0 ;
   12078             :   
   12079           0 :   if (!args) SWIG_fail;
   12080           0 :   swig_obj[0] = args;
   12081           0 :   {
   12082             :     /* %typemap(in,numinputs=1) (int nLen, char *pBuf ) */
   12083           0 :     char* ptr = NULL;
   12084           0 :     if( !GetBufferAsCharPtrIntSize(swig_obj[0], &arg1, &ptr, &alloc1, &viewIsValid1, &view1) ) {
   12085           0 :       SWIG_fail;
   12086             :     }
   12087           0 :     arg2 = (GByte *)ptr;
   12088             :   }
   12089           0 :   {
   12090           0 :     const int bLocalUseExceptions = GetUseExceptions();
   12091           0 :     if ( bLocalUseExceptions ) {
   12092           0 :       pushErrorHandler();
   12093             :     }
   12094           0 :     {
   12095           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   12096           0 :       result = (retStringAndCPLFree *)CPLBinaryToHex(arg1,(GByte const *)arg2);
   12097           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   12098             :     }
   12099           0 :     if ( bLocalUseExceptions ) {
   12100           0 :       popErrorHandler();
   12101             :     }
   12102             : #ifndef SED_HACKS
   12103             :     if ( bLocalUseExceptions ) {
   12104             :       CPLErr eclass = CPLGetLastErrorType();
   12105             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12106             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12107             :       }
   12108             :     }
   12109             : #endif
   12110             :   }
   12111           0 :   {
   12112             :     /* %typemap(out) (retStringAndCPLFree*) */
   12113           0 :     Py_XDECREF(resultobj);
   12114           0 :     if(result)
   12115             :     {
   12116           0 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   12117           0 :       CPLFree(result);
   12118             :     }
   12119             :     else
   12120             :     {
   12121           0 :       resultobj = Py_None;
   12122           0 :       Py_INCREF(resultobj);
   12123             :     }
   12124             :   }
   12125           0 :   {
   12126             :     /* %typemap(freearg) (int *nLen, char *pBuf ) */
   12127           0 :     if( viewIsValid1 ) {
   12128           0 :       PyBuffer_Release(&view1);
   12129             :     }
   12130           0 :     else if (ReturnSame(alloc1) == SWIG_NEWOBJ ) {
   12131           0 :       delete[] arg2;
   12132             :     }
   12133             :   }
   12134           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   12135             :   return resultobj;
   12136           0 : fail:
   12137           0 :   {
   12138             :     /* %typemap(freearg) (int *nLen, char *pBuf ) */
   12139           0 :     if( viewIsValid1 ) {
   12140           0 :       PyBuffer_Release(&view1);
   12141             :     }
   12142           0 :     else if (ReturnSame(alloc1) == SWIG_NEWOBJ ) {
   12143             :       delete[] arg2;
   12144             :     }
   12145             :   }
   12146             :   return NULL;
   12147             : }
   12148             : 
   12149             : 
   12150           0 : SWIGINTERN PyObject *_wrap_CPLHexToBinary(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12151           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12152           0 :   char *arg1 = (char *) 0 ;
   12153           0 :   int *arg2 = (int *) 0 ;
   12154           0 :   int res1 ;
   12155           0 :   char *buf1 = 0 ;
   12156           0 :   int alloc1 = 0 ;
   12157           0 :   void *argp2 = 0 ;
   12158           0 :   int res2 = 0 ;
   12159           0 :   PyObject *swig_obj[2] ;
   12160           0 :   GByte *result = 0 ;
   12161             :   
   12162           0 :   if (!SWIG_Python_UnpackTuple(args, "CPLHexToBinary", 2, 2, swig_obj)) SWIG_fail;
   12163           0 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   12164           0 :   if (!SWIG_IsOK(res1)) {
   12165           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CPLHexToBinary" "', argument " "1"" of type '" "char const *""'");
   12166             :   }
   12167           0 :   arg1 = reinterpret_cast< char * >(buf1);
   12168           0 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_int, 0 |  0 );
   12169           0 :   if (!SWIG_IsOK(res2)) {
   12170           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CPLHexToBinary" "', argument " "2"" of type '" "int *""'"); 
   12171             :   }
   12172           0 :   arg2 = reinterpret_cast< int * >(argp2);
   12173           0 :   {
   12174           0 :     const int bLocalUseExceptions = GetUseExceptions();
   12175           0 :     if ( bLocalUseExceptions ) {
   12176           0 :       pushErrorHandler();
   12177             :     }
   12178           0 :     {
   12179           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   12180           0 :       result = (GByte *)CPLHexToBinary((char const *)arg1,arg2);
   12181           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   12182             :     }
   12183           0 :     if ( bLocalUseExceptions ) {
   12184           0 :       popErrorHandler();
   12185             :     }
   12186             : #ifndef SED_HACKS
   12187             :     if ( bLocalUseExceptions ) {
   12188             :       CPLErr eclass = CPLGetLastErrorType();
   12189             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12190             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12191             :       }
   12192             :     }
   12193             : #endif
   12194             :   }
   12195           0 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GByte, 0 |  0 );
   12196           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12197           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   12198             :   return resultobj;
   12199           0 : fail:
   12200           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12201             :   return NULL;
   12202             : }
   12203             : 
   12204             : 
   12205        3246 : SWIGINTERN PyObject *_wrap_FileFromMemBuffer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12206        3246 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12207        3246 :   char *arg1 = (char *) 0 ;
   12208        3246 :   GIntBig arg2 ;
   12209        3246 :   char *arg3 = (char *) 0 ;
   12210        3246 :   int bToFree1 = 0 ;
   12211        3246 :   int alloc2 = 0 ;
   12212        3246 :   bool viewIsValid2 = false ;
   12213        3246 :   Py_buffer view2 ;
   12214        3246 :   PyObject *swig_obj[2] ;
   12215        3246 :   VSI_RETVAL result;
   12216             :   
   12217        3246 :   if (!SWIG_Python_UnpackTuple(args, "FileFromMemBuffer", 2, 2, swig_obj)) SWIG_fail;
   12218        3246 :   {
   12219             :     /* %typemap(in) (const char *utf8_path) */
   12220        3246 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   12221             :     {
   12222        1935 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   12223             :     }
   12224             :     else
   12225             :     {
   12226        1311 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   12227             :       
   12228             :     }
   12229        3246 :     if (arg1 == NULL)
   12230             :     {
   12231           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   12232           0 :       SWIG_fail;
   12233             :     }
   12234             :   }
   12235        3246 :   {
   12236             :     /* %typemap(in,numinputs=1) (GIntBig nLen, char *pBuf ) */
   12237        3246 :     char* ptr = NULL;
   12238        3246 :     if( !GetBufferAsCharPtrGIntBigSize(swig_obj[1], &arg2, &ptr, &alloc2, &viewIsValid2, &view2) ) {
   12239           0 :       SWIG_fail;
   12240             :     }
   12241        3246 :     arg3 = (char *)ptr;
   12242             :   }
   12243        3246 :   {
   12244        3246 :     if (!arg1) {
   12245        3246 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   12246             :     }
   12247             :   }
   12248        3246 :   {
   12249        3246 :     const int bLocalUseExceptions = GetUseExceptions();
   12250        3246 :     if ( bLocalUseExceptions ) {
   12251         951 :       pushErrorHandler();
   12252             :     }
   12253        3246 :     {
   12254        3246 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   12255        3246 :       result = wrapper_VSIFileFromMemBuffer((char const *)arg1,arg2,(char const *)arg3);
   12256        3246 :       SWIG_PYTHON_THREAD_END_ALLOW;
   12257             :     }
   12258        3246 :     if ( bLocalUseExceptions ) {
   12259         951 :       popErrorHandler();
   12260             :     }
   12261             : #ifndef SED_HACKS
   12262             :     if ( bLocalUseExceptions ) {
   12263             :       CPLErr eclass = CPLGetLastErrorType();
   12264             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12265             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12266             :       }
   12267             :     }
   12268             : #endif
   12269             :   }
   12270        3246 :   {
   12271             :     /* %typemap(out) VSI_RETVAL */
   12272        3247 :     if ( result != 0 && GetUseExceptions()) {
   12273           0 :       const char* pszMessage = CPLGetLastErrorMsg();
   12274           0 :       if( pszMessage[0] != '\0' )
   12275           0 :       PyErr_SetString( PyExc_RuntimeError, pszMessage );
   12276             :       else
   12277           0 :       PyErr_SetString( PyExc_RuntimeError, "unknown error occurred" );
   12278           0 :       SWIG_fail;
   12279             :     }
   12280             :   }
   12281        3246 :   {
   12282             :     /* %typemap(freearg) (const char *utf8_path) */
   12283        3246 :     GDALPythonFreeCStr(arg1, bToFree1);
   12284             :   }
   12285        3246 :   {
   12286             :     /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
   12287        3246 :     if( viewIsValid2 ) {
   12288        1194 :       PyBuffer_Release(&view2);
   12289             :     }
   12290        2052 :     else if (ReturnSame(alloc2) == SWIG_NEWOBJ ) {
   12291        2052 :       delete[] arg3;
   12292             :     }
   12293             :   }
   12294        3246 :   {
   12295             :     /* %typemap(ret) VSI_RETVAL */
   12296        3246 :     resultobj = PyInt_FromLong( result );
   12297             :   }
   12298        3246 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   12299             :   return resultobj;
   12300           0 : fail:
   12301           0 :   {
   12302             :     /* %typemap(freearg) (const char *utf8_path) */
   12303           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   12304             :   }
   12305           0 :   {
   12306             :     /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
   12307           0 :     if( viewIsValid2 ) {
   12308           0 :       PyBuffer_Release(&view2);
   12309             :     }
   12310        3246 :     else if (ReturnSame(alloc2) == SWIG_NEWOBJ ) {
   12311           0 :       delete[] arg3;
   12312             :     }
   12313             :   }
   12314             :   return NULL;
   12315             : }
   12316             : 
   12317             : 
   12318        7913 : SWIGINTERN PyObject *_wrap_Unlink(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12319        7913 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12320        7913 :   char *arg1 = (char *) 0 ;
   12321        7913 :   int bToFree1 = 0 ;
   12322        7913 :   PyObject *swig_obj[1] ;
   12323        7913 :   VSI_RETVAL result;
   12324             :   
   12325        7913 :   if (!args) SWIG_fail;
   12326        7913 :   swig_obj[0] = args;
   12327        7913 :   {
   12328             :     /* %typemap(in) (const char *utf8_path) */
   12329        7913 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   12330             :     {
   12331        7104 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   12332             :     }
   12333             :     else
   12334             :     {
   12335         809 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   12336             :       
   12337             :     }
   12338        7913 :     if (arg1 == NULL)
   12339             :     {
   12340           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   12341           0 :       SWIG_fail;
   12342             :     }
   12343             :   }
   12344        7913 :   {
   12345        7913 :     if (!arg1) {
   12346        7913 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   12347             :     }
   12348             :   }
   12349        7913 :   {
   12350        7913 :     const int bLocalUseExceptions = GetUseExceptions();
   12351        7913 :     if ( bLocalUseExceptions ) {
   12352        1381 :       pushErrorHandler();
   12353             :     }
   12354        7913 :     {
   12355        7913 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   12356        7913 :       result = VSIUnlink((char const *)arg1);
   12357        7913 :       SWIG_PYTHON_THREAD_END_ALLOW;
   12358             :     }
   12359        7913 :     if ( bLocalUseExceptions ) {
   12360        1381 :       popErrorHandler();
   12361             :     }
   12362             : #ifndef SED_HACKS
   12363             :     if ( bLocalUseExceptions ) {
   12364             :       CPLErr eclass = CPLGetLastErrorType();
   12365             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12366             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12367             :       }
   12368             :     }
   12369             : #endif
   12370             :   }
   12371        7913 :   {
   12372             :     /* %typemap(out) VSI_RETVAL */
   12373        8447 :     if ( result != 0 && GetUseExceptions()) {
   12374           0 :       const char* pszMessage = CPLGetLastErrorMsg();
   12375           0 :       if( pszMessage[0] != '\0' )
   12376           0 :       PyErr_SetString( PyExc_RuntimeError, pszMessage );
   12377             :       else
   12378           0 :       PyErr_SetString( PyExc_RuntimeError, "unknown error occurred" );
   12379           0 :       SWIG_fail;
   12380             :     }
   12381             :   }
   12382        7913 :   {
   12383             :     /* %typemap(freearg) (const char *utf8_path) */
   12384        7913 :     GDALPythonFreeCStr(arg1, bToFree1);
   12385             :   }
   12386        7913 :   {
   12387             :     /* %typemap(ret) VSI_RETVAL */
   12388        7913 :     resultobj = PyInt_FromLong( result );
   12389             :   }
   12390        7913 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   12391             :   return resultobj;
   12392           0 : fail:
   12393           0 :   {
   12394             :     /* %typemap(freearg) (const char *utf8_path) */
   12395        7913 :     GDALPythonFreeCStr(arg1, bToFree1);
   12396             :   }
   12397             :   return NULL;
   12398             : }
   12399             : 
   12400             : 
   12401          10 : SWIGINTERN PyObject *_wrap_UnlinkBatch(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12402          10 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12403          10 :   char **arg1 = (char **) 0 ;
   12404          10 :   PyObject *swig_obj[1] ;
   12405          10 :   bool result;
   12406             :   
   12407          10 :   if (!args) SWIG_fail;
   12408          10 :   swig_obj[0] = args;
   12409          10 :   {
   12410             :     /* %typemap(in) char **dict */
   12411          10 :     arg1 = NULL;
   12412          10 :     if ( PySequence_Check( swig_obj[0] ) ) {
   12413          10 :       int bErr = FALSE;
   12414          10 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   12415          10 :       if ( bErr )
   12416             :       {
   12417           0 :         SWIG_fail;
   12418             :       }
   12419             :     }
   12420           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   12421           0 :       int bErr = FALSE;
   12422           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   12423           0 :       if ( bErr )
   12424             :       {
   12425           0 :         SWIG_fail;
   12426             :       }
   12427             :     }
   12428             :     else {
   12429           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   12430           0 :       SWIG_fail;
   12431             :     }
   12432             :   }
   12433          10 :   {
   12434          10 :     const int bLocalUseExceptions = GetUseExceptions();
   12435          10 :     if ( bLocalUseExceptions ) {
   12436           0 :       pushErrorHandler();
   12437             :     }
   12438          10 :     {
   12439          10 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   12440          10 :       result = (bool)wrapper_VSIUnlinkBatch(arg1);
   12441          10 :       SWIG_PYTHON_THREAD_END_ALLOW;
   12442             :     }
   12443          10 :     if ( bLocalUseExceptions ) {
   12444           0 :       popErrorHandler();
   12445             :     }
   12446             : #ifndef SED_HACKS
   12447             :     if ( bLocalUseExceptions ) {
   12448             :       CPLErr eclass = CPLGetLastErrorType();
   12449             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12450             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12451             :       }
   12452             :     }
   12453             : #endif
   12454             :   }
   12455          10 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   12456          10 :   {
   12457             :     /* %typemap(freearg) char **dict */
   12458          10 :     CSLDestroy( arg1 );
   12459             :   }
   12460          10 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   12461             :   return resultobj;
   12462           0 : fail:
   12463           0 :   {
   12464             :     /* %typemap(freearg) char **dict */
   12465           0 :     CSLDestroy( arg1 );
   12466             :   }
   12467             :   return NULL;
   12468             : }
   12469             : 
   12470             : 
   12471           0 : SWIGINTERN PyObject *_wrap_HasThreadSupport(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12472           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12473           0 :   int result;
   12474             :   
   12475           0 :   if (!SWIG_Python_UnpackTuple(args, "HasThreadSupport", 0, 0, 0)) SWIG_fail;
   12476           0 :   {
   12477           0 :     const int bLocalUseExceptions = GetUseExceptions();
   12478           0 :     if ( bLocalUseExceptions ) {
   12479           0 :       pushErrorHandler();
   12480             :     }
   12481           0 :     {
   12482           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   12483           0 :       result = (int)wrapper_HasThreadSupport();
   12484           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   12485             :     }
   12486           0 :     if ( bLocalUseExceptions ) {
   12487           0 :       popErrorHandler();
   12488             :     }
   12489             : #ifndef SED_HACKS
   12490             :     if ( bLocalUseExceptions ) {
   12491             :       CPLErr eclass = CPLGetLastErrorType();
   12492             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12493             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12494             :       }
   12495             :     }
   12496             : #endif
   12497             :   }
   12498           0 :   resultobj = SWIG_From_int(static_cast< int >(result));
   12499           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   12500             :   return resultobj;
   12501           0 : fail:
   12502           0 :   return NULL;
   12503             : }
   12504             : 
   12505             : 
   12506        2007 : SWIGINTERN PyObject *_wrap_Mkdir(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12507        2007 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12508        2007 :   char *arg1 = (char *) 0 ;
   12509        2007 :   int arg2 ;
   12510        2007 :   int bToFree1 = 0 ;
   12511        2007 :   int val2 ;
   12512        2007 :   int ecode2 = 0 ;
   12513        2007 :   PyObject *swig_obj[2] ;
   12514        2007 :   VSI_RETVAL result;
   12515             :   
   12516        2007 :   if (!SWIG_Python_UnpackTuple(args, "Mkdir", 2, 2, swig_obj)) SWIG_fail;
   12517        2007 :   {
   12518             :     /* %typemap(in) (const char *utf8_path) */
   12519        2007 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   12520             :     {
   12521        1998 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   12522             :     }
   12523             :     else
   12524             :     {
   12525           9 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   12526             :       
   12527             :     }
   12528        2007 :     if (arg1 == NULL)
   12529             :     {
   12530           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   12531           0 :       SWIG_fail;
   12532             :     }
   12533             :   }
   12534        2007 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   12535        2007 :   if (!SWIG_IsOK(ecode2)) {
   12536           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Mkdir" "', argument " "2"" of type '" "int""'");
   12537             :   } 
   12538        2007 :   arg2 = static_cast< int >(val2);
   12539        2007 :   {
   12540        2007 :     if (!arg1) {
   12541        2007 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   12542             :     }
   12543             :   }
   12544        2007 :   {
   12545        2007 :     const int bLocalUseExceptions = GetUseExceptions();
   12546        2007 :     if ( bLocalUseExceptions ) {
   12547         650 :       pushErrorHandler();
   12548             :     }
   12549        2007 :     {
   12550        2007 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   12551        2007 :       result = VSIMkdir((char const *)arg1,arg2);
   12552        2007 :       SWIG_PYTHON_THREAD_END_ALLOW;
   12553             :     }
   12554        2007 :     if ( bLocalUseExceptions ) {
   12555         650 :       popErrorHandler();
   12556             :     }
   12557             : #ifndef SED_HACKS
   12558             :     if ( bLocalUseExceptions ) {
   12559             :       CPLErr eclass = CPLGetLastErrorType();
   12560             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12561             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12562             :       }
   12563             :     }
   12564             : #endif
   12565             :   }
   12566        2007 :   {
   12567             :     /* %typemap(out) VSI_RETVAL */
   12568        2054 :     if ( result != 0 && GetUseExceptions()) {
   12569           0 :       const char* pszMessage = CPLGetLastErrorMsg();
   12570           0 :       if( pszMessage[0] != '\0' )
   12571           0 :       PyErr_SetString( PyExc_RuntimeError, pszMessage );
   12572             :       else
   12573           0 :       PyErr_SetString( PyExc_RuntimeError, "unknown error occurred" );
   12574           0 :       SWIG_fail;
   12575             :     }
   12576             :   }
   12577        2007 :   {
   12578             :     /* %typemap(freearg) (const char *utf8_path) */
   12579        2007 :     GDALPythonFreeCStr(arg1, bToFree1);
   12580             :   }
   12581        2007 :   {
   12582             :     /* %typemap(ret) VSI_RETVAL */
   12583        2007 :     resultobj = PyInt_FromLong( result );
   12584             :   }
   12585        2007 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   12586             :   return resultobj;
   12587           0 : fail:
   12588           0 :   {
   12589             :     /* %typemap(freearg) (const char *utf8_path) */
   12590        2007 :     GDALPythonFreeCStr(arg1, bToFree1);
   12591             :   }
   12592             :   return NULL;
   12593             : }
   12594             : 
   12595             : 
   12596          32 : SWIGINTERN PyObject *_wrap_Rmdir(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12597          32 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12598          32 :   char *arg1 = (char *) 0 ;
   12599          32 :   int bToFree1 = 0 ;
   12600          32 :   PyObject *swig_obj[1] ;
   12601          32 :   VSI_RETVAL result;
   12602             :   
   12603          32 :   if (!args) SWIG_fail;
   12604          32 :   swig_obj[0] = args;
   12605          32 :   {
   12606             :     /* %typemap(in) (const char *utf8_path) */
   12607          32 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   12608             :     {
   12609          29 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   12610             :     }
   12611             :     else
   12612             :     {
   12613           3 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   12614             :       
   12615             :     }
   12616          32 :     if (arg1 == NULL)
   12617             :     {
   12618           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   12619           0 :       SWIG_fail;
   12620             :     }
   12621             :   }
   12622          32 :   {
   12623          32 :     if (!arg1) {
   12624          32 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   12625             :     }
   12626             :   }
   12627          32 :   {
   12628          32 :     const int bLocalUseExceptions = GetUseExceptions();
   12629          32 :     if ( bLocalUseExceptions ) {
   12630           1 :       pushErrorHandler();
   12631             :     }
   12632          32 :     {
   12633          32 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   12634          32 :       result = VSIRmdir((char const *)arg1);
   12635          32 :       SWIG_PYTHON_THREAD_END_ALLOW;
   12636             :     }
   12637          32 :     if ( bLocalUseExceptions ) {
   12638           1 :       popErrorHandler();
   12639             :     }
   12640             : #ifndef SED_HACKS
   12641             :     if ( bLocalUseExceptions ) {
   12642             :       CPLErr eclass = CPLGetLastErrorType();
   12643             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12644             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12645             :       }
   12646             :     }
   12647             : #endif
   12648             :   }
   12649          32 :   {
   12650             :     /* %typemap(out) VSI_RETVAL */
   12651          48 :     if ( result != 0 && GetUseExceptions()) {
   12652           0 :       const char* pszMessage = CPLGetLastErrorMsg();
   12653           0 :       if( pszMessage[0] != '\0' )
   12654           0 :       PyErr_SetString( PyExc_RuntimeError, pszMessage );
   12655             :       else
   12656           0 :       PyErr_SetString( PyExc_RuntimeError, "unknown error occurred" );
   12657           0 :       SWIG_fail;
   12658             :     }
   12659             :   }
   12660          32 :   {
   12661             :     /* %typemap(freearg) (const char *utf8_path) */
   12662          32 :     GDALPythonFreeCStr(arg1, bToFree1);
   12663             :   }
   12664          32 :   {
   12665             :     /* %typemap(ret) VSI_RETVAL */
   12666          32 :     resultobj = PyInt_FromLong( result );
   12667             :   }
   12668          32 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   12669             :   return resultobj;
   12670           0 : fail:
   12671           0 :   {
   12672             :     /* %typemap(freearg) (const char *utf8_path) */
   12673          32 :     GDALPythonFreeCStr(arg1, bToFree1);
   12674             :   }
   12675             :   return NULL;
   12676             : }
   12677             : 
   12678             : 
   12679           8 : SWIGINTERN PyObject *_wrap_MkdirRecursive(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12680           8 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12681           8 :   char *arg1 = (char *) 0 ;
   12682           8 :   int arg2 ;
   12683           8 :   int bToFree1 = 0 ;
   12684           8 :   int val2 ;
   12685           8 :   int ecode2 = 0 ;
   12686           8 :   PyObject *swig_obj[2] ;
   12687           8 :   VSI_RETVAL result;
   12688             :   
   12689           8 :   if (!SWIG_Python_UnpackTuple(args, "MkdirRecursive", 2, 2, swig_obj)) SWIG_fail;
   12690           8 :   {
   12691             :     /* %typemap(in) (const char *utf8_path) */
   12692           8 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   12693             :     {
   12694           8 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   12695             :     }
   12696             :     else
   12697             :     {
   12698           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   12699             :       
   12700             :     }
   12701           8 :     if (arg1 == NULL)
   12702             :     {
   12703           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   12704           0 :       SWIG_fail;
   12705             :     }
   12706             :   }
   12707           8 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   12708           8 :   if (!SWIG_IsOK(ecode2)) {
   12709           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MkdirRecursive" "', argument " "2"" of type '" "int""'");
   12710             :   } 
   12711           8 :   arg2 = static_cast< int >(val2);
   12712           8 :   {
   12713           8 :     if (!arg1) {
   12714           8 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   12715             :     }
   12716             :   }
   12717           8 :   {
   12718           8 :     const int bLocalUseExceptions = GetUseExceptions();
   12719           8 :     if ( bLocalUseExceptions ) {
   12720           8 :       pushErrorHandler();
   12721             :     }
   12722           8 :     {
   12723           8 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   12724           8 :       result = VSIMkdirRecursive((char const *)arg1,arg2);
   12725           8 :       SWIG_PYTHON_THREAD_END_ALLOW;
   12726             :     }
   12727           8 :     if ( bLocalUseExceptions ) {
   12728           8 :       popErrorHandler();
   12729             :     }
   12730             : #ifndef SED_HACKS
   12731             :     if ( bLocalUseExceptions ) {
   12732             :       CPLErr eclass = CPLGetLastErrorType();
   12733             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12734             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12735             :       }
   12736             :     }
   12737             : #endif
   12738             :   }
   12739           8 :   {
   12740             :     /* %typemap(out) VSI_RETVAL */
   12741           8 :     if ( result != 0 && GetUseExceptions()) {
   12742           0 :       const char* pszMessage = CPLGetLastErrorMsg();
   12743           0 :       if( pszMessage[0] != '\0' )
   12744           0 :       PyErr_SetString( PyExc_RuntimeError, pszMessage );
   12745             :       else
   12746           0 :       PyErr_SetString( PyExc_RuntimeError, "unknown error occurred" );
   12747           0 :       SWIG_fail;
   12748             :     }
   12749             :   }
   12750           8 :   {
   12751             :     /* %typemap(freearg) (const char *utf8_path) */
   12752           8 :     GDALPythonFreeCStr(arg1, bToFree1);
   12753             :   }
   12754           8 :   {
   12755             :     /* %typemap(ret) VSI_RETVAL */
   12756           8 :     resultobj = PyInt_FromLong( result );
   12757             :   }
   12758           8 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   12759             :   return resultobj;
   12760           0 : fail:
   12761           0 :   {
   12762             :     /* %typemap(freearg) (const char *utf8_path) */
   12763           8 :     GDALPythonFreeCStr(arg1, bToFree1);
   12764             :   }
   12765             :   return NULL;
   12766             : }
   12767             : 
   12768             : 
   12769        2176 : SWIGINTERN PyObject *_wrap_RmdirRecursive(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12770        2176 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12771        2176 :   char *arg1 = (char *) 0 ;
   12772        2176 :   int bToFree1 = 0 ;
   12773        2176 :   PyObject *swig_obj[1] ;
   12774        2176 :   VSI_RETVAL result;
   12775             :   
   12776        2176 :   if (!args) SWIG_fail;
   12777        2176 :   swig_obj[0] = args;
   12778        2176 :   {
   12779             :     /* %typemap(in) (const char *utf8_path) */
   12780        2176 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   12781             :     {
   12782        2173 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   12783             :     }
   12784             :     else
   12785             :     {
   12786           3 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   12787             :       
   12788             :     }
   12789        2176 :     if (arg1 == NULL)
   12790             :     {
   12791           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   12792           0 :       SWIG_fail;
   12793             :     }
   12794             :   }
   12795        2176 :   {
   12796        2176 :     if (!arg1) {
   12797        2176 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   12798             :     }
   12799             :   }
   12800        2176 :   {
   12801        2176 :     const int bLocalUseExceptions = GetUseExceptions();
   12802        2176 :     if ( bLocalUseExceptions ) {
   12803         702 :       pushErrorHandler();
   12804             :     }
   12805        2176 :     {
   12806        2176 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   12807        2176 :       result = VSIRmdirRecursive((char const *)arg1);
   12808        2176 :       SWIG_PYTHON_THREAD_END_ALLOW;
   12809             :     }
   12810        2176 :     if ( bLocalUseExceptions ) {
   12811         702 :       popErrorHandler();
   12812             :     }
   12813             : #ifndef SED_HACKS
   12814             :     if ( bLocalUseExceptions ) {
   12815             :       CPLErr eclass = CPLGetLastErrorType();
   12816             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12817             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12818             :       }
   12819             :     }
   12820             : #endif
   12821             :   }
   12822        2176 :   {
   12823             :     /* %typemap(out) VSI_RETVAL */
   12824        2186 :     if ( result != 0 && GetUseExceptions()) {
   12825           0 :       const char* pszMessage = CPLGetLastErrorMsg();
   12826           0 :       if( pszMessage[0] != '\0' )
   12827           0 :       PyErr_SetString( PyExc_RuntimeError, pszMessage );
   12828             :       else
   12829           0 :       PyErr_SetString( PyExc_RuntimeError, "unknown error occurred" );
   12830           0 :       SWIG_fail;
   12831             :     }
   12832             :   }
   12833        2176 :   {
   12834             :     /* %typemap(freearg) (const char *utf8_path) */
   12835        2176 :     GDALPythonFreeCStr(arg1, bToFree1);
   12836             :   }
   12837        2176 :   {
   12838             :     /* %typemap(ret) VSI_RETVAL */
   12839        2176 :     resultobj = PyInt_FromLong( result );
   12840             :   }
   12841        2176 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   12842             :   return resultobj;
   12843           0 : fail:
   12844           0 :   {
   12845             :     /* %typemap(freearg) (const char *utf8_path) */
   12846        2176 :     GDALPythonFreeCStr(arg1, bToFree1);
   12847             :   }
   12848             :   return NULL;
   12849             : }
   12850             : 
   12851             : 
   12852          12 : SWIGINTERN PyObject *_wrap_Rename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12853          12 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12854          12 :   char *arg1 = (char *) 0 ;
   12855          12 :   char *arg2 = (char *) 0 ;
   12856          12 :   int bToFree1 = 0 ;
   12857          12 :   int bToFree2 = 0 ;
   12858          12 :   PyObject *swig_obj[2] ;
   12859          12 :   VSI_RETVAL result;
   12860             :   
   12861          12 :   if (!SWIG_Python_UnpackTuple(args, "Rename", 2, 2, swig_obj)) SWIG_fail;
   12862          12 :   {
   12863             :     /* %typemap(in) (const char *utf8_path) */
   12864          12 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   12865             :     {
   12866          12 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   12867             :     }
   12868             :     else
   12869             :     {
   12870           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   12871             :       
   12872             :     }
   12873          12 :     if (arg1 == NULL)
   12874             :     {
   12875           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   12876           0 :       SWIG_fail;
   12877             :     }
   12878             :   }
   12879          12 :   {
   12880             :     /* %typemap(in) (const char *utf8_path) */
   12881          12 :     if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
   12882             :     {
   12883          12 :       arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
   12884             :     }
   12885             :     else
   12886             :     {
   12887           0 :       arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
   12888             :       
   12889             :     }
   12890          12 :     if (arg2 == NULL)
   12891             :     {
   12892           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   12893           0 :       SWIG_fail;
   12894             :     }
   12895             :   }
   12896          12 :   {
   12897          12 :     if (!arg1) {
   12898          12 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   12899             :     }
   12900             :   }
   12901          12 :   {
   12902          12 :     if (!arg2) {
   12903          12 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   12904             :     }
   12905             :   }
   12906          12 :   {
   12907          12 :     const int bLocalUseExceptions = GetUseExceptions();
   12908          12 :     if ( bLocalUseExceptions ) {
   12909           2 :       pushErrorHandler();
   12910             :     }
   12911          12 :     {
   12912          12 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   12913          12 :       result = VSIRename((char const *)arg1,(char const *)arg2);
   12914          12 :       SWIG_PYTHON_THREAD_END_ALLOW;
   12915             :     }
   12916          12 :     if ( bLocalUseExceptions ) {
   12917           2 :       popErrorHandler();
   12918             :     }
   12919             : #ifndef SED_HACKS
   12920             :     if ( bLocalUseExceptions ) {
   12921             :       CPLErr eclass = CPLGetLastErrorType();
   12922             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12923             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12924             :       }
   12925             :     }
   12926             : #endif
   12927             :   }
   12928          12 :   {
   12929             :     /* %typemap(out) VSI_RETVAL */
   12930          14 :     if ( result != 0 && GetUseExceptions()) {
   12931           1 :       const char* pszMessage = CPLGetLastErrorMsg();
   12932           1 :       if( pszMessage[0] != '\0' )
   12933           0 :       PyErr_SetString( PyExc_RuntimeError, pszMessage );
   12934             :       else
   12935           1 :       PyErr_SetString( PyExc_RuntimeError, "unknown error occurred" );
   12936           1 :       SWIG_fail;
   12937             :     }
   12938             :   }
   12939          11 :   {
   12940             :     /* %typemap(freearg) (const char *utf8_path) */
   12941          11 :     GDALPythonFreeCStr(arg1, bToFree1);
   12942             :   }
   12943          11 :   {
   12944             :     /* %typemap(freearg) (const char *utf8_path) */
   12945          11 :     GDALPythonFreeCStr(arg2, bToFree2);
   12946             :   }
   12947          11 :   {
   12948             :     /* %typemap(ret) VSI_RETVAL */
   12949          11 :     resultobj = PyInt_FromLong( result );
   12950             :   }
   12951          11 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   12952             :   return resultobj;
   12953           1 : fail:
   12954           1 :   {
   12955             :     /* %typemap(freearg) (const char *utf8_path) */
   12956           1 :     GDALPythonFreeCStr(arg1, bToFree1);
   12957             :   }
   12958           1 :   {
   12959             :     /* %typemap(freearg) (const char *utf8_path) */
   12960          13 :     GDALPythonFreeCStr(arg2, bToFree2);
   12961             :   }
   12962             :   return NULL;
   12963             : }
   12964             : 
   12965             : 
   12966          41 : SWIGINTERN PyObject *_wrap_Sync(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   12967          41 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12968          41 :   char *arg1 = (char *) 0 ;
   12969          41 :   char *arg2 = (char *) 0 ;
   12970          41 :   char **arg3 = (char **) NULL ;
   12971          41 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   12972          41 :   void *arg5 = (void *) NULL ;
   12973          41 :   int bToFree1 = 0 ;
   12974          41 :   int bToFree2 = 0 ;
   12975          41 :   PyObject * obj0 = 0 ;
   12976          41 :   PyObject * obj1 = 0 ;
   12977          41 :   PyObject * obj2 = 0 ;
   12978          41 :   PyObject * obj3 = 0 ;
   12979          41 :   PyObject * obj4 = 0 ;
   12980          41 :   char * kwnames[] = {
   12981             :     (char *)"pszSource",  (char *)"pszTarget",  (char *)"options",  (char *)"callback",  (char *)"callback_data",  NULL 
   12982             :   };
   12983          41 :   bool result;
   12984             :   
   12985             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   12986          41 :   PyProgressData *psProgressInfo;
   12987          41 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   12988          41 :   psProgressInfo->nLastReported = -1;
   12989          41 :   psProgressInfo->psPyCallback = NULL;
   12990          41 :   psProgressInfo->psPyCallbackData = NULL;
   12991          41 :   arg5 = psProgressInfo;
   12992          41 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OOO:Sync", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
   12993          41 :   {
   12994             :     /* %typemap(in) (const char *utf8_path) */
   12995          41 :     if (PyUnicode_Check(obj0) || PyBytes_Check(obj0))
   12996             :     {
   12997          29 :       arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
   12998             :     }
   12999             :     else
   13000             :     {
   13001          12 :       arg1 = GDALPythonPathToCStr(obj0, &bToFree1);
   13002             :       
   13003             :     }
   13004          41 :     if (arg1 == NULL)
   13005             :     {
   13006           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   13007           0 :       SWIG_fail;
   13008             :     }
   13009             :   }
   13010          41 :   {
   13011             :     /* %typemap(in) (const char *utf8_path) */
   13012          41 :     if (PyUnicode_Check(obj1) || PyBytes_Check(obj1))
   13013             :     {
   13014          31 :       arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
   13015             :     }
   13016             :     else
   13017             :     {
   13018          10 :       arg2 = GDALPythonPathToCStr(obj1, &bToFree2);
   13019             :       
   13020             :     }
   13021          41 :     if (arg2 == NULL)
   13022             :     {
   13023           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   13024           0 :       SWIG_fail;
   13025             :     }
   13026             :   }
   13027          41 :   if (obj2) {
   13028          26 :     {
   13029             :       /* %typemap(in) char **dict */
   13030          26 :       arg3 = NULL;
   13031          26 :       if ( PySequence_Check( obj2 ) ) {
   13032          26 :         int bErr = FALSE;
   13033          26 :         arg3 = CSLFromPySequence(obj2, &bErr);
   13034          26 :         if ( bErr )
   13035             :         {
   13036           0 :           SWIG_fail;
   13037             :         }
   13038             :       }
   13039           0 :       else if ( PyMapping_Check( obj2 ) ) {
   13040           0 :         int bErr = FALSE;
   13041           0 :         arg3 = CSLFromPyMapping(obj2, &bErr);
   13042           0 :         if ( bErr )
   13043             :         {
   13044           0 :           SWIG_fail;
   13045             :         }
   13046             :       }
   13047             :       else {
   13048           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   13049           0 :         SWIG_fail;
   13050             :       }
   13051             :     }
   13052             :   }
   13053          41 :   if (obj3) {
   13054           7 :     {
   13055             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   13056             :       /* callback_func typemap */
   13057             :       
   13058             :       /* In some cases 0 is passed instead of None. */
   13059             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   13060           7 :       if ( PyLong_Check(obj3) || PyInt_Check(obj3) )
   13061             :       {
   13062           0 :         if( PyLong_AsLong(obj3) == 0 )
   13063             :         {
   13064           0 :           obj3 = Py_None;
   13065             :         }
   13066             :       }
   13067             :       
   13068           7 :       if (obj3 && obj3 != Py_None ) {
   13069           7 :         void* cbfunction = NULL;
   13070           7 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj3,
   13071             :             (void**)&cbfunction,
   13072             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   13073             :             SWIG_POINTER_EXCEPTION | 0 ));
   13074             :         
   13075           7 :         if ( cbfunction == GDALTermProgress ) {
   13076             :           arg4 = GDALTermProgress;
   13077             :         } else {
   13078           7 :           if (!PyCallable_Check(obj3)) {
   13079           0 :             PyErr_SetString( PyExc_RuntimeError,
   13080             :               "Object given is not a Python function" );
   13081           0 :             SWIG_fail;
   13082             :           }
   13083           7 :           psProgressInfo->psPyCallback = obj3;
   13084           7 :           arg4 = PyProgressProxy;
   13085             :         }
   13086             :         
   13087             :       }
   13088             :       
   13089             :     }
   13090             :   }
   13091          41 :   if (obj4) {
   13092           6 :     {
   13093             :       /* %typemap(in) ( void* callback_data=NULL)  */
   13094           6 :       psProgressInfo->psPyCallbackData = obj4 ;
   13095             :     }
   13096             :   }
   13097          41 :   {
   13098          41 :     if (!arg1) {
   13099          41 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   13100             :     }
   13101             :   }
   13102          41 :   {
   13103          41 :     if (!arg2) {
   13104          41 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   13105             :     }
   13106             :   }
   13107          41 :   {
   13108          41 :     const int bLocalUseExceptions = GetUseExceptions();
   13109          41 :     if ( bLocalUseExceptions ) {
   13110           0 :       pushErrorHandler();
   13111             :     }
   13112          41 :     {
   13113          41 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   13114          41 :       result = (bool)wrapper_VSISync((char const *)arg1,(char const *)arg2,arg3,arg4,arg5);
   13115          41 :       SWIG_PYTHON_THREAD_END_ALLOW;
   13116             :     }
   13117          41 :     if ( bLocalUseExceptions ) {
   13118           0 :       popErrorHandler();
   13119             :     }
   13120             : #ifndef SED_HACKS
   13121             :     if ( bLocalUseExceptions ) {
   13122             :       CPLErr eclass = CPLGetLastErrorType();
   13123             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13124             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13125             :       }
   13126             :     }
   13127             : #endif
   13128             :   }
   13129          41 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   13130          41 :   {
   13131             :     /* %typemap(freearg) (const char *utf8_path) */
   13132          41 :     GDALPythonFreeCStr(arg1, bToFree1);
   13133             :   }
   13134          41 :   {
   13135             :     /* %typemap(freearg) (const char *utf8_path) */
   13136          41 :     GDALPythonFreeCStr(arg2, bToFree2);
   13137             :   }
   13138          41 :   {
   13139             :     /* %typemap(freearg) char **dict */
   13140          41 :     CSLDestroy( arg3 );
   13141             :   }
   13142          41 :   {
   13143             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   13144             :     
   13145          41 :     CPLFree(psProgressInfo);
   13146             :     
   13147             :   }
   13148          41 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   13149             :   return resultobj;
   13150           0 : fail:
   13151           0 :   {
   13152             :     /* %typemap(freearg) (const char *utf8_path) */
   13153           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   13154             :   }
   13155           0 :   {
   13156             :     /* %typemap(freearg) (const char *utf8_path) */
   13157           0 :     GDALPythonFreeCStr(arg2, bToFree2);
   13158             :   }
   13159           0 :   {
   13160             :     /* %typemap(freearg) char **dict */
   13161           0 :     CSLDestroy( arg3 );
   13162             :   }
   13163           0 :   {
   13164             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   13165             :     
   13166           0 :     CPLFree(psProgressInfo);
   13167             :     
   13168             :   }
   13169             :   return NULL;
   13170             : }
   13171             : 
   13172             : 
   13173           1 : SWIGINTERN PyObject *_wrap_AbortPendingUploads(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13174           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   13175           1 :   char *arg1 = (char *) 0 ;
   13176           1 :   int bToFree1 = 0 ;
   13177           1 :   PyObject *swig_obj[1] ;
   13178           1 :   bool result;
   13179             :   
   13180           1 :   if (!args) SWIG_fail;
   13181           1 :   swig_obj[0] = args;
   13182           1 :   {
   13183             :     /* %typemap(in) (const char *utf8_path) */
   13184           1 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   13185             :     {
   13186           1 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   13187             :     }
   13188             :     else
   13189             :     {
   13190           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   13191             :       
   13192             :     }
   13193           1 :     if (arg1 == NULL)
   13194             :     {
   13195           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   13196           0 :       SWIG_fail;
   13197             :     }
   13198             :   }
   13199           1 :   {
   13200           1 :     if (!arg1) {
   13201           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   13202             :     }
   13203             :   }
   13204           1 :   {
   13205           1 :     const int bLocalUseExceptions = GetUseExceptions();
   13206           1 :     if ( bLocalUseExceptions ) {
   13207           0 :       pushErrorHandler();
   13208             :     }
   13209           1 :     {
   13210           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   13211           1 :       result = (bool)VSIAbortPendingUploads((char const *)arg1);
   13212           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   13213             :     }
   13214           1 :     if ( bLocalUseExceptions ) {
   13215           0 :       popErrorHandler();
   13216             :     }
   13217             : #ifndef SED_HACKS
   13218             :     if ( bLocalUseExceptions ) {
   13219             :       CPLErr eclass = CPLGetLastErrorType();
   13220             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13221             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13222             :       }
   13223             :     }
   13224             : #endif
   13225             :   }
   13226           1 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   13227           1 :   {
   13228             :     /* %typemap(freearg) (const char *utf8_path) */
   13229           1 :     GDALPythonFreeCStr(arg1, bToFree1);
   13230             :   }
   13231           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   13232             :   return resultobj;
   13233           0 : fail:
   13234           0 :   {
   13235             :     /* %typemap(freearg) (const char *utf8_path) */
   13236           1 :     GDALPythonFreeCStr(arg1, bToFree1);
   13237             :   }
   13238             :   return NULL;
   13239             : }
   13240             : 
   13241             : 
   13242          15 : SWIGINTERN PyObject *_wrap_CopyFile(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   13243          15 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   13244          15 :   char *arg1 = (char *) 0 ;
   13245          15 :   char *arg2 = (char *) 0 ;
   13246          15 :   VSILFILE *arg3 = (VSILFILE *) NULL ;
   13247          15 :   GIntBig arg4 = (GIntBig) -1 ;
   13248          15 :   char **arg5 = (char **) NULL ;
   13249          15 :   GDALProgressFunc arg6 = (GDALProgressFunc) NULL ;
   13250          15 :   void *arg7 = (void *) NULL ;
   13251          15 :   int bToFree1 = 0 ;
   13252          15 :   int bToFree2 = 0 ;
   13253          15 :   void *argp3 = 0 ;
   13254          15 :   int res3 = 0 ;
   13255          15 :   PyObject * obj0 = 0 ;
   13256          15 :   PyObject * obj1 = 0 ;
   13257          15 :   PyObject * obj2 = 0 ;
   13258          15 :   PyObject * obj3 = 0 ;
   13259          15 :   PyObject * obj4 = 0 ;
   13260          15 :   PyObject * obj5 = 0 ;
   13261          15 :   PyObject * obj6 = 0 ;
   13262          15 :   char * kwnames[] = {
   13263             :     (char *)"pszSource",  (char *)"pszTarget",  (char *)"fpSource",  (char *)"nSourceSize",  (char *)"options",  (char *)"callback",  (char *)"callback_data",  NULL 
   13264             :   };
   13265          15 :   int result;
   13266             :   
   13267             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   13268          15 :   PyProgressData *psProgressInfo;
   13269          15 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   13270          15 :   psProgressInfo->nLastReported = -1;
   13271          15 :   psProgressInfo->psPyCallback = NULL;
   13272          15 :   psProgressInfo->psPyCallbackData = NULL;
   13273          15 :   arg7 = psProgressInfo;
   13274          15 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OOOOO:CopyFile", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
   13275          15 :   {
   13276             :     /* %typemap(in) (const char *utf8_path_or_none) */
   13277          15 :     if( obj0 == Py_None )
   13278             :     {
   13279             :       arg1 = NULL;
   13280             :     }
   13281             :     else
   13282             :     {
   13283          13 :       arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
   13284          13 :       if (arg1 == NULL)
   13285             :       {
   13286           0 :         PyErr_SetString( PyExc_RuntimeError, "not a string" );
   13287           0 :         SWIG_fail;
   13288             :       }
   13289             :     }
   13290             :   }
   13291          15 :   {
   13292             :     /* %typemap(in) (const char *utf8_path) */
   13293          15 :     if (PyUnicode_Check(obj1) || PyBytes_Check(obj1))
   13294             :     {
   13295          15 :       arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
   13296             :     }
   13297             :     else
   13298             :     {
   13299           0 :       arg2 = GDALPythonPathToCStr(obj1, &bToFree2);
   13300             :       
   13301             :     }
   13302          15 :     if (arg2 == NULL)
   13303             :     {
   13304           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   13305           0 :       SWIG_fail;
   13306             :     }
   13307             :   }
   13308          15 :   if (obj2) {
   13309           2 :     res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_VSILFILE, 0 |  0 );
   13310           2 :     if (!SWIG_IsOK(res3)) {
   13311           0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CopyFile" "', argument " "3"" of type '" "VSILFILE *""'"); 
   13312             :     }
   13313           2 :     arg3 = reinterpret_cast< VSILFILE * >(argp3);
   13314             :   }
   13315          15 :   if (obj3) {
   13316           0 :     {
   13317           0 :       arg4 = (GIntBig)PyLong_AsLongLong(obj3);
   13318             :     }
   13319             :   }
   13320          15 :   if (obj4) {
   13321           1 :     {
   13322             :       /* %typemap(in) char **dict */
   13323           1 :       arg5 = NULL;
   13324           1 :       if ( PySequence_Check( obj4 ) ) {
   13325           1 :         int bErr = FALSE;
   13326           1 :         arg5 = CSLFromPySequence(obj4, &bErr);
   13327           1 :         if ( bErr )
   13328             :         {
   13329           0 :           SWIG_fail;
   13330             :         }
   13331             :       }
   13332           0 :       else if ( PyMapping_Check( obj4 ) ) {
   13333           0 :         int bErr = FALSE;
   13334           0 :         arg5 = CSLFromPyMapping(obj4, &bErr);
   13335           0 :         if ( bErr )
   13336             :         {
   13337           0 :           SWIG_fail;
   13338             :         }
   13339             :       }
   13340             :       else {
   13341           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   13342           0 :         SWIG_fail;
   13343             :       }
   13344             :     }
   13345             :   }
   13346          15 :   if (obj5) {
   13347           4 :     {
   13348             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   13349             :       /* callback_func typemap */
   13350             :       
   13351             :       /* In some cases 0 is passed instead of None. */
   13352             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   13353           4 :       if ( PyLong_Check(obj5) || PyInt_Check(obj5) )
   13354             :       {
   13355           0 :         if( PyLong_AsLong(obj5) == 0 )
   13356             :         {
   13357           0 :           obj5 = Py_None;
   13358             :         }
   13359             :       }
   13360             :       
   13361           4 :       if (obj5 && obj5 != Py_None ) {
   13362           4 :         void* cbfunction = NULL;
   13363           4 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj5,
   13364             :             (void**)&cbfunction,
   13365             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   13366             :             SWIG_POINTER_EXCEPTION | 0 ));
   13367             :         
   13368           4 :         if ( cbfunction == GDALTermProgress ) {
   13369             :           arg6 = GDALTermProgress;
   13370             :         } else {
   13371           4 :           if (!PyCallable_Check(obj5)) {
   13372           0 :             PyErr_SetString( PyExc_RuntimeError,
   13373             :               "Object given is not a Python function" );
   13374           0 :             SWIG_fail;
   13375             :           }
   13376           4 :           psProgressInfo->psPyCallback = obj5;
   13377           4 :           arg6 = PyProgressProxy;
   13378             :         }
   13379             :         
   13380             :       }
   13381             :       
   13382             :     }
   13383             :   }
   13384          15 :   if (obj6) {
   13385           4 :     {
   13386             :       /* %typemap(in) ( void* callback_data=NULL)  */
   13387           4 :       psProgressInfo->psPyCallbackData = obj6 ;
   13388             :     }
   13389             :   }
   13390          15 :   {
   13391          15 :     if (!arg2) {
   13392          15 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   13393             :     }
   13394             :   }
   13395          15 :   {
   13396          15 :     const int bLocalUseExceptions = GetUseExceptions();
   13397          15 :     if ( bLocalUseExceptions ) {
   13398           6 :       pushErrorHandler();
   13399             :     }
   13400          15 :     {
   13401          15 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   13402          15 :       result = (int)wrapper_VSICopyFile((char const *)arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7);
   13403          15 :       SWIG_PYTHON_THREAD_END_ALLOW;
   13404             :     }
   13405          15 :     if ( bLocalUseExceptions ) {
   13406           6 :       popErrorHandler();
   13407             :     }
   13408             : #ifndef SED_HACKS
   13409             :     if ( bLocalUseExceptions ) {
   13410             :       CPLErr eclass = CPLGetLastErrorType();
   13411             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13412             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13413             :       }
   13414             :     }
   13415             : #endif
   13416             :   }
   13417          15 :   resultobj = SWIG_From_int(static_cast< int >(result));
   13418          15 :   {
   13419             :     /* %typemap(freearg) (const char *utf8_path_or_none) */
   13420          15 :     if( arg1 != NULL )
   13421          13 :     GDALPythonFreeCStr(arg1, bToFree1);
   13422             :   }
   13423          15 :   {
   13424             :     /* %typemap(freearg) (const char *utf8_path) */
   13425          15 :     GDALPythonFreeCStr(arg2, bToFree2);
   13426             :   }
   13427          15 :   {
   13428             :     /* %typemap(freearg) char **dict */
   13429          15 :     CSLDestroy( arg5 );
   13430             :   }
   13431          15 :   {
   13432             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   13433             :     
   13434          15 :     CPLFree(psProgressInfo);
   13435             :     
   13436             :   }
   13437          15 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   13438             :   return resultobj;
   13439           0 : fail:
   13440           0 :   {
   13441             :     /* %typemap(freearg) (const char *utf8_path_or_none) */
   13442           0 :     if( arg1 != NULL )
   13443           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   13444             :   }
   13445           0 :   {
   13446             :     /* %typemap(freearg) (const char *utf8_path) */
   13447           0 :     GDALPythonFreeCStr(arg2, bToFree2);
   13448             :   }
   13449           0 :   {
   13450             :     /* %typemap(freearg) char **dict */
   13451           0 :     CSLDestroy( arg5 );
   13452             :   }
   13453           0 :   {
   13454             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   13455             :     
   13456           0 :     CPLFree(psProgressInfo);
   13457             :     
   13458             :   }
   13459             :   return NULL;
   13460             : }
   13461             : 
   13462             : 
   13463           9 : SWIGINTERN PyObject *_wrap_GetActualURL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13464           9 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   13465           9 :   char *arg1 = (char *) 0 ;
   13466           9 :   int bToFree1 = 0 ;
   13467           9 :   PyObject *swig_obj[1] ;
   13468           9 :   char *result = 0 ;
   13469             :   
   13470           9 :   if (!args) SWIG_fail;
   13471           9 :   swig_obj[0] = args;
   13472           9 :   {
   13473             :     /* %typemap(in) (const char *utf8_path) */
   13474           9 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   13475             :     {
   13476           9 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   13477             :     }
   13478             :     else
   13479             :     {
   13480           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   13481             :       
   13482             :     }
   13483           9 :     if (arg1 == NULL)
   13484             :     {
   13485           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   13486           0 :       SWIG_fail;
   13487             :     }
   13488             :   }
   13489           9 :   {
   13490           9 :     if (!arg1) {
   13491           9 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   13492             :     }
   13493             :   }
   13494           9 :   {
   13495           9 :     const int bLocalUseExceptions = GetUseExceptions();
   13496           9 :     if ( bLocalUseExceptions ) {
   13497           2 :       pushErrorHandler();
   13498             :     }
   13499           9 :     {
   13500           9 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   13501           9 :       result = (char *)VSIGetActualURL((char const *)arg1);
   13502           9 :       SWIG_PYTHON_THREAD_END_ALLOW;
   13503             :     }
   13504           9 :     if ( bLocalUseExceptions ) {
   13505           2 :       popErrorHandler();
   13506             :     }
   13507             : #ifndef SED_HACKS
   13508             :     if ( bLocalUseExceptions ) {
   13509             :       CPLErr eclass = CPLGetLastErrorType();
   13510             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13511             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13512             :       }
   13513             :     }
   13514             : #endif
   13515             :   }
   13516           9 :   resultobj = SWIG_FromCharPtr((const char *)result);
   13517           9 :   {
   13518             :     /* %typemap(freearg) (const char *utf8_path) */
   13519           9 :     GDALPythonFreeCStr(arg1, bToFree1);
   13520             :   }
   13521           9 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   13522             :   return resultobj;
   13523           0 : fail:
   13524           0 :   {
   13525             :     /* %typemap(freearg) (const char *utf8_path) */
   13526           9 :     GDALPythonFreeCStr(arg1, bToFree1);
   13527             :   }
   13528             :   return NULL;
   13529             : }
   13530             : 
   13531             : 
   13532          23 : SWIGINTERN PyObject *_wrap_GetSignedURL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13533          23 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   13534          23 :   char *arg1 = (char *) 0 ;
   13535          23 :   char **arg2 = (char **) NULL ;
   13536          23 :   int bToFree1 = 0 ;
   13537          23 :   PyObject *swig_obj[2] ;
   13538          23 :   retStringAndCPLFree *result = 0 ;
   13539             :   
   13540          23 :   if (!SWIG_Python_UnpackTuple(args, "GetSignedURL", 1, 2, swig_obj)) SWIG_fail;
   13541          23 :   {
   13542             :     /* %typemap(in) (const char *utf8_path) */
   13543          23 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   13544             :     {
   13545          23 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   13546             :     }
   13547             :     else
   13548             :     {
   13549           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   13550             :       
   13551             :     }
   13552          23 :     if (arg1 == NULL)
   13553             :     {
   13554           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   13555           0 :       SWIG_fail;
   13556             :     }
   13557             :   }
   13558          23 :   if (swig_obj[1]) {
   13559           7 :     {
   13560             :       /* %typemap(in) char **dict */
   13561           7 :       arg2 = NULL;
   13562           7 :       if ( PySequence_Check( swig_obj[1] ) ) {
   13563           7 :         int bErr = FALSE;
   13564           7 :         arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   13565           7 :         if ( bErr )
   13566             :         {
   13567           0 :           SWIG_fail;
   13568             :         }
   13569             :       }
   13570           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   13571           0 :         int bErr = FALSE;
   13572           0 :         arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   13573           0 :         if ( bErr )
   13574             :         {
   13575           0 :           SWIG_fail;
   13576             :         }
   13577             :       }
   13578             :       else {
   13579           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   13580           0 :         SWIG_fail;
   13581             :       }
   13582             :     }
   13583             :   }
   13584          23 :   {
   13585          23 :     if (!arg1) {
   13586          23 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   13587             :     }
   13588             :   }
   13589          23 :   {
   13590          23 :     const int bLocalUseExceptions = GetUseExceptions();
   13591          23 :     if ( bLocalUseExceptions ) {
   13592           4 :       pushErrorHandler();
   13593             :     }
   13594          23 :     {
   13595          23 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   13596          23 :       result = (retStringAndCPLFree *)wrapper_VSIGetSignedURL((char const *)arg1,arg2);
   13597          23 :       SWIG_PYTHON_THREAD_END_ALLOW;
   13598             :     }
   13599          23 :     if ( bLocalUseExceptions ) {
   13600           4 :       popErrorHandler();
   13601             :     }
   13602             : #ifndef SED_HACKS
   13603             :     if ( bLocalUseExceptions ) {
   13604             :       CPLErr eclass = CPLGetLastErrorType();
   13605             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13606             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13607             :       }
   13608             :     }
   13609             : #endif
   13610             :   }
   13611          23 :   {
   13612             :     /* %typemap(out) (retStringAndCPLFree*) */
   13613          23 :     Py_XDECREF(resultobj);
   13614          23 :     if(result)
   13615             :     {
   13616          14 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   13617          14 :       CPLFree(result);
   13618             :     }
   13619             :     else
   13620             :     {
   13621           9 :       resultobj = Py_None;
   13622           9 :       Py_INCREF(resultobj);
   13623             :     }
   13624             :   }
   13625          23 :   {
   13626             :     /* %typemap(freearg) (const char *utf8_path) */
   13627          23 :     GDALPythonFreeCStr(arg1, bToFree1);
   13628             :   }
   13629          23 :   {
   13630             :     /* %typemap(freearg) char **dict */
   13631          23 :     CSLDestroy( arg2 );
   13632             :   }
   13633          23 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   13634             :   return resultobj;
   13635           0 : fail:
   13636           0 :   {
   13637             :     /* %typemap(freearg) (const char *utf8_path) */
   13638           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   13639             :   }
   13640           0 :   {
   13641             :     /* %typemap(freearg) char **dict */
   13642           0 :     CSLDestroy( arg2 );
   13643             :   }
   13644             :   return NULL;
   13645             : }
   13646             : 
   13647             : 
   13648           2 : SWIGINTERN PyObject *_wrap_GetFileSystemsPrefixes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13649           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   13650           2 :   char **result = 0 ;
   13651             :   
   13652           2 :   if (!SWIG_Python_UnpackTuple(args, "GetFileSystemsPrefixes", 0, 0, 0)) SWIG_fail;
   13653           2 :   {
   13654           2 :     const int bLocalUseExceptions = GetUseExceptions();
   13655           2 :     if ( bLocalUseExceptions ) {
   13656           0 :       pushErrorHandler();
   13657             :     }
   13658           2 :     {
   13659           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   13660           2 :       result = (char **)VSIGetFileSystemsPrefixes();
   13661           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   13662             :     }
   13663           2 :     if ( bLocalUseExceptions ) {
   13664           0 :       popErrorHandler();
   13665             :     }
   13666             : #ifndef SED_HACKS
   13667             :     if ( bLocalUseExceptions ) {
   13668             :       CPLErr eclass = CPLGetLastErrorType();
   13669             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13670             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13671             :       }
   13672             :     }
   13673             : #endif
   13674             :   }
   13675           2 :   {
   13676             :     /* %typemap(out) char **CSL -> ( string ) */
   13677           2 :     bool bErr = false;
   13678           2 :     resultobj = CSLToList(result, &bErr);
   13679           2 :     CSLDestroy(result);
   13680           2 :     if( bErr ) {
   13681           0 :       SWIG_fail;
   13682             :     }
   13683             :   }
   13684           2 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   13685             :   return resultobj;
   13686             : fail:
   13687             :   return NULL;
   13688             : }
   13689             : 
   13690             : 
   13691          27 : SWIGINTERN PyObject *_wrap_GetFileSystemOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13692          27 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   13693          27 :   char *arg1 = (char *) 0 ;
   13694          27 :   int bToFree1 = 0 ;
   13695          27 :   PyObject *swig_obj[1] ;
   13696          27 :   char *result = 0 ;
   13697             :   
   13698          27 :   if (!args) SWIG_fail;
   13699          27 :   swig_obj[0] = args;
   13700          27 :   {
   13701             :     /* %typemap(in) (const char *utf8_path) */
   13702          27 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   13703             :     {
   13704          27 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   13705             :     }
   13706             :     else
   13707             :     {
   13708           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   13709             :       
   13710             :     }
   13711          27 :     if (arg1 == NULL)
   13712             :     {
   13713           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   13714           0 :       SWIG_fail;
   13715             :     }
   13716             :   }
   13717          27 :   {
   13718          27 :     if (!arg1) {
   13719          27 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   13720             :     }
   13721             :   }
   13722          27 :   {
   13723          27 :     const int bLocalUseExceptions = GetUseExceptions();
   13724          27 :     if ( bLocalUseExceptions ) {
   13725           0 :       pushErrorHandler();
   13726             :     }
   13727          27 :     {
   13728          27 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   13729          27 :       result = (char *)VSIGetFileSystemOptions((char const *)arg1);
   13730          27 :       SWIG_PYTHON_THREAD_END_ALLOW;
   13731             :     }
   13732          27 :     if ( bLocalUseExceptions ) {
   13733           0 :       popErrorHandler();
   13734             :     }
   13735             : #ifndef SED_HACKS
   13736             :     if ( bLocalUseExceptions ) {
   13737             :       CPLErr eclass = CPLGetLastErrorType();
   13738             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13739             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13740             :       }
   13741             :     }
   13742             : #endif
   13743             :   }
   13744          27 :   resultobj = SWIG_FromCharPtr((const char *)result);
   13745          27 :   {
   13746             :     /* %typemap(freearg) (const char *utf8_path) */
   13747          27 :     GDALPythonFreeCStr(arg1, bToFree1);
   13748             :   }
   13749          27 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   13750             :   return resultobj;
   13751           0 : fail:
   13752           0 :   {
   13753             :     /* %typemap(freearg) (const char *utf8_path) */
   13754          27 :     GDALPythonFreeCStr(arg1, bToFree1);
   13755             :   }
   13756             :   return NULL;
   13757             : }
   13758             : 
   13759             : 
   13760         271 : SWIGINTERN PyObject *VSILFILE_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13761         271 :   PyObject *obj;
   13762         271 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   13763         271 :   SWIG_TypeNewClientData(SWIGTYPE_p_VSILFILE, SWIG_NewClientData(obj));
   13764         271 :   return SWIG_Py_Void();
   13765             : }
   13766             : 
   13767         605 : SWIGINTERN PyObject *_wrap_StatBuf_mode_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13768         605 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   13769         605 :   StatBuf *arg1 = (StatBuf *) 0 ;
   13770         605 :   void *argp1 = 0 ;
   13771         605 :   int res1 = 0 ;
   13772         605 :   PyObject *swig_obj[1] ;
   13773         605 :   int result;
   13774             :   
   13775         605 :   if (!args) SWIG_fail;
   13776         605 :   swig_obj[0] = args;
   13777         605 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_StatBuf, 0 |  0 );
   13778         605 :   if (!SWIG_IsOK(res1)) {
   13779           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StatBuf_mode_get" "', argument " "1"" of type '" "StatBuf *""'"); 
   13780             :   }
   13781         605 :   arg1 = reinterpret_cast< StatBuf * >(argp1);
   13782         605 :   {
   13783         605 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   13784         605 :     result = (int) ((arg1)->mode);
   13785         605 :     SWIG_PYTHON_THREAD_END_ALLOW;
   13786             :   }
   13787         605 :   resultobj = SWIG_From_int(static_cast< int >(result));
   13788         605 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   13789             :   return resultobj;
   13790             : fail:
   13791             :   return NULL;
   13792             : }
   13793             : 
   13794             : 
   13795        1584 : SWIGINTERN PyObject *_wrap_StatBuf_size_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13796        1584 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   13797        1584 :   StatBuf *arg1 = (StatBuf *) 0 ;
   13798        1584 :   void *argp1 = 0 ;
   13799        1584 :   int res1 = 0 ;
   13800        1584 :   PyObject *swig_obj[1] ;
   13801        1584 :   GIntBig result;
   13802             :   
   13803        1584 :   if (!args) SWIG_fail;
   13804        1584 :   swig_obj[0] = args;
   13805        1584 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_StatBuf, 0 |  0 );
   13806        1584 :   if (!SWIG_IsOK(res1)) {
   13807           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StatBuf_size_get" "', argument " "1"" of type '" "StatBuf *""'"); 
   13808             :   }
   13809        1584 :   arg1 = reinterpret_cast< StatBuf * >(argp1);
   13810        1584 :   {
   13811        1584 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   13812        1584 :     result =  ((arg1)->size);
   13813        1584 :     SWIG_PYTHON_THREAD_END_ALLOW;
   13814             :   }
   13815        1584 :   {
   13816        1584 :     resultobj = PyLong_FromLongLong(result);
   13817             :   }
   13818        1584 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   13819             :   return resultobj;
   13820             : fail:
   13821             :   return NULL;
   13822             : }
   13823             : 
   13824             : 
   13825         112 : SWIGINTERN PyObject *_wrap_StatBuf_mtime_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13826         112 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   13827         112 :   StatBuf *arg1 = (StatBuf *) 0 ;
   13828         112 :   void *argp1 = 0 ;
   13829         112 :   int res1 = 0 ;
   13830         112 :   PyObject *swig_obj[1] ;
   13831         112 :   GIntBig result;
   13832             :   
   13833         112 :   if (!args) SWIG_fail;
   13834         112 :   swig_obj[0] = args;
   13835         112 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_StatBuf, 0 |  0 );
   13836         112 :   if (!SWIG_IsOK(res1)) {
   13837           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StatBuf_mtime_get" "', argument " "1"" of type '" "StatBuf *""'"); 
   13838             :   }
   13839         112 :   arg1 = reinterpret_cast< StatBuf * >(argp1);
   13840         112 :   {
   13841         112 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   13842         112 :     result =  ((arg1)->mtime);
   13843         112 :     SWIG_PYTHON_THREAD_END_ALLOW;
   13844             :   }
   13845         112 :   {
   13846         112 :     resultobj = PyLong_FromLongLong(result);
   13847             :   }
   13848         112 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   13849             :   return resultobj;
   13850             : fail:
   13851             :   return NULL;
   13852             : }
   13853             : 
   13854             : 
   13855           0 : SWIGINTERN PyObject *_wrap_new_StatBuf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13856           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   13857           0 :   StatBuf *arg1 = (StatBuf *) 0 ;
   13858           0 :   void *argp1 = 0 ;
   13859           0 :   int res1 = 0 ;
   13860           0 :   PyObject *swig_obj[1] ;
   13861           0 :   StatBuf *result = 0 ;
   13862             :   
   13863           0 :   if (!args) SWIG_fail;
   13864           0 :   swig_obj[0] = args;
   13865           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_StatBuf, 0 |  0 );
   13866           0 :   if (!SWIG_IsOK(res1)) {
   13867           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_StatBuf" "', argument " "1"" of type '" "StatBuf *""'"); 
   13868             :   }
   13869           0 :   arg1 = reinterpret_cast< StatBuf * >(argp1);
   13870           0 :   {
   13871           0 :     const int bLocalUseExceptions = GetUseExceptions();
   13872           0 :     if ( bLocalUseExceptions ) {
   13873           0 :       pushErrorHandler();
   13874             :     }
   13875           0 :     {
   13876           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   13877           0 :       result = (StatBuf *)new_StatBuf(arg1);
   13878           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   13879             :     }
   13880           0 :     if ( bLocalUseExceptions ) {
   13881           0 :       popErrorHandler();
   13882             :     }
   13883             : #ifndef SED_HACKS
   13884             :     if ( bLocalUseExceptions ) {
   13885             :       CPLErr eclass = CPLGetLastErrorType();
   13886             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13887             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13888             :       }
   13889             :     }
   13890             : #endif
   13891             :   }
   13892           0 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StatBuf, SWIG_POINTER_NEW |  0 );
   13893           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   13894             :   return resultobj;
   13895             : fail:
   13896             :   return NULL;
   13897             : }
   13898             : 
   13899             : 
   13900        4632 : SWIGINTERN PyObject *_wrap_delete_StatBuf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13901        4632 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   13902        4632 :   StatBuf *arg1 = (StatBuf *) 0 ;
   13903        4632 :   void *argp1 = 0 ;
   13904        4632 :   int res1 = 0 ;
   13905        4632 :   PyObject *swig_obj[1] ;
   13906             :   
   13907        4632 :   if (!args) SWIG_fail;
   13908        4632 :   swig_obj[0] = args;
   13909        4632 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_StatBuf, SWIG_POINTER_DISOWN |  0 );
   13910        4632 :   if (!SWIG_IsOK(res1)) {
   13911           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_StatBuf" "', argument " "1"" of type '" "StatBuf *""'"); 
   13912             :   }
   13913        4632 :   arg1 = reinterpret_cast< StatBuf * >(argp1);
   13914        4632 :   {
   13915        4632 :     const int bLocalUseExceptions = GetUseExceptions();
   13916        4632 :     if ( bLocalUseExceptions ) {
   13917        3009 :       pushErrorHandler();
   13918             :     }
   13919        4632 :     {
   13920        4632 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   13921        4632 :       delete_StatBuf(arg1);
   13922        4632 :       SWIG_PYTHON_THREAD_END_ALLOW;
   13923             :     }
   13924        4632 :     if ( bLocalUseExceptions ) {
   13925        3009 :       popErrorHandler();
   13926             :     }
   13927             : #ifndef SED_HACKS
   13928             :     if ( bLocalUseExceptions ) {
   13929             :       CPLErr eclass = CPLGetLastErrorType();
   13930             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13931             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13932             :       }
   13933             :     }
   13934             : #endif
   13935             :   }
   13936        4632 :   resultobj = SWIG_Py_Void();
   13937        4632 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   13938             :   return resultobj;
   13939             : fail:
   13940             :   return NULL;
   13941             : }
   13942             : 
   13943             : 
   13944        2358 : SWIGINTERN PyObject *_wrap_StatBuf_IsDirectory(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13945        2358 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   13946        2358 :   StatBuf *arg1 = (StatBuf *) 0 ;
   13947        2358 :   void *argp1 = 0 ;
   13948        2358 :   int res1 = 0 ;
   13949        2358 :   PyObject *swig_obj[1] ;
   13950        2358 :   int result;
   13951             :   
   13952        2358 :   if (!args) SWIG_fail;
   13953        2358 :   swig_obj[0] = args;
   13954        2358 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_StatBuf, 0 |  0 );
   13955        2358 :   if (!SWIG_IsOK(res1)) {
   13956           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StatBuf_IsDirectory" "', argument " "1"" of type '" "StatBuf *""'"); 
   13957             :   }
   13958        2358 :   arg1 = reinterpret_cast< StatBuf * >(argp1);
   13959        2358 :   {
   13960        2358 :     const int bLocalUseExceptions = GetUseExceptions();
   13961        2358 :     if ( bLocalUseExceptions ) {
   13962        2354 :       pushErrorHandler();
   13963             :     }
   13964        2358 :     {
   13965        2358 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   13966        2358 :       result = (int)StatBuf_IsDirectory(arg1);
   13967        2358 :       SWIG_PYTHON_THREAD_END_ALLOW;
   13968             :     }
   13969        2358 :     if ( bLocalUseExceptions ) {
   13970        2354 :       popErrorHandler();
   13971             :     }
   13972             : #ifndef SED_HACKS
   13973             :     if ( bLocalUseExceptions ) {
   13974             :       CPLErr eclass = CPLGetLastErrorType();
   13975             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13976             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13977             :       }
   13978             :     }
   13979             : #endif
   13980             :   }
   13981        2358 :   resultobj = SWIG_From_int(static_cast< int >(result));
   13982        2358 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   13983             :   return resultobj;
   13984             : fail:
   13985             :   return NULL;
   13986             : }
   13987             : 
   13988             : 
   13989         271 : SWIGINTERN PyObject *StatBuf_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13990         271 :   PyObject *obj;
   13991         271 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   13992         271 :   SWIG_TypeNewClientData(SWIGTYPE_p_StatBuf, SWIG_NewClientData(obj));
   13993         271 :   return SWIG_Py_Void();
   13994             : }
   13995             : 
   13996           0 : SWIGINTERN PyObject *StatBuf_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13997           0 :   return SWIG_Python_InitShadowInstance(args);
   13998             : }
   13999             : 
   14000        5998 : SWIGINTERN PyObject *_wrap_VSIStatL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14001        5998 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   14002        5998 :   char *arg1 = (char *) 0 ;
   14003        5998 :   StatBuf *arg2 = (StatBuf *) 0 ;
   14004        5998 :   int arg3 = (int) 0 ;
   14005        5998 :   int bToFree1 = 0 ;
   14006        5998 :   StatBuf sStatBuf2 ;
   14007        5998 :   int val3 ;
   14008        5998 :   int ecode3 = 0 ;
   14009        5998 :   PyObject *swig_obj[2] ;
   14010        5998 :   int result;
   14011             :   
   14012        5998 :   {
   14013             :     /* %typemap(in,numinputs=0) (StatBuf *psStatBufOut) (StatBuf sStatBuf2 ) */
   14014        5998 :     arg2 = &sStatBuf2;
   14015             :   }
   14016        5998 :   if (!SWIG_Python_UnpackTuple(args, "VSIStatL", 1, 2, swig_obj)) SWIG_fail;
   14017        5998 :   {
   14018             :     /* %typemap(in) (const char *utf8_path) */
   14019        5998 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   14020             :     {
   14021        5274 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   14022             :     }
   14023             :     else
   14024             :     {
   14025         724 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   14026             :       
   14027             :     }
   14028        5998 :     if (arg1 == NULL)
   14029             :     {
   14030           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   14031           0 :       SWIG_fail;
   14032             :     }
   14033             :   }
   14034        5998 :   if (swig_obj[1]) {
   14035        2386 :     ecode3 = SWIG_AsVal_int(swig_obj[1], &val3);
   14036        2386 :     if (!SWIG_IsOK(ecode3)) {
   14037           0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VSIStatL" "', argument " "3"" of type '" "int""'");
   14038             :     } 
   14039             :     arg3 = static_cast< int >(val3);
   14040             :   }
   14041        5998 :   {
   14042        5998 :     if (!arg1) {
   14043        5998 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   14044             :     }
   14045             :   }
   14046        5998 :   {
   14047        5998 :     const int bLocalUseExceptions = GetUseExceptions();
   14048        5998 :     if ( bLocalUseExceptions ) {
   14049        3128 :       pushErrorHandler();
   14050             :     }
   14051        5998 :     {
   14052        5998 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   14053        5998 :       result = (int)wrapper_VSIStatL((char const *)arg1,arg2,arg3);
   14054        5998 :       SWIG_PYTHON_THREAD_END_ALLOW;
   14055             :     }
   14056        5998 :     if ( bLocalUseExceptions ) {
   14057        3128 :       popErrorHandler();
   14058             :     }
   14059             : #ifndef SED_HACKS
   14060             :     if ( bLocalUseExceptions ) {
   14061             :       CPLErr eclass = CPLGetLastErrorType();
   14062             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14063             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14064             :       }
   14065             :     }
   14066             : #endif
   14067             :   }
   14068        5998 :   resultobj = SWIG_From_int(static_cast< int >(result));
   14069        5998 :   {
   14070             :     /* %typemap(argout) (StatBuf *psStatBufOut)*/
   14071        5998 :     Py_DECREF(resultobj);
   14072        5998 :     if (result == 0)
   14073        4632 :     resultobj = SWIG_NewPointerObj((void*)new_StatBuf( arg2 ),SWIGTYPE_p_StatBuf,1);
   14074             :     else
   14075             :     {
   14076        1366 :       resultobj = Py_None;
   14077        1366 :       Py_INCREF(resultobj);
   14078             :     }
   14079             :   }
   14080        5998 :   {
   14081             :     /* %typemap(freearg) (const char *utf8_path) */
   14082        5998 :     GDALPythonFreeCStr(arg1, bToFree1);
   14083             :   }
   14084        5998 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   14085             :   return resultobj;
   14086           0 : fail:
   14087           0 :   {
   14088             :     /* %typemap(freearg) (const char *utf8_path) */
   14089        5998 :     GDALPythonFreeCStr(arg1, bToFree1);
   14090             :   }
   14091             :   return NULL;
   14092             : }
   14093             : 
   14094             : 
   14095          25 : SWIGINTERN PyObject *_wrap_GetFileMetadata(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14096          25 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   14097          25 :   char *arg1 = (char *) 0 ;
   14098          25 :   char *arg2 = (char *) 0 ;
   14099          25 :   char **arg3 = (char **) NULL ;
   14100          25 :   int bToFree1 = 0 ;
   14101          25 :   int res2 ;
   14102          25 :   char *buf2 = 0 ;
   14103          25 :   int alloc2 = 0 ;
   14104          25 :   PyObject *swig_obj[3] ;
   14105          25 :   char **result = 0 ;
   14106             :   
   14107          25 :   if (!SWIG_Python_UnpackTuple(args, "GetFileMetadata", 2, 3, swig_obj)) SWIG_fail;
   14108          25 :   {
   14109             :     /* %typemap(in) (const char *utf8_path) */
   14110          25 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   14111             :     {
   14112          25 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   14113             :     }
   14114             :     else
   14115             :     {
   14116           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   14117             :       
   14118             :     }
   14119          25 :     if (arg1 == NULL)
   14120             :     {
   14121           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   14122           0 :       SWIG_fail;
   14123             :     }
   14124             :   }
   14125          25 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   14126          25 :   if (!SWIG_IsOK(res2)) {
   14127           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GetFileMetadata" "', argument " "2"" of type '" "char const *""'");
   14128             :   }
   14129          25 :   arg2 = reinterpret_cast< char * >(buf2);
   14130          25 :   if (swig_obj[2]) {
   14131           0 :     {
   14132             :       /* %typemap(in) char **dict */
   14133           0 :       arg3 = NULL;
   14134           0 :       if ( PySequence_Check( swig_obj[2] ) ) {
   14135           0 :         int bErr = FALSE;
   14136           0 :         arg3 = CSLFromPySequence(swig_obj[2], &bErr);
   14137           0 :         if ( bErr )
   14138             :         {
   14139           0 :           SWIG_fail;
   14140             :         }
   14141             :       }
   14142           0 :       else if ( PyMapping_Check( swig_obj[2] ) ) {
   14143           0 :         int bErr = FALSE;
   14144           0 :         arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
   14145           0 :         if ( bErr )
   14146             :         {
   14147           0 :           SWIG_fail;
   14148             :         }
   14149             :       }
   14150             :       else {
   14151           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   14152           0 :         SWIG_fail;
   14153             :       }
   14154             :     }
   14155             :   }
   14156          25 :   {
   14157          25 :     if (!arg1) {
   14158          25 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   14159             :     }
   14160             :   }
   14161          25 :   {
   14162          25 :     const int bLocalUseExceptions = GetUseExceptions();
   14163          25 :     if ( bLocalUseExceptions ) {
   14164           8 :       pushErrorHandler();
   14165             :     }
   14166          25 :     {
   14167          25 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   14168          25 :       result = (char **)VSIGetFileMetadata((char const *)arg1,(char const *)arg2,arg3);
   14169          25 :       SWIG_PYTHON_THREAD_END_ALLOW;
   14170             :     }
   14171          25 :     if ( bLocalUseExceptions ) {
   14172           8 :       popErrorHandler();
   14173             :     }
   14174             : #ifndef SED_HACKS
   14175             :     if ( bLocalUseExceptions ) {
   14176             :       CPLErr eclass = CPLGetLastErrorType();
   14177             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14178             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14179             :       }
   14180             :     }
   14181             : #endif
   14182             :   }
   14183          25 :   {
   14184             :     /* %typemap(out) char **dict */
   14185          25 :     resultobj = GetCSLStringAsPyDict(result, true);
   14186             :   }
   14187          25 :   {
   14188             :     /* %typemap(freearg) (const char *utf8_path) */
   14189          25 :     GDALPythonFreeCStr(arg1, bToFree1);
   14190             :   }
   14191          25 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   14192          25 :   {
   14193             :     /* %typemap(freearg) char **dict */
   14194          25 :     CSLDestroy( arg3 );
   14195             :   }
   14196          25 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   14197             :   return resultobj;
   14198           0 : fail:
   14199           0 :   {
   14200             :     /* %typemap(freearg) (const char *utf8_path) */
   14201           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   14202             :   }
   14203           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   14204           0 :   {
   14205             :     /* %typemap(freearg) char **dict */
   14206           0 :     CSLDestroy( arg3 );
   14207             :   }
   14208             :   return NULL;
   14209             : }
   14210             : 
   14211             : 
   14212          17 : SWIGINTERN PyObject *_wrap_SetFileMetadata(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14213          17 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   14214          17 :   char *arg1 = (char *) 0 ;
   14215          17 :   char **arg2 = (char **) 0 ;
   14216          17 :   char *arg3 = (char *) 0 ;
   14217          17 :   char **arg4 = (char **) NULL ;
   14218          17 :   int bToFree1 = 0 ;
   14219          17 :   int res3 ;
   14220          17 :   char *buf3 = 0 ;
   14221          17 :   int alloc3 = 0 ;
   14222          17 :   PyObject *swig_obj[4] ;
   14223          17 :   bool result;
   14224             :   
   14225          17 :   if (!SWIG_Python_UnpackTuple(args, "SetFileMetadata", 3, 4, swig_obj)) SWIG_fail;
   14226          17 :   {
   14227             :     /* %typemap(in) (const char *utf8_path) */
   14228          17 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   14229             :     {
   14230          17 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   14231             :     }
   14232             :     else
   14233             :     {
   14234           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   14235             :       
   14236             :     }
   14237          17 :     if (arg1 == NULL)
   14238             :     {
   14239           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   14240           0 :       SWIG_fail;
   14241             :     }
   14242             :   }
   14243          17 :   {
   14244             :     /* %typemap(in) char **dict */
   14245          17 :     arg2 = NULL;
   14246          17 :     if ( PySequence_Check( swig_obj[1] ) ) {
   14247           0 :       int bErr = FALSE;
   14248           0 :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   14249           0 :       if ( bErr )
   14250             :       {
   14251           0 :         SWIG_fail;
   14252             :       }
   14253             :     }
   14254          17 :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   14255          17 :       int bErr = FALSE;
   14256          17 :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   14257          17 :       if ( bErr )
   14258             :       {
   14259           0 :         SWIG_fail;
   14260             :       }
   14261             :     }
   14262             :     else {
   14263           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   14264           0 :       SWIG_fail;
   14265             :     }
   14266             :   }
   14267          17 :   res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   14268          17 :   if (!SWIG_IsOK(res3)) {
   14269           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SetFileMetadata" "', argument " "3"" of type '" "char const *""'");
   14270             :   }
   14271          17 :   arg3 = reinterpret_cast< char * >(buf3);
   14272          17 :   if (swig_obj[3]) {
   14273           1 :     {
   14274             :       /* %typemap(in) char **dict */
   14275           1 :       arg4 = NULL;
   14276           1 :       if ( PySequence_Check( swig_obj[3] ) ) {
   14277           1 :         int bErr = FALSE;
   14278           1 :         arg4 = CSLFromPySequence(swig_obj[3], &bErr);
   14279           1 :         if ( bErr )
   14280             :         {
   14281           0 :           SWIG_fail;
   14282             :         }
   14283             :       }
   14284           0 :       else if ( PyMapping_Check( swig_obj[3] ) ) {
   14285           0 :         int bErr = FALSE;
   14286           0 :         arg4 = CSLFromPyMapping(swig_obj[3], &bErr);
   14287           0 :         if ( bErr )
   14288             :         {
   14289           0 :           SWIG_fail;
   14290             :         }
   14291             :       }
   14292             :       else {
   14293           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   14294           0 :         SWIG_fail;
   14295             :       }
   14296             :     }
   14297             :   }
   14298          17 :   {
   14299          17 :     if (!arg1) {
   14300          17 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   14301             :     }
   14302             :   }
   14303          17 :   {
   14304          17 :     const int bLocalUseExceptions = GetUseExceptions();
   14305          17 :     if ( bLocalUseExceptions ) {
   14306           0 :       pushErrorHandler();
   14307             :     }
   14308          17 :     {
   14309          17 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   14310          17 :       result = (bool)VSISetFileMetadata((char const *)arg1,arg2,(char const *)arg3,arg4);
   14311          17 :       SWIG_PYTHON_THREAD_END_ALLOW;
   14312             :     }
   14313          17 :     if ( bLocalUseExceptions ) {
   14314           0 :       popErrorHandler();
   14315             :     }
   14316             : #ifndef SED_HACKS
   14317             :     if ( bLocalUseExceptions ) {
   14318             :       CPLErr eclass = CPLGetLastErrorType();
   14319             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14320             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14321             :       }
   14322             :     }
   14323             : #endif
   14324             :   }
   14325          17 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   14326          17 :   {
   14327             :     /* %typemap(freearg) (const char *utf8_path) */
   14328          17 :     GDALPythonFreeCStr(arg1, bToFree1);
   14329             :   }
   14330          17 :   {
   14331             :     /* %typemap(freearg) char **dict */
   14332          17 :     CSLDestroy( arg2 );
   14333             :   }
   14334          17 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   14335          17 :   {
   14336             :     /* %typemap(freearg) char **dict */
   14337          17 :     CSLDestroy( arg4 );
   14338             :   }
   14339          17 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   14340             :   return resultobj;
   14341           0 : fail:
   14342           0 :   {
   14343             :     /* %typemap(freearg) (const char *utf8_path) */
   14344           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   14345             :   }
   14346           0 :   {
   14347             :     /* %typemap(freearg) char **dict */
   14348           0 :     CSLDestroy( arg2 );
   14349             :   }
   14350           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   14351           0 :   {
   14352             :     /* %typemap(freearg) char **dict */
   14353           0 :     CSLDestroy( arg4 );
   14354             :   }
   14355             :   return NULL;
   14356             : }
   14357             : 
   14358             : 
   14359        4525 : SWIGINTERN PyObject *_wrap_VSIFOpenL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14360        4525 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   14361        4525 :   char *arg1 = (char *) 0 ;
   14362        4525 :   char *arg2 = (char *) 0 ;
   14363        4525 :   int bToFree1 = 0 ;
   14364        4525 :   int res2 ;
   14365        4525 :   char *buf2 = 0 ;
   14366        4525 :   int alloc2 = 0 ;
   14367        4525 :   PyObject *swig_obj[2] ;
   14368        4525 :   VSILFILE *result = 0 ;
   14369             :   
   14370        4525 :   if (!SWIG_Python_UnpackTuple(args, "VSIFOpenL", 2, 2, swig_obj)) SWIG_fail;
   14371        4525 :   {
   14372             :     /* %typemap(in) (const char *utf8_path) */
   14373        4525 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   14374             :     {
   14375        3974 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   14376             :     }
   14377             :     else
   14378             :     {
   14379         551 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   14380             :       
   14381             :     }
   14382        4525 :     if (arg1 == NULL)
   14383             :     {
   14384           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   14385           0 :       SWIG_fail;
   14386             :     }
   14387             :   }
   14388        4525 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   14389        4525 :   if (!SWIG_IsOK(res2)) {
   14390           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VSIFOpenL" "', argument " "2"" of type '" "char const *""'");
   14391             :   }
   14392        4525 :   arg2 = reinterpret_cast< char * >(buf2);
   14393        4525 :   {
   14394        4525 :     if (!arg1) {
   14395        4525 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   14396             :     }
   14397             :   }
   14398        4525 :   {
   14399        4525 :     const int bLocalUseExceptions = GetUseExceptions();
   14400        4525 :     if ( bLocalUseExceptions ) {
   14401         835 :       pushErrorHandler();
   14402             :     }
   14403        4525 :     {
   14404        4525 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   14405        4525 :       result = (VSILFILE *)wrapper_VSIFOpenL((char const *)arg1,(char const *)arg2);
   14406        4525 :       SWIG_PYTHON_THREAD_END_ALLOW;
   14407             :     }
   14408        4525 :     if ( bLocalUseExceptions ) {
   14409         835 :       popErrorHandler();
   14410             :     }
   14411             : #ifndef SED_HACKS
   14412             :     if ( bLocalUseExceptions ) {
   14413             :       CPLErr eclass = CPLGetLastErrorType();
   14414             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14415             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14416             :       }
   14417             :     }
   14418             : #endif
   14419             :   }
   14420        4525 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VSILFILE, 0 |  0 );
   14421        4525 :   {
   14422             :     /* %typemap(freearg) (const char *utf8_path) */
   14423        4525 :     GDALPythonFreeCStr(arg1, bToFree1);
   14424             :   }
   14425        4525 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   14426        4538 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   14427             :   return resultobj;
   14428           0 : fail:
   14429           0 :   {
   14430             :     /* %typemap(freearg) (const char *utf8_path) */
   14431           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   14432             :   }
   14433           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   14434             :   return NULL;
   14435             : }
   14436             : 
   14437             : 
   14438         193 : SWIGINTERN PyObject *_wrap_VSIFOpenExL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14439         193 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   14440         193 :   char *arg1 = (char *) 0 ;
   14441         193 :   char *arg2 = (char *) 0 ;
   14442         193 :   int arg3 = (int) FALSE ;
   14443         193 :   char **arg4 = (char **) NULL ;
   14444         193 :   int bToFree1 = 0 ;
   14445         193 :   int res2 ;
   14446         193 :   char *buf2 = 0 ;
   14447         193 :   int alloc2 = 0 ;
   14448         193 :   int val3 ;
   14449         193 :   int ecode3 = 0 ;
   14450         193 :   PyObject *swig_obj[4] ;
   14451         193 :   VSILFILE *result = 0 ;
   14452             :   
   14453         193 :   if (!SWIG_Python_UnpackTuple(args, "VSIFOpenExL", 2, 4, swig_obj)) SWIG_fail;
   14454         193 :   {
   14455             :     /* %typemap(in) (const char *utf8_path) */
   14456         193 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   14457             :     {
   14458         193 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   14459             :     }
   14460             :     else
   14461             :     {
   14462           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   14463             :       
   14464             :     }
   14465         193 :     if (arg1 == NULL)
   14466             :     {
   14467           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   14468           0 :       SWIG_fail;
   14469             :     }
   14470             :   }
   14471         193 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   14472         193 :   if (!SWIG_IsOK(res2)) {
   14473           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VSIFOpenExL" "', argument " "2"" of type '" "char const *""'");
   14474             :   }
   14475         193 :   arg2 = reinterpret_cast< char * >(buf2);
   14476         193 :   if (swig_obj[2]) {
   14477         193 :     ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   14478         193 :     if (!SWIG_IsOK(ecode3)) {
   14479           0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VSIFOpenExL" "', argument " "3"" of type '" "int""'");
   14480             :     } 
   14481             :     arg3 = static_cast< int >(val3);
   14482             :   }
   14483         193 :   if (swig_obj[3]) {
   14484          18 :     {
   14485             :       /* %typemap(in) char **dict */
   14486          18 :       arg4 = NULL;
   14487          18 :       if ( PySequence_Check( swig_obj[3] ) ) {
   14488          18 :         int bErr = FALSE;
   14489          18 :         arg4 = CSLFromPySequence(swig_obj[3], &bErr);
   14490          18 :         if ( bErr )
   14491             :         {
   14492           0 :           SWIG_fail;
   14493             :         }
   14494             :       }
   14495           0 :       else if ( PyMapping_Check( swig_obj[3] ) ) {
   14496           0 :         int bErr = FALSE;
   14497           0 :         arg4 = CSLFromPyMapping(swig_obj[3], &bErr);
   14498           0 :         if ( bErr )
   14499             :         {
   14500           0 :           SWIG_fail;
   14501             :         }
   14502             :       }
   14503             :       else {
   14504           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   14505           0 :         SWIG_fail;
   14506             :       }
   14507             :     }
   14508             :   }
   14509         193 :   {
   14510         193 :     if (!arg1) {
   14511         193 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   14512             :     }
   14513             :   }
   14514         193 :   {
   14515         193 :     const int bLocalUseExceptions = GetUseExceptions();
   14516         193 :     if ( bLocalUseExceptions ) {
   14517          41 :       pushErrorHandler();
   14518             :     }
   14519         193 :     {
   14520         193 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   14521         193 :       result = (VSILFILE *)wrapper_VSIFOpenExL((char const *)arg1,(char const *)arg2,arg3,arg4);
   14522         193 :       SWIG_PYTHON_THREAD_END_ALLOW;
   14523             :     }
   14524         193 :     if ( bLocalUseExceptions ) {
   14525          41 :       popErrorHandler();
   14526             :     }
   14527             : #ifndef SED_HACKS
   14528             :     if ( bLocalUseExceptions ) {
   14529             :       CPLErr eclass = CPLGetLastErrorType();
   14530             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14531             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14532             :       }
   14533             :     }
   14534             : #endif
   14535             :   }
   14536         193 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VSILFILE, 0 |  0 );
   14537         193 :   {
   14538             :     /* %typemap(freearg) (const char *utf8_path) */
   14539         193 :     GDALPythonFreeCStr(arg1, bToFree1);
   14540             :   }
   14541         193 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   14542         193 :   {
   14543             :     /* %typemap(freearg) char **dict */
   14544         193 :     CSLDestroy( arg4 );
   14545             :   }
   14546         193 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   14547             :   return resultobj;
   14548           0 : fail:
   14549           0 :   {
   14550             :     /* %typemap(freearg) (const char *utf8_path) */
   14551           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   14552             :   }
   14553           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   14554           0 :   {
   14555             :     /* %typemap(freearg) char **dict */
   14556           0 :     CSLDestroy( arg4 );
   14557             :   }
   14558             :   return NULL;
   14559             : }
   14560             : 
   14561             : 
   14562        1627 : SWIGINTERN PyObject *_wrap_VSIFEofL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14563        1627 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   14564        1627 :   VSILFILE *arg1 = (VSILFILE *) 0 ;
   14565        1627 :   void *argp1 = 0 ;
   14566        1627 :   int res1 = 0 ;
   14567        1627 :   PyObject *swig_obj[1] ;
   14568        1627 :   int result;
   14569             :   
   14570        1627 :   if (!args) SWIG_fail;
   14571        1627 :   swig_obj[0] = args;
   14572        1627 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_VSILFILE, 0 |  0 );
   14573        1627 :   if (!SWIG_IsOK(res1)) {
   14574           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VSIFEofL" "', argument " "1"" of type '" "VSILFILE *""'"); 
   14575             :   }
   14576        1627 :   arg1 = reinterpret_cast< VSILFILE * >(argp1);
   14577        1627 :   {
   14578        1627 :     if (!arg1) {
   14579           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   14580             :     }
   14581             :   }
   14582        1627 :   {
   14583        1627 :     const int bLocalUseExceptions = GetUseExceptions();
   14584        1627 :     if ( bLocalUseExceptions ) {
   14585           1 :       pushErrorHandler();
   14586             :     }
   14587        1627 :     {
   14588        1627 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   14589        1627 :       result = (int)VSIFEofL(arg1);
   14590        1627 :       SWIG_PYTHON_THREAD_END_ALLOW;
   14591             :     }
   14592        1627 :     if ( bLocalUseExceptions ) {
   14593           1 :       popErrorHandler();
   14594             :     }
   14595             : #ifndef SED_HACKS
   14596             :     if ( bLocalUseExceptions ) {
   14597             :       CPLErr eclass = CPLGetLastErrorType();
   14598             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14599             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14600             :       }
   14601             :     }
   14602             : #endif
   14603             :   }
   14604        1627 :   resultobj = SWIG_From_int(static_cast< int >(result));
   14605        1627 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   14606             :   return resultobj;
   14607             : fail:
   14608             :   return NULL;
   14609             : }
   14610             : 
   14611             : 
   14612           3 : SWIGINTERN PyObject *_wrap_VSIFFlushL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14613           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   14614           3 :   VSILFILE *arg1 = (VSILFILE *) 0 ;
   14615           3 :   void *argp1 = 0 ;
   14616           3 :   int res1 = 0 ;
   14617           3 :   PyObject *swig_obj[1] ;
   14618           3 :   int result;
   14619             :   
   14620           3 :   if (!args) SWIG_fail;
   14621           3 :   swig_obj[0] = args;
   14622           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_VSILFILE, 0 |  0 );
   14623           3 :   if (!SWIG_IsOK(res1)) {
   14624           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VSIFFlushL" "', argument " "1"" of type '" "VSILFILE *""'"); 
   14625             :   }
   14626           3 :   arg1 = reinterpret_cast< VSILFILE * >(argp1);
   14627           3 :   {
   14628           3 :     if (!arg1) {
   14629           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   14630             :     }
   14631             :   }
   14632           3 :   {
   14633           3 :     const int bLocalUseExceptions = GetUseExceptions();
   14634           3 :     if ( bLocalUseExceptions ) {
   14635           0 :       pushErrorHandler();
   14636             :     }
   14637           3 :     {
   14638           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   14639           3 :       result = (int)VSIFFlushL(arg1);
   14640           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   14641             :     }
   14642           3 :     if ( bLocalUseExceptions ) {
   14643           0 :       popErrorHandler();
   14644             :     }
   14645             : #ifndef SED_HACKS
   14646             :     if ( bLocalUseExceptions ) {
   14647             :       CPLErr eclass = CPLGetLastErrorType();
   14648             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14649             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14650             :       }
   14651             :     }
   14652             : #endif
   14653             :   }
   14654           3 :   resultobj = SWIG_From_int(static_cast< int >(result));
   14655           3 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   14656             :   return resultobj;
   14657             : fail:
   14658             :   return NULL;
   14659             : }
   14660             : 
   14661             : 
   14662        4427 : SWIGINTERN PyObject *_wrap_VSIFCloseL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14663        4427 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   14664        4427 :   VSILFILE *arg1 = (VSILFILE *) 0 ;
   14665        4427 :   void *argp1 = 0 ;
   14666        4427 :   int res1 = 0 ;
   14667        4427 :   PyObject *swig_obj[1] ;
   14668        4427 :   VSI_RETVAL result;
   14669             :   
   14670        4427 :   if (!args) SWIG_fail;
   14671        4427 :   swig_obj[0] = args;
   14672        4427 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_VSILFILE, 0 |  0 );
   14673        4427 :   if (!SWIG_IsOK(res1)) {
   14674           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VSIFCloseL" "', argument " "1"" of type '" "VSILFILE *""'"); 
   14675             :   }
   14676        4427 :   arg1 = reinterpret_cast< VSILFILE * >(argp1);
   14677        4427 :   {
   14678        4427 :     if (!arg1) {
   14679           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   14680             :     }
   14681             :   }
   14682        4427 :   {
   14683        4427 :     const int bLocalUseExceptions = GetUseExceptions();
   14684        4427 :     if ( bLocalUseExceptions ) {
   14685         826 :       pushErrorHandler();
   14686             :     }
   14687        4427 :     {
   14688        4427 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   14689        4427 :       result = VSIFCloseL(arg1);
   14690        4427 :       SWIG_PYTHON_THREAD_END_ALLOW;
   14691             :     }
   14692        4427 :     if ( bLocalUseExceptions ) {
   14693         826 :       popErrorHandler();
   14694             :     }
   14695             : #ifndef SED_HACKS
   14696             :     if ( bLocalUseExceptions ) {
   14697             :       CPLErr eclass = CPLGetLastErrorType();
   14698             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14699             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14700             :       }
   14701             :     }
   14702             : #endif
   14703             :   }
   14704        4427 :   {
   14705             :     /* %typemap(out) VSI_RETVAL */
   14706        4512 :     if ( result != 0 && GetUseExceptions()) {
   14707           0 :       const char* pszMessage = CPLGetLastErrorMsg();
   14708           0 :       if( pszMessage[0] != '\0' )
   14709           0 :       PyErr_SetString( PyExc_RuntimeError, pszMessage );
   14710             :       else
   14711           0 :       PyErr_SetString( PyExc_RuntimeError, "unknown error occurred" );
   14712           0 :       SWIG_fail;
   14713             :     }
   14714             :   }
   14715        4427 :   {
   14716             :     /* %typemap(ret) VSI_RETVAL */
   14717        4427 :     resultobj = PyInt_FromLong( result );
   14718             :   }
   14719        4427 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   14720             :   return resultobj;
   14721             : fail:
   14722             :   return NULL;
   14723             : }
   14724             : 
   14725             : 
   14726       63971 : SWIGINTERN PyObject *_wrap_VSIFSeekL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14727       63971 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   14728       63971 :   VSILFILE *arg1 = (VSILFILE *) 0 ;
   14729       63971 :   GIntBig arg2 ;
   14730       63971 :   int arg3 ;
   14731       63971 :   void *argp1 = 0 ;
   14732       63971 :   int res1 = 0 ;
   14733       63971 :   int val3 ;
   14734       63971 :   int ecode3 = 0 ;
   14735       63971 :   PyObject *swig_obj[3] ;
   14736       63971 :   int result;
   14737             :   
   14738       63971 :   if (!SWIG_Python_UnpackTuple(args, "VSIFSeekL", 3, 3, swig_obj)) SWIG_fail;
   14739       63971 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_VSILFILE, 0 |  0 );
   14740       63971 :   if (!SWIG_IsOK(res1)) {
   14741           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VSIFSeekL" "', argument " "1"" of type '" "VSILFILE *""'"); 
   14742             :   }
   14743       63971 :   arg1 = reinterpret_cast< VSILFILE * >(argp1);
   14744       63971 :   {
   14745       63971 :     arg2 = (GIntBig)PyLong_AsLongLong(swig_obj[1]);
   14746             :   }
   14747       63971 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   14748       63971 :   if (!SWIG_IsOK(ecode3)) {
   14749           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VSIFSeekL" "', argument " "3"" of type '" "int""'");
   14750             :   } 
   14751       63971 :   arg3 = static_cast< int >(val3);
   14752       63971 :   {
   14753       63971 :     if (!arg1) {
   14754           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   14755             :     }
   14756             :   }
   14757       63971 :   {
   14758       63971 :     const int bLocalUseExceptions = GetUseExceptions();
   14759       63971 :     if ( bLocalUseExceptions ) {
   14760         777 :       pushErrorHandler();
   14761             :     }
   14762       63971 :     {
   14763       63971 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   14764       63971 :       result = (int)VSIFSeekL(arg1,arg2,arg3);
   14765       63971 :       SWIG_PYTHON_THREAD_END_ALLOW;
   14766             :     }
   14767       63971 :     if ( bLocalUseExceptions ) {
   14768         777 :       popErrorHandler();
   14769             :     }
   14770             : #ifndef SED_HACKS
   14771             :     if ( bLocalUseExceptions ) {
   14772             :       CPLErr eclass = CPLGetLastErrorType();
   14773             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14774             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14775             :       }
   14776             :     }
   14777             : #endif
   14778             :   }
   14779       63971 :   resultobj = SWIG_From_int(static_cast< int >(result));
   14780       63971 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   14781             :   return resultobj;
   14782             : fail:
   14783             :   return NULL;
   14784             : }
   14785             : 
   14786             : 
   14787         571 : SWIGINTERN PyObject *_wrap_VSIFTellL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14788         571 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   14789         571 :   VSILFILE *arg1 = (VSILFILE *) 0 ;
   14790         571 :   void *argp1 = 0 ;
   14791         571 :   int res1 = 0 ;
   14792         571 :   PyObject *swig_obj[1] ;
   14793         571 :   GIntBig result;
   14794             :   
   14795         571 :   if (!args) SWIG_fail;
   14796         571 :   swig_obj[0] = args;
   14797         571 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_VSILFILE, 0 |  0 );
   14798         571 :   if (!SWIG_IsOK(res1)) {
   14799           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VSIFTellL" "', argument " "1"" of type '" "VSILFILE *""'"); 
   14800             :   }
   14801         571 :   arg1 = reinterpret_cast< VSILFILE * >(argp1);
   14802         571 :   {
   14803         571 :     if (!arg1) {
   14804           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   14805             :     }
   14806             :   }
   14807         571 :   {
   14808         571 :     const int bLocalUseExceptions = GetUseExceptions();
   14809         571 :     if ( bLocalUseExceptions ) {
   14810         384 :       pushErrorHandler();
   14811             :     }
   14812         571 :     {
   14813         571 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   14814         571 :       result = VSIFTellL(arg1);
   14815         571 :       SWIG_PYTHON_THREAD_END_ALLOW;
   14816             :     }
   14817         571 :     if ( bLocalUseExceptions ) {
   14818         384 :       popErrorHandler();
   14819             :     }
   14820             : #ifndef SED_HACKS
   14821             :     if ( bLocalUseExceptions ) {
   14822             :       CPLErr eclass = CPLGetLastErrorType();
   14823             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14824             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14825             :       }
   14826             :     }
   14827             : #endif
   14828             :   }
   14829         571 :   {
   14830         571 :     resultobj = PyLong_FromLongLong(result);
   14831             :   }
   14832         571 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   14833             :   return resultobj;
   14834             : fail:
   14835             :   return NULL;
   14836             : }
   14837             : 
   14838             : 
   14839          26 : SWIGINTERN PyObject *_wrap_VSIFTruncateL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14840          26 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   14841          26 :   VSILFILE *arg1 = (VSILFILE *) 0 ;
   14842          26 :   GIntBig arg2 ;
   14843          26 :   void *argp1 = 0 ;
   14844          26 :   int res1 = 0 ;
   14845          26 :   PyObject *swig_obj[2] ;
   14846          26 :   int result;
   14847             :   
   14848          26 :   if (!SWIG_Python_UnpackTuple(args, "VSIFTruncateL", 2, 2, swig_obj)) SWIG_fail;
   14849          26 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_VSILFILE, 0 |  0 );
   14850          26 :   if (!SWIG_IsOK(res1)) {
   14851           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VSIFTruncateL" "', argument " "1"" of type '" "VSILFILE *""'"); 
   14852             :   }
   14853          26 :   arg1 = reinterpret_cast< VSILFILE * >(argp1);
   14854          26 :   {
   14855          26 :     arg2 = (GIntBig)PyLong_AsLongLong(swig_obj[1]);
   14856             :   }
   14857          26 :   {
   14858          26 :     if (!arg1) {
   14859           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   14860             :     }
   14861             :   }
   14862          26 :   {
   14863          26 :     const int bLocalUseExceptions = GetUseExceptions();
   14864          26 :     if ( bLocalUseExceptions ) {
   14865           5 :       pushErrorHandler();
   14866             :     }
   14867          26 :     {
   14868          26 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   14869          26 :       result = (int)VSIFTruncateL(arg1,arg2);
   14870          26 :       SWIG_PYTHON_THREAD_END_ALLOW;
   14871             :     }
   14872          26 :     if ( bLocalUseExceptions ) {
   14873           5 :       popErrorHandler();
   14874             :     }
   14875             : #ifndef SED_HACKS
   14876             :     if ( bLocalUseExceptions ) {
   14877             :       CPLErr eclass = CPLGetLastErrorType();
   14878             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14879             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14880             :       }
   14881             :     }
   14882             : #endif
   14883             :   }
   14884          26 :   resultobj = SWIG_From_int(static_cast< int >(result));
   14885          26 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   14886             :   return resultobj;
   14887             : fail:
   14888             :   return NULL;
   14889             : }
   14890             : 
   14891             : 
   14892           2 : SWIGINTERN PyObject *_wrap_VSISupportsSparseFiles(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14893           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   14894           2 :   char *arg1 = (char *) 0 ;
   14895           2 :   int bToFree1 = 0 ;
   14896           2 :   PyObject *swig_obj[1] ;
   14897           2 :   int result;
   14898             :   
   14899           2 :   if (!args) SWIG_fail;
   14900           2 :   swig_obj[0] = args;
   14901           2 :   {
   14902             :     /* %typemap(in) (const char *utf8_path) */
   14903           2 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   14904             :     {
   14905           2 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   14906             :     }
   14907             :     else
   14908             :     {
   14909           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   14910             :       
   14911             :     }
   14912           2 :     if (arg1 == NULL)
   14913             :     {
   14914           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   14915           0 :       SWIG_fail;
   14916             :     }
   14917             :   }
   14918           2 :   {
   14919           2 :     if (!arg1) {
   14920           2 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   14921             :     }
   14922             :   }
   14923           2 :   {
   14924           2 :     const int bLocalUseExceptions = GetUseExceptions();
   14925           2 :     if ( bLocalUseExceptions ) {
   14926           0 :       pushErrorHandler();
   14927             :     }
   14928           2 :     {
   14929           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   14930           2 :       result = (int)VSISupportsSparseFiles((char const *)arg1);
   14931           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   14932             :     }
   14933           2 :     if ( bLocalUseExceptions ) {
   14934           0 :       popErrorHandler();
   14935             :     }
   14936             : #ifndef SED_HACKS
   14937             :     if ( bLocalUseExceptions ) {
   14938             :       CPLErr eclass = CPLGetLastErrorType();
   14939             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14940             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14941             :       }
   14942             :     }
   14943             : #endif
   14944             :   }
   14945           2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   14946           2 :   {
   14947             :     /* %typemap(freearg) (const char *utf8_path) */
   14948           2 :     GDALPythonFreeCStr(arg1, bToFree1);
   14949             :   }
   14950           2 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   14951             :   return resultobj;
   14952           0 : fail:
   14953           0 :   {
   14954             :     /* %typemap(freearg) (const char *utf8_path) */
   14955           2 :     GDALPythonFreeCStr(arg1, bToFree1);
   14956             :   }
   14957             :   return NULL;
   14958             : }
   14959             : 
   14960             : 
   14961           3 : SWIGINTERN PyObject *_wrap_VSIFGetRangeStatusL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14962           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   14963           3 :   VSILFILE *arg1 = (VSILFILE *) 0 ;
   14964           3 :   GIntBig arg2 ;
   14965           3 :   GIntBig arg3 ;
   14966           3 :   void *argp1 = 0 ;
   14967           3 :   int res1 = 0 ;
   14968           3 :   PyObject *swig_obj[3] ;
   14969           3 :   int result;
   14970             :   
   14971           3 :   if (!SWIG_Python_UnpackTuple(args, "VSIFGetRangeStatusL", 3, 3, swig_obj)) SWIG_fail;
   14972           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_VSILFILE, 0 |  0 );
   14973           3 :   if (!SWIG_IsOK(res1)) {
   14974           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VSIFGetRangeStatusL" "', argument " "1"" of type '" "VSILFILE *""'"); 
   14975             :   }
   14976           3 :   arg1 = reinterpret_cast< VSILFILE * >(argp1);
   14977           3 :   {
   14978           3 :     arg2 = (GIntBig)PyLong_AsLongLong(swig_obj[1]);
   14979             :   }
   14980           3 :   {
   14981           3 :     arg3 = (GIntBig)PyLong_AsLongLong(swig_obj[2]);
   14982             :   }
   14983           3 :   {
   14984           3 :     if (!arg1) {
   14985           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   14986             :     }
   14987             :   }
   14988           3 :   {
   14989           3 :     const int bLocalUseExceptions = GetUseExceptions();
   14990           3 :     if ( bLocalUseExceptions ) {
   14991           0 :       pushErrorHandler();
   14992             :     }
   14993           3 :     {
   14994           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   14995           3 :       result = (int)VSIFGetRangeStatusL(arg1,arg2,arg3);
   14996           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   14997             :     }
   14998           3 :     if ( bLocalUseExceptions ) {
   14999           0 :       popErrorHandler();
   15000             :     }
   15001             : #ifndef SED_HACKS
   15002             :     if ( bLocalUseExceptions ) {
   15003             :       CPLErr eclass = CPLGetLastErrorType();
   15004             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15005             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15006             :       }
   15007             :     }
   15008             : #endif
   15009             :   }
   15010           3 :   resultobj = SWIG_From_int(static_cast< int >(result));
   15011           3 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   15012             :   return resultobj;
   15013             : fail:
   15014             :   return NULL;
   15015             : }
   15016             : 
   15017             : 
   15018      341114 : SWIGINTERN PyObject *_wrap_VSIFWriteL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15019      341114 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   15020      341114 :   int arg1 ;
   15021      341114 :   char *arg2 = (char *) 0 ;
   15022      341114 :   int arg3 ;
   15023      341114 :   int arg4 ;
   15024      341114 :   VSILFILE *arg5 = (VSILFILE *) 0 ;
   15025      341114 :   int alloc1 = 0 ;
   15026      341114 :   bool viewIsValid1 = false ;
   15027      341114 :   Py_buffer view1 ;
   15028      341114 :   int val3 ;
   15029      341114 :   int ecode3 = 0 ;
   15030      341114 :   int val4 ;
   15031      341114 :   int ecode4 = 0 ;
   15032      341114 :   void *argp5 = 0 ;
   15033      341114 :   int res5 = 0 ;
   15034      341114 :   PyObject *swig_obj[4] ;
   15035      341114 :   int result;
   15036             :   
   15037      341114 :   if (!SWIG_Python_UnpackTuple(args, "VSIFWriteL", 4, 4, swig_obj)) SWIG_fail;
   15038      341114 :   {
   15039             :     /* %typemap(in,numinputs=1) (int nLen, char *pBuf ) */
   15040      341114 :     char* ptr = NULL;
   15041      341114 :     if( !GetBufferAsCharPtrIntSize(swig_obj[0], &arg1, &ptr, &alloc1, &viewIsValid1, &view1) ) {
   15042           0 :       SWIG_fail;
   15043             :     }
   15044      341114 :     arg2 = (char *)ptr;
   15045             :   }
   15046      341114 :   ecode3 = SWIG_AsVal_int(swig_obj[1], &val3);
   15047      341114 :   if (!SWIG_IsOK(ecode3)) {
   15048           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VSIFWriteL" "', argument " "3"" of type '" "int""'");
   15049             :   } 
   15050      341114 :   arg3 = static_cast< int >(val3);
   15051      341114 :   ecode4 = SWIG_AsVal_int(swig_obj[2], &val4);
   15052      341114 :   if (!SWIG_IsOK(ecode4)) {
   15053           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VSIFWriteL" "', argument " "4"" of type '" "int""'");
   15054             :   } 
   15055      341114 :   arg4 = static_cast< int >(val4);
   15056      341114 :   res5 = SWIG_ConvertPtr(swig_obj[3], &argp5,SWIGTYPE_p_VSILFILE, 0 |  0 );
   15057      341114 :   if (!SWIG_IsOK(res5)) {
   15058           0 :     SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "VSIFWriteL" "', argument " "5"" of type '" "VSILFILE *""'"); 
   15059             :   }
   15060      341114 :   arg5 = reinterpret_cast< VSILFILE * >(argp5);
   15061      341114 :   {
   15062      341114 :     if (!arg5) {
   15063           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   15064             :     }
   15065             :   }
   15066      341114 :   {
   15067      341114 :     const int bLocalUseExceptions = GetUseExceptions();
   15068      341114 :     if ( bLocalUseExceptions ) {
   15069      100166 :       pushErrorHandler();
   15070             :     }
   15071      341114 :     {
   15072      341114 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   15073      341114 :       result = (int)wrapper_VSIFWriteL(arg1,arg2,arg3,arg4,arg5);
   15074      341114 :       SWIG_PYTHON_THREAD_END_ALLOW;
   15075             :     }
   15076      341114 :     if ( bLocalUseExceptions ) {
   15077      100166 :       popErrorHandler();
   15078             :     }
   15079             : #ifndef SED_HACKS
   15080             :     if ( bLocalUseExceptions ) {
   15081             :       CPLErr eclass = CPLGetLastErrorType();
   15082             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15083             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15084             :       }
   15085             :     }
   15086             : #endif
   15087             :   }
   15088      341114 :   resultobj = SWIG_From_int(static_cast< int >(result));
   15089      341114 :   {
   15090             :     /* %typemap(freearg) (int *nLen, char *pBuf ) */
   15091      341114 :     if( viewIsValid1 ) {
   15092         852 :       PyBuffer_Release(&view1);
   15093             :     }
   15094      340262 :     else if (ReturnSame(alloc1) == SWIG_NEWOBJ ) {
   15095      340262 :       delete[] arg2;
   15096             :     }
   15097             :   }
   15098      341114 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   15099             :   return resultobj;
   15100           0 : fail:
   15101           0 :   {
   15102             :     /* %typemap(freearg) (int *nLen, char *pBuf ) */
   15103           0 :     if( viewIsValid1 ) {
   15104           0 :       PyBuffer_Release(&view1);
   15105             :     }
   15106      341114 :     else if (ReturnSame(alloc1) == SWIG_NEWOBJ ) {
   15107           0 :       delete[] arg2;
   15108             :     }
   15109             :   }
   15110             :   return NULL;
   15111             : }
   15112             : 
   15113             : 
   15114         250 : SWIGINTERN PyObject *_wrap_VSICurlClearCache(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15115         250 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   15116             :   
   15117         250 :   if (!SWIG_Python_UnpackTuple(args, "VSICurlClearCache", 0, 0, 0)) SWIG_fail;
   15118         250 :   {
   15119         250 :     const int bLocalUseExceptions = GetUseExceptions();
   15120         250 :     if ( bLocalUseExceptions ) {
   15121          72 :       pushErrorHandler();
   15122             :     }
   15123         250 :     {
   15124         250 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   15125         250 :       VSICurlClearCache();
   15126         250 :       SWIG_PYTHON_THREAD_END_ALLOW;
   15127             :     }
   15128         250 :     if ( bLocalUseExceptions ) {
   15129          72 :       popErrorHandler();
   15130             :     }
   15131             : #ifndef SED_HACKS
   15132             :     if ( bLocalUseExceptions ) {
   15133             :       CPLErr eclass = CPLGetLastErrorType();
   15134             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15135             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15136             :       }
   15137             :     }
   15138             : #endif
   15139             :   }
   15140         250 :   resultobj = SWIG_Py_Void();
   15141         250 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   15142             :   return resultobj;
   15143           0 : fail:
   15144           0 :   return NULL;
   15145             : }
   15146             : 
   15147             : 
   15148           2 : SWIGINTERN PyObject *_wrap_VSICurlPartialClearCache(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15149           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   15150           2 :   char *arg1 = (char *) 0 ;
   15151           2 :   int bToFree1 = 0 ;
   15152           2 :   PyObject *swig_obj[1] ;
   15153             :   
   15154           2 :   if (!args) SWIG_fail;
   15155           2 :   swig_obj[0] = args;
   15156           2 :   {
   15157             :     /* %typemap(in) (const char *utf8_path) */
   15158           2 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   15159             :     {
   15160           2 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   15161             :     }
   15162             :     else
   15163             :     {
   15164           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   15165             :       
   15166             :     }
   15167           2 :     if (arg1 == NULL)
   15168             :     {
   15169           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   15170           0 :       SWIG_fail;
   15171             :     }
   15172             :   }
   15173           2 :   {
   15174           2 :     if (!arg1) {
   15175           2 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   15176             :     }
   15177             :   }
   15178           2 :   {
   15179           2 :     const int bLocalUseExceptions = GetUseExceptions();
   15180           2 :     if ( bLocalUseExceptions ) {
   15181           0 :       pushErrorHandler();
   15182             :     }
   15183           2 :     {
   15184           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   15185           2 :       VSICurlPartialClearCache((char const *)arg1);
   15186           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   15187             :     }
   15188           2 :     if ( bLocalUseExceptions ) {
   15189           0 :       popErrorHandler();
   15190             :     }
   15191             : #ifndef SED_HACKS
   15192             :     if ( bLocalUseExceptions ) {
   15193             :       CPLErr eclass = CPLGetLastErrorType();
   15194             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15195             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15196             :       }
   15197             :     }
   15198             : #endif
   15199             :   }
   15200           2 :   resultobj = SWIG_Py_Void();
   15201           2 :   {
   15202             :     /* %typemap(freearg) (const char *utf8_path) */
   15203           2 :     GDALPythonFreeCStr(arg1, bToFree1);
   15204             :   }
   15205           2 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   15206             :   return resultobj;
   15207           0 : fail:
   15208           0 :   {
   15209             :     /* %typemap(freearg) (const char *utf8_path) */
   15210           2 :     GDALPythonFreeCStr(arg1, bToFree1);
   15211             :   }
   15212             :   return NULL;
   15213             : }
   15214             : 
   15215             : 
   15216           2 : SWIGINTERN PyObject *_wrap_NetworkStatsReset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15217           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   15218             :   
   15219           2 :   if (!SWIG_Python_UnpackTuple(args, "NetworkStatsReset", 0, 0, 0)) SWIG_fail;
   15220           2 :   {
   15221           2 :     const int bLocalUseExceptions = GetUseExceptions();
   15222           2 :     if ( bLocalUseExceptions ) {
   15223           0 :       pushErrorHandler();
   15224             :     }
   15225           2 :     {
   15226           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   15227           2 :       VSINetworkStatsReset();
   15228           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   15229             :     }
   15230           2 :     if ( bLocalUseExceptions ) {
   15231           0 :       popErrorHandler();
   15232             :     }
   15233             : #ifndef SED_HACKS
   15234             :     if ( bLocalUseExceptions ) {
   15235             :       CPLErr eclass = CPLGetLastErrorType();
   15236             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15237             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15238             :       }
   15239             :     }
   15240             : #endif
   15241             :   }
   15242           2 :   resultobj = SWIG_Py_Void();
   15243           2 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   15244             :   return resultobj;
   15245           0 : fail:
   15246           0 :   return NULL;
   15247             : }
   15248             : 
   15249             : 
   15250           1 : SWIGINTERN PyObject *_wrap_NetworkStatsGetAsSerializedJSON(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15251           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   15252           1 :   char **arg1 = (char **) NULL ;
   15253           1 :   PyObject *swig_obj[1] ;
   15254           1 :   retStringAndCPLFree *result = 0 ;
   15255             :   
   15256           1 :   if (!SWIG_Python_UnpackTuple(args, "NetworkStatsGetAsSerializedJSON", 0, 1, swig_obj)) SWIG_fail;
   15257           1 :   if (swig_obj[0]) {
   15258           0 :     {
   15259             :       /* %typemap(in) char **dict */
   15260           0 :       arg1 = NULL;
   15261           0 :       if ( PySequence_Check( swig_obj[0] ) ) {
   15262           0 :         int bErr = FALSE;
   15263           0 :         arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   15264           0 :         if ( bErr )
   15265             :         {
   15266           0 :           SWIG_fail;
   15267             :         }
   15268             :       }
   15269           0 :       else if ( PyMapping_Check( swig_obj[0] ) ) {
   15270           0 :         int bErr = FALSE;
   15271           0 :         arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   15272           0 :         if ( bErr )
   15273             :         {
   15274           0 :           SWIG_fail;
   15275             :         }
   15276             :       }
   15277             :       else {
   15278           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   15279           0 :         SWIG_fail;
   15280             :       }
   15281             :     }
   15282             :   }
   15283           1 :   {
   15284           1 :     const int bLocalUseExceptions = GetUseExceptions();
   15285           1 :     if ( bLocalUseExceptions ) {
   15286           0 :       pushErrorHandler();
   15287             :     }
   15288           1 :     {
   15289           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   15290           1 :       result = (retStringAndCPLFree *)VSINetworkStatsGetAsSerializedJSON(arg1);
   15291           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   15292             :     }
   15293           1 :     if ( bLocalUseExceptions ) {
   15294           0 :       popErrorHandler();
   15295             :     }
   15296             : #ifndef SED_HACKS
   15297             :     if ( bLocalUseExceptions ) {
   15298             :       CPLErr eclass = CPLGetLastErrorType();
   15299             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15300             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15301             :       }
   15302             :     }
   15303             : #endif
   15304             :   }
   15305           1 :   {
   15306             :     /* %typemap(out) (retStringAndCPLFree*) */
   15307           1 :     Py_XDECREF(resultobj);
   15308           1 :     if(result)
   15309             :     {
   15310           1 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   15311           1 :       CPLFree(result);
   15312             :     }
   15313             :     else
   15314             :     {
   15315           0 :       resultobj = Py_None;
   15316           0 :       Py_INCREF(resultobj);
   15317             :     }
   15318             :   }
   15319           1 :   {
   15320             :     /* %typemap(freearg) char **dict */
   15321           1 :     CSLDestroy( arg1 );
   15322             :   }
   15323           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   15324             :   return resultobj;
   15325           0 : fail:
   15326           0 :   {
   15327             :     /* %typemap(freearg) char **dict */
   15328           0 :     CSLDestroy( arg1 );
   15329             :   }
   15330             :   return NULL;
   15331             : }
   15332             : 
   15333             : 
   15334         799 : SWIGINTERN PyObject *_wrap_ParseCommandLine(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15335         799 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   15336         799 :   char *arg1 = (char *) 0 ;
   15337         799 :   int bToFree1 = 0 ;
   15338         799 :   PyObject *swig_obj[1] ;
   15339         799 :   char **result = 0 ;
   15340             :   
   15341         799 :   if (!args) SWIG_fail;
   15342         799 :   swig_obj[0] = args;
   15343         799 :   {
   15344             :     /* %typemap(in) (const char *utf8_path) */
   15345         799 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   15346             :     {
   15347         799 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   15348             :     }
   15349             :     else
   15350             :     {
   15351           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   15352             :       
   15353             :     }
   15354         799 :     if (arg1 == NULL)
   15355             :     {
   15356           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   15357           0 :       SWIG_fail;
   15358             :     }
   15359             :   }
   15360         799 :   {
   15361         799 :     if (!arg1) {
   15362         799 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   15363             :     }
   15364             :   }
   15365         799 :   {
   15366         799 :     const int bLocalUseExceptions = GetUseExceptions();
   15367         799 :     if ( bLocalUseExceptions ) {
   15368         682 :       pushErrorHandler();
   15369             :     }
   15370         799 :     {
   15371         799 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   15372         799 :       result = (char **)CSLParseCommandLine((char const *)arg1);
   15373         799 :       SWIG_PYTHON_THREAD_END_ALLOW;
   15374             :     }
   15375         799 :     if ( bLocalUseExceptions ) {
   15376         682 :       popErrorHandler();
   15377             :     }
   15378             : #ifndef SED_HACKS
   15379             :     if ( bLocalUseExceptions ) {
   15380             :       CPLErr eclass = CPLGetLastErrorType();
   15381             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15382             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15383             :       }
   15384             :     }
   15385             : #endif
   15386             :   }
   15387         799 :   {
   15388             :     /* %typemap(out) char **CSL -> ( string ) */
   15389         799 :     bool bErr = false;
   15390         799 :     resultobj = CSLToList(result, &bErr);
   15391         799 :     CSLDestroy(result);
   15392         799 :     if( bErr ) {
   15393           0 :       SWIG_fail;
   15394             :     }
   15395             :   }
   15396         799 :   {
   15397             :     /* %typemap(freearg) (const char *utf8_path) */
   15398         799 :     GDALPythonFreeCStr(arg1, bToFree1);
   15399             :   }
   15400         799 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   15401             :   return resultobj;
   15402           0 : fail:
   15403           0 :   {
   15404             :     /* %typemap(freearg) (const char *utf8_path) */
   15405         799 :     GDALPythonFreeCStr(arg1, bToFree1);
   15406             :   }
   15407             :   return NULL;
   15408             : }
   15409             : 
   15410             : 
   15411           3 : SWIGINTERN PyObject *_wrap_GetNumCPUs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15412           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   15413           3 :   int result;
   15414             :   
   15415           3 :   if (!SWIG_Python_UnpackTuple(args, "GetNumCPUs", 0, 0, 0)) SWIG_fail;
   15416           3 :   {
   15417           3 :     const int bLocalUseExceptions = GetUseExceptions();
   15418           3 :     if ( bLocalUseExceptions ) {
   15419           3 :       pushErrorHandler();
   15420             :     }
   15421           3 :     {
   15422           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   15423           3 :       result = (int)CPLGetNumCPUs();
   15424           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   15425             :     }
   15426           3 :     if ( bLocalUseExceptions ) {
   15427           3 :       popErrorHandler();
   15428             :     }
   15429             : #ifndef SED_HACKS
   15430             :     if ( bLocalUseExceptions ) {
   15431             :       CPLErr eclass = CPLGetLastErrorType();
   15432             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15433             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15434             :       }
   15435             :     }
   15436             : #endif
   15437             :   }
   15438           3 :   resultobj = SWIG_From_int(static_cast< int >(result));
   15439           3 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   15440             :   return resultobj;
   15441           0 : fail:
   15442           0 :   return NULL;
   15443             : }
   15444             : 
   15445             : 
   15446           2 : SWIGINTERN PyObject *_wrap_GetUsablePhysicalRAM(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15447           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   15448           2 :   GIntBig result;
   15449             :   
   15450           2 :   if (!SWIG_Python_UnpackTuple(args, "GetUsablePhysicalRAM", 0, 0, 0)) SWIG_fail;
   15451           2 :   {
   15452           2 :     const int bLocalUseExceptions = GetUseExceptions();
   15453           2 :     if ( bLocalUseExceptions ) {
   15454           1 :       pushErrorHandler();
   15455             :     }
   15456           2 :     {
   15457           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   15458           2 :       result = CPLGetUsablePhysicalRAM();
   15459           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   15460             :     }
   15461           2 :     if ( bLocalUseExceptions ) {
   15462           1 :       popErrorHandler();
   15463             :     }
   15464             : #ifndef SED_HACKS
   15465             :     if ( bLocalUseExceptions ) {
   15466             :       CPLErr eclass = CPLGetLastErrorType();
   15467             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15468             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15469             :       }
   15470             :     }
   15471             : #endif
   15472             :   }
   15473           2 :   {
   15474           2 :     resultobj = PyLong_FromLongLong(result);
   15475             :   }
   15476           2 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   15477             :   return resultobj;
   15478           0 : fail:
   15479           0 :   return NULL;
   15480             : }
   15481             : 
   15482             : 
   15483        2063 : SWIGINTERN PyObject *_wrap_MajorObject_GetDescription(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15484        2063 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   15485        2063 :   GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
   15486        2063 :   void *argp1 = 0 ;
   15487        2063 :   int res1 = 0 ;
   15488        2063 :   PyObject *swig_obj[1] ;
   15489        2063 :   char *result = 0 ;
   15490             :   
   15491        2063 :   if (!args) SWIG_fail;
   15492        2063 :   swig_obj[0] = args;
   15493        2063 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
   15494        2063 :   if (!SWIG_IsOK(res1)) {
   15495           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_GetDescription" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
   15496             :   }
   15497        2063 :   arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
   15498        2063 :   {
   15499        2063 :     const int bLocalUseExceptions = GetUseExceptions();
   15500        2063 :     if ( bLocalUseExceptions ) {
   15501         871 :       pushErrorHandler();
   15502             :     }
   15503        2063 :     {
   15504        2063 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   15505        2063 :       result = (char *)GDALMajorObjectShadow_GetDescription(arg1);
   15506        2063 :       SWIG_PYTHON_THREAD_END_ALLOW;
   15507             :     }
   15508        2063 :     if ( bLocalUseExceptions ) {
   15509         871 :       popErrorHandler();
   15510             :     }
   15511             : #ifndef SED_HACKS
   15512             :     if ( bLocalUseExceptions ) {
   15513             :       CPLErr eclass = CPLGetLastErrorType();
   15514             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15515             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15516             :       }
   15517             :     }
   15518             : #endif
   15519             :   }
   15520        2063 :   resultobj = SWIG_FromCharPtr((const char *)result);
   15521        2063 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   15522             :   return resultobj;
   15523             : fail:
   15524             :   return NULL;
   15525             : }
   15526             : 
   15527             : 
   15528          41 : SWIGINTERN PyObject *_wrap_MajorObject_SetDescription(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15529          41 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   15530          41 :   GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
   15531          41 :   char *arg2 = (char *) 0 ;
   15532          41 :   void *argp1 = 0 ;
   15533          41 :   int res1 = 0 ;
   15534          41 :   int res2 ;
   15535          41 :   char *buf2 = 0 ;
   15536          41 :   int alloc2 = 0 ;
   15537          41 :   PyObject *swig_obj[2] ;
   15538             :   
   15539          41 :   if (!SWIG_Python_UnpackTuple(args, "MajorObject_SetDescription", 2, 2, swig_obj)) SWIG_fail;
   15540          41 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
   15541          41 :   if (!SWIG_IsOK(res1)) {
   15542           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_SetDescription" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
   15543             :   }
   15544          41 :   arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
   15545          41 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   15546          41 :   if (!SWIG_IsOK(res2)) {
   15547           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MajorObject_SetDescription" "', argument " "2"" of type '" "char const *""'");
   15548             :   }
   15549          41 :   arg2 = reinterpret_cast< char * >(buf2);
   15550          41 :   {
   15551          41 :     if (!arg2) {
   15552           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   15553             :     }
   15554             :   }
   15555          41 :   {
   15556          41 :     const int bLocalUseExceptions = GetUseExceptions();
   15557          41 :     if ( bLocalUseExceptions ) {
   15558          36 :       pushErrorHandler();
   15559             :     }
   15560          41 :     {
   15561          41 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   15562          41 :       GDALMajorObjectShadow_SetDescription(arg1,(char const *)arg2);
   15563          41 :       SWIG_PYTHON_THREAD_END_ALLOW;
   15564             :     }
   15565          41 :     if ( bLocalUseExceptions ) {
   15566          36 :       popErrorHandler();
   15567             :     }
   15568             : #ifndef SED_HACKS
   15569             :     if ( bLocalUseExceptions ) {
   15570             :       CPLErr eclass = CPLGetLastErrorType();
   15571             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15572             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15573             :       }
   15574             :     }
   15575             : #endif
   15576             :   }
   15577          41 :   resultobj = SWIG_Py_Void();
   15578          41 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   15579          41 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   15580             :   return resultobj;
   15581           0 : fail:
   15582           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   15583             :   return NULL;
   15584             : }
   15585             : 
   15586             : 
   15587          68 : SWIGINTERN PyObject *_wrap_MajorObject_GetMetadataDomainList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15588          68 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   15589          68 :   GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
   15590          68 :   void *argp1 = 0 ;
   15591          68 :   int res1 = 0 ;
   15592          68 :   PyObject *swig_obj[1] ;
   15593          68 :   char **result = 0 ;
   15594             :   
   15595          68 :   if (!args) SWIG_fail;
   15596          68 :   swig_obj[0] = args;
   15597          68 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
   15598          68 :   if (!SWIG_IsOK(res1)) {
   15599           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_GetMetadataDomainList" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
   15600             :   }
   15601          68 :   arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
   15602          68 :   {
   15603          68 :     const int bLocalUseExceptions = GetUseExceptions();
   15604          68 :     if ( bLocalUseExceptions ) {
   15605          38 :       pushErrorHandler();
   15606             :     }
   15607          68 :     {
   15608          68 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   15609          68 :       result = (char **)GDALMajorObjectShadow_GetMetadataDomainList(arg1);
   15610          68 :       SWIG_PYTHON_THREAD_END_ALLOW;
   15611             :     }
   15612          68 :     if ( bLocalUseExceptions ) {
   15613          38 :       popErrorHandler();
   15614             :     }
   15615             : #ifndef SED_HACKS
   15616             :     if ( bLocalUseExceptions ) {
   15617             :       CPLErr eclass = CPLGetLastErrorType();
   15618             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15619             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15620             :       }
   15621             :     }
   15622             : #endif
   15623             :   }
   15624          68 :   {
   15625             :     /* %typemap(out) char **CSL -> ( string ) */
   15626          68 :     bool bErr = false;
   15627          68 :     resultobj = CSLToList(result, &bErr);
   15628          68 :     CSLDestroy(result);
   15629          68 :     if( bErr ) {
   15630           0 :       SWIG_fail;
   15631             :     }
   15632             :   }
   15633          68 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   15634             :   return resultobj;
   15635             : fail:
   15636             :   return NULL;
   15637             : }
   15638             : 
   15639             : 
   15640        6804 : SWIGINTERN PyObject *_wrap_MajorObject_GetMetadata_Dict(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15641        6804 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   15642        6804 :   GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
   15643        6804 :   char *arg2 = (char *) "" ;
   15644        6804 :   void *argp1 = 0 ;
   15645        6804 :   int res1 = 0 ;
   15646        6804 :   int res2 ;
   15647        6804 :   char *buf2 = 0 ;
   15648        6804 :   int alloc2 = 0 ;
   15649        6804 :   PyObject *swig_obj[2] ;
   15650        6804 :   char **result = 0 ;
   15651             :   
   15652        6804 :   if (!SWIG_Python_UnpackTuple(args, "MajorObject_GetMetadata_Dict", 1, 2, swig_obj)) SWIG_fail;
   15653        6804 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
   15654        6804 :   if (!SWIG_IsOK(res1)) {
   15655           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_GetMetadata_Dict" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
   15656             :   }
   15657        6804 :   arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
   15658        6804 :   if (swig_obj[1]) {
   15659        6724 :     res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   15660        6724 :     if (!SWIG_IsOK(res2)) {
   15661           0 :       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MajorObject_GetMetadata_Dict" "', argument " "2"" of type '" "char const *""'");
   15662             :     }
   15663        6724 :     arg2 = reinterpret_cast< char * >(buf2);
   15664             :   }
   15665        6804 :   {
   15666        6804 :     const int bLocalUseExceptions = GetUseExceptions();
   15667        6804 :     if ( bLocalUseExceptions ) {
   15668        1225 :       pushErrorHandler();
   15669             :     }
   15670        6804 :     {
   15671        6804 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   15672        6804 :       result = (char **)GDALMajorObjectShadow_GetMetadata_Dict(arg1,(char const *)arg2);
   15673        6804 :       SWIG_PYTHON_THREAD_END_ALLOW;
   15674             :     }
   15675        6804 :     if ( bLocalUseExceptions ) {
   15676        1225 :       popErrorHandler();
   15677             :     }
   15678             : #ifndef SED_HACKS
   15679             :     if ( bLocalUseExceptions ) {
   15680             :       CPLErr eclass = CPLGetLastErrorType();
   15681             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15682             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15683             :       }
   15684             :     }
   15685             : #endif
   15686             :   }
   15687        6804 :   {
   15688             :     /* %typemap(out) char **dict */
   15689        6804 :     resultobj = GetCSLStringAsPyDict(result, false);
   15690             :   }
   15691        6804 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   15692        6804 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   15693             :   return resultobj;
   15694           0 : fail:
   15695           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   15696             :   return NULL;
   15697             : }
   15698             : 
   15699             : 
   15700         395 : SWIGINTERN PyObject *_wrap_MajorObject_GetMetadata_List(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15701         395 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   15702         395 :   GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
   15703         395 :   char *arg2 = (char *) "" ;
   15704         395 :   void *argp1 = 0 ;
   15705         395 :   int res1 = 0 ;
   15706         395 :   int res2 ;
   15707         395 :   char *buf2 = 0 ;
   15708         395 :   int alloc2 = 0 ;
   15709         395 :   PyObject *swig_obj[2] ;
   15710         395 :   char **result = 0 ;
   15711             :   
   15712         395 :   if (!SWIG_Python_UnpackTuple(args, "MajorObject_GetMetadata_List", 1, 2, swig_obj)) SWIG_fail;
   15713         395 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
   15714         395 :   if (!SWIG_IsOK(res1)) {
   15715           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_GetMetadata_List" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
   15716             :   }
   15717         395 :   arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
   15718         395 :   if (swig_obj[1]) {
   15719         352 :     res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   15720         352 :     if (!SWIG_IsOK(res2)) {
   15721           0 :       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MajorObject_GetMetadata_List" "', argument " "2"" of type '" "char const *""'");
   15722             :     }
   15723         352 :     arg2 = reinterpret_cast< char * >(buf2);
   15724             :   }
   15725         395 :   {
   15726         395 :     const int bLocalUseExceptions = GetUseExceptions();
   15727         395 :     if ( bLocalUseExceptions ) {
   15728          97 :       pushErrorHandler();
   15729             :     }
   15730         395 :     {
   15731         395 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   15732         395 :       result = (char **)GDALMajorObjectShadow_GetMetadata_List(arg1,(char const *)arg2);
   15733         395 :       SWIG_PYTHON_THREAD_END_ALLOW;
   15734             :     }
   15735         395 :     if ( bLocalUseExceptions ) {
   15736          97 :       popErrorHandler();
   15737             :     }
   15738             : #ifndef SED_HACKS
   15739             :     if ( bLocalUseExceptions ) {
   15740             :       CPLErr eclass = CPLGetLastErrorType();
   15741             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15742             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15743             :       }
   15744             :     }
   15745             : #endif
   15746             :   }
   15747         395 :   {
   15748             :     /* %typemap(out) char **options -> ( string ) */
   15749         395 :     bool bErr = false;
   15750         395 :     resultobj = CSLToList(result, &bErr);
   15751         395 :     if( bErr ) {
   15752           0 :       SWIG_fail;
   15753             :     }
   15754             :   }
   15755         395 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   15756         395 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   15757             :   return resultobj;
   15758           0 : fail:
   15759           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   15760             :   return NULL;
   15761             : }
   15762             : 
   15763             : 
   15764             : SWIGINTERN PyObject *_wrap_MajorObject_SetMetadata__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
   15765             :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   15766             :   GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
   15767             :   char **arg2 = (char **) 0 ;
   15768             :   char *arg3 = (char *) "" ;
   15769             :   void *argp1 = 0 ;
   15770             :   int res1 = 0 ;
   15771             :   int res3 ;
   15772             :   char *buf3 = 0 ;
   15773             :   int alloc3 = 0 ;
   15774             :   CPLErr result;
   15775             :   
   15776             :   if ((nobjs < 2) || (nobjs > 3)) SWIG_fail;
   15777             :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
   15778             :   if (!SWIG_IsOK(res1)) {
   15779             :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_SetMetadata" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
   15780             :   }
   15781             :   arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
   15782             :   {
   15783             :     /* %typemap(in) char **dict */
   15784             :     arg2 = NULL;
   15785             :     if ( PySequence_Check( swig_obj[1] ) ) {
   15786             :       int bErr = FALSE;
   15787             :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   15788             :       if ( bErr )
   15789             :       {
   15790             :         SWIG_fail;
   15791             :       }
   15792             :     }
   15793             :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   15794             :       int bErr = FALSE;
   15795             :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   15796             :       if ( bErr )
   15797             :       {
   15798             :         SWIG_fail;
   15799             :       }
   15800             :     }
   15801             :     else {
   15802             :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   15803             :       SWIG_fail;
   15804             :     }
   15805             :   }
   15806             :   if (swig_obj[2]) {
   15807             :     res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   15808             :     if (!SWIG_IsOK(res3)) {
   15809             :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MajorObject_SetMetadata" "', argument " "3"" of type '" "char const *""'");
   15810             :     }
   15811             :     arg3 = reinterpret_cast< char * >(buf3);
   15812             :   }
   15813             :   {
   15814             :     const int bLocalUseExceptions = GetUseExceptions();
   15815             :     if ( bLocalUseExceptions ) {
   15816             :       pushErrorHandler();
   15817             :     }
   15818             :     {
   15819             :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   15820             :       CPL_IGNORE_RET_VAL(result = (CPLErr)GDALMajorObjectShadow_SetMetadata__SWIG_0(arg1,arg2,(char const *)arg3));
   15821             :       SWIG_PYTHON_THREAD_END_ALLOW;
   15822             :     }
   15823             :     if ( bLocalUseExceptions ) {
   15824             :       popErrorHandler();
   15825             :     }
   15826             : #ifndef SED_HACKS
   15827             :     if ( bLocalUseExceptions ) {
   15828             :       CPLErr eclass = CPLGetLastErrorType();
   15829             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15830             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15831             :       }
   15832             :     }
   15833             : #endif
   15834             :   }
   15835             :   resultobj = SWIG_From_int(static_cast< int >(result));
   15836             :   {
   15837             :     /* %typemap(freearg) char **dict */
   15838             :     CSLDestroy( arg2 );
   15839             :   }
   15840             :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   15841             :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   15842             :   return resultobj;
   15843             : fail:
   15844             :   {
   15845             :     /* %typemap(freearg) char **dict */
   15846             :     CSLDestroy( arg2 );
   15847             :   }
   15848             :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   15849             :   return NULL;
   15850             : }
   15851             : 
   15852             : 
   15853             : SWIGINTERN PyObject *_wrap_MajorObject_SetMetadata__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
   15854             :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   15855             :   GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
   15856             :   char *arg2 = (char *) 0 ;
   15857             :   char *arg3 = (char *) "" ;
   15858             :   void *argp1 = 0 ;
   15859             :   int res1 = 0 ;
   15860             :   int res2 ;
   15861             :   char *buf2 = 0 ;
   15862             :   int alloc2 = 0 ;
   15863             :   int res3 ;
   15864             :   char *buf3 = 0 ;
   15865             :   int alloc3 = 0 ;
   15866             :   CPLErr result;
   15867             :   
   15868             :   if ((nobjs < 2) || (nobjs > 3)) SWIG_fail;
   15869             :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
   15870             :   if (!SWIG_IsOK(res1)) {
   15871             :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_SetMetadata" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
   15872             :   }
   15873             :   arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
   15874             :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   15875             :   if (!SWIG_IsOK(res2)) {
   15876             :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MajorObject_SetMetadata" "', argument " "2"" of type '" "char *""'");
   15877             :   }
   15878             :   arg2 = reinterpret_cast< char * >(buf2);
   15879             :   if (swig_obj[2]) {
   15880             :     res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   15881             :     if (!SWIG_IsOK(res3)) {
   15882             :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MajorObject_SetMetadata" "', argument " "3"" of type '" "char const *""'");
   15883             :     }
   15884             :     arg3 = reinterpret_cast< char * >(buf3);
   15885             :   }
   15886             :   {
   15887             :     const int bLocalUseExceptions = GetUseExceptions();
   15888             :     if ( bLocalUseExceptions ) {
   15889             :       pushErrorHandler();
   15890             :     }
   15891             :     {
   15892             :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   15893             :       CPL_IGNORE_RET_VAL(result = (CPLErr)GDALMajorObjectShadow_SetMetadata__SWIG_1(arg1,arg2,(char const *)arg3));
   15894             :       SWIG_PYTHON_THREAD_END_ALLOW;
   15895             :     }
   15896             :     if ( bLocalUseExceptions ) {
   15897             :       popErrorHandler();
   15898             :     }
   15899             : #ifndef SED_HACKS
   15900             :     if ( bLocalUseExceptions ) {
   15901             :       CPLErr eclass = CPLGetLastErrorType();
   15902             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15903             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15904             :       }
   15905             :     }
   15906             : #endif
   15907             :   }
   15908             :   resultobj = SWIG_From_int(static_cast< int >(result));
   15909             :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   15910             :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   15911             :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   15912             :   return resultobj;
   15913             : fail:
   15914             :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   15915             :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   15916             :   return NULL;
   15917             : }
   15918             : 
   15919             : 
   15920         254 : SWIGINTERN PyObject *_wrap_MajorObject_SetMetadata(PyObject *self, PyObject *args) {
   15921         254 :   Py_ssize_t argc;
   15922         254 :   PyObject *argv[4] = {
   15923             :     0
   15924             :   };
   15925             :   
   15926         254 :   if (!(argc = SWIG_Python_UnpackTuple(args, "MajorObject_SetMetadata", 0, 3, argv))) SWIG_fail;
   15927         254 :   --argc;
   15928         254 :   if ((argc >= 2) && (argc <= 3)) {
   15929         254 :     int _v;
   15930         254 :     void *vptr = 0;
   15931         254 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_GDALMajorObjectShadow, 0);
   15932         275 :     _v = SWIG_CheckState(res);
   15933         254 :     if (_v) {
   15934         254 :       {
   15935             :         /* %typecheck(SWIG_TYPECHECK_POINTER) (char **dict) */
   15936             :         /* Note: we exclude explicitly strings, because they can be considered as a sequence of characters, */
   15937             :         /* which is not desirable since it makes it impossible to define bindings such as SetMetadata(string) and SetMetadata(array_of_string) */
   15938             :         /* (see #4816) */
   15939         254 :         _v = ((PyMapping_Check(argv[1]) || PySequence_Check(argv[1]) ) && !SWIG_CheckState(SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0)) ) ? 1 : 0;
   15940             :       }
   15941         233 :       if (_v) {
   15942         233 :         if (argc <= 2) {
   15943         233 :           return _wrap_MajorObject_SetMetadata__SWIG_0(self, argc, argv);
   15944             :         }
   15945         106 :         int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
   15946         106 :         _v = SWIG_CheckState(res);
   15947         106 :         if (_v) {
   15948         106 :           return _wrap_MajorObject_SetMetadata__SWIG_0(self, argc, argv);
   15949             :         }
   15950             :       }
   15951             :     }
   15952             :   }
   15953          21 :   if ((argc >= 2) && (argc <= 3)) {
   15954          21 :     int _v;
   15955          21 :     void *vptr = 0;
   15956          21 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_GDALMajorObjectShadow, 0);
   15957          22 :     _v = SWIG_CheckState(res);
   15958          21 :     if (_v) {
   15959          21 :       int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
   15960          21 :       _v = SWIG_CheckState(res);
   15961          20 :       if (_v) {
   15962          20 :         if (argc <= 2) {
   15963          20 :           return _wrap_MajorObject_SetMetadata__SWIG_1(self, argc, argv);
   15964             :         }
   15965          16 :         int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
   15966          16 :         _v = SWIG_CheckState(res);
   15967          16 :         if (_v) {
   15968          16 :           return _wrap_MajorObject_SetMetadata__SWIG_1(self, argc, argv);
   15969             :         }
   15970             :       }
   15971             :     }
   15972             :   }
   15973             :   
   15974           0 : fail:
   15975           1 :   SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'MajorObject_SetMetadata'.\n"
   15976             :     "  Possible C/C++ prototypes are:\n"
   15977             :     "    GDALMajorObjectShadow::SetMetadata(char **,char const *)\n"
   15978             :     "    GDALMajorObjectShadow::SetMetadata(char *,char const *)\n");
   15979             :   return 0;
   15980             : }
   15981             : 
   15982             : 
   15983       56638 : SWIGINTERN PyObject *_wrap_MajorObject_GetMetadataItem(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15984       56638 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   15985       56638 :   GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
   15986       56638 :   char *arg2 = (char *) 0 ;
   15987       56638 :   char *arg3 = (char *) "" ;
   15988       56638 :   void *argp1 = 0 ;
   15989       56638 :   int res1 = 0 ;
   15990       56638 :   int res2 ;
   15991       56638 :   char *buf2 = 0 ;
   15992       56638 :   int alloc2 = 0 ;
   15993       56638 :   int res3 ;
   15994       56638 :   char *buf3 = 0 ;
   15995       56638 :   int alloc3 = 0 ;
   15996       56638 :   PyObject *swig_obj[3] ;
   15997       56638 :   char *result = 0 ;
   15998             :   
   15999       56638 :   if (!SWIG_Python_UnpackTuple(args, "MajorObject_GetMetadataItem", 2, 3, swig_obj)) SWIG_fail;
   16000       56638 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
   16001       56638 :   if (!SWIG_IsOK(res1)) {
   16002           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_GetMetadataItem" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
   16003             :   }
   16004       56638 :   arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
   16005       56638 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   16006       56638 :   if (!SWIG_IsOK(res2)) {
   16007           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MajorObject_GetMetadataItem" "', argument " "2"" of type '" "char const *""'");
   16008             :   }
   16009       56638 :   arg2 = reinterpret_cast< char * >(buf2);
   16010       56638 :   if (swig_obj[2]) {
   16011        6244 :     res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   16012        6244 :     if (!SWIG_IsOK(res3)) {
   16013           0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MajorObject_GetMetadataItem" "', argument " "3"" of type '" "char const *""'");
   16014             :     }
   16015        6244 :     arg3 = reinterpret_cast< char * >(buf3);
   16016             :   }
   16017       56638 :   {
   16018       56638 :     if (!arg2) {
   16019           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   16020             :     }
   16021             :   }
   16022       56638 :   {
   16023       56638 :     const int bLocalUseExceptions = GetUseExceptions();
   16024       56638 :     if ( bLocalUseExceptions ) {
   16025       52263 :       pushErrorHandler();
   16026             :     }
   16027       56638 :     {
   16028       56638 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16029       56638 :       result = (char *)GDALMajorObjectShadow_GetMetadataItem(arg1,(char const *)arg2,(char const *)arg3);
   16030       56638 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16031             :     }
   16032       56638 :     if ( bLocalUseExceptions ) {
   16033       52263 :       popErrorHandler();
   16034             :     }
   16035             : #ifndef SED_HACKS
   16036             :     if ( bLocalUseExceptions ) {
   16037             :       CPLErr eclass = CPLGetLastErrorType();
   16038             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16039             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16040             :       }
   16041             :     }
   16042             : #endif
   16043             :   }
   16044       56638 :   resultobj = SWIG_FromCharPtr((const char *)result);
   16045       56638 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   16046       56638 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   16047       56639 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   16048             :   return resultobj;
   16049           0 : fail:
   16050           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   16051           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   16052             :   return NULL;
   16053             : }
   16054             : 
   16055             : 
   16056         441 : SWIGINTERN PyObject *_wrap_MajorObject_SetMetadataItem(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16057         441 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16058         441 :   GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
   16059         441 :   char *arg2 = (char *) 0 ;
   16060         441 :   char *arg3 = (char *) 0 ;
   16061         441 :   char *arg4 = (char *) "" ;
   16062         441 :   void *argp1 = 0 ;
   16063         441 :   int res1 = 0 ;
   16064         441 :   int res2 ;
   16065         441 :   char *buf2 = 0 ;
   16066         441 :   int alloc2 = 0 ;
   16067         441 :   int res3 ;
   16068         441 :   char *buf3 = 0 ;
   16069         441 :   int alloc3 = 0 ;
   16070         441 :   int res4 ;
   16071         441 :   char *buf4 = 0 ;
   16072         441 :   int alloc4 = 0 ;
   16073         441 :   PyObject *swig_obj[4] ;
   16074         441 :   CPLErr result;
   16075             :   
   16076         441 :   if (!SWIG_Python_UnpackTuple(args, "MajorObject_SetMetadataItem", 3, 4, swig_obj)) SWIG_fail;
   16077         441 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
   16078         441 :   if (!SWIG_IsOK(res1)) {
   16079           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_SetMetadataItem" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
   16080             :   }
   16081         441 :   arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
   16082         441 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   16083         441 :   if (!SWIG_IsOK(res2)) {
   16084           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MajorObject_SetMetadataItem" "', argument " "2"" of type '" "char const *""'");
   16085             :   }
   16086         441 :   arg2 = reinterpret_cast< char * >(buf2);
   16087         441 :   res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   16088         441 :   if (!SWIG_IsOK(res3)) {
   16089           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MajorObject_SetMetadataItem" "', argument " "3"" of type '" "char const *""'");
   16090             :   }
   16091         441 :   arg3 = reinterpret_cast< char * >(buf3);
   16092         441 :   if (swig_obj[3]) {
   16093          62 :     res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, NULL, &alloc4);
   16094          62 :     if (!SWIG_IsOK(res4)) {
   16095           0 :       SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "MajorObject_SetMetadataItem" "', argument " "4"" of type '" "char const *""'");
   16096             :     }
   16097          62 :     arg4 = reinterpret_cast< char * >(buf4);
   16098             :   }
   16099         441 :   {
   16100         441 :     if (!arg2) {
   16101           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   16102             :     }
   16103             :   }
   16104         441 :   {
   16105         441 :     const int bLocalUseExceptions = GetUseExceptions();
   16106         441 :     if ( bLocalUseExceptions ) {
   16107          87 :       pushErrorHandler();
   16108             :     }
   16109         441 :     {
   16110         441 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16111         441 :       CPL_IGNORE_RET_VAL(result = (CPLErr)GDALMajorObjectShadow_SetMetadataItem(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4));
   16112         441 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16113             :     }
   16114         441 :     if ( bLocalUseExceptions ) {
   16115          87 :       popErrorHandler();
   16116             :     }
   16117             : #ifndef SED_HACKS
   16118             :     if ( bLocalUseExceptions ) {
   16119             :       CPLErr eclass = CPLGetLastErrorType();
   16120             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16121             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16122             :       }
   16123             :     }
   16124             : #endif
   16125             :   }
   16126         441 :   resultobj = SWIG_From_int(static_cast< int >(result));
   16127         441 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   16128         441 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   16129         441 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   16130         441 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   16131             :   return resultobj;
   16132           0 : fail:
   16133           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   16134           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   16135           0 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   16136             :   return NULL;
   16137             : }
   16138             : 
   16139             : 
   16140         271 : SWIGINTERN PyObject *MajorObject_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16141         271 :   PyObject *obj;
   16142         271 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   16143         271 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALMajorObjectShadow, SWIG_NewClientData(obj));
   16144         271 :   return SWIG_Py_Void();
   16145             : }
   16146             : 
   16147      104889 : SWIGINTERN PyObject *_wrap_Driver_ShortName_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16148      104889 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16149      104889 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
   16150      104889 :   void *argp1 = 0 ;
   16151      104889 :   int res1 = 0 ;
   16152      104889 :   PyObject *swig_obj[1] ;
   16153      104889 :   char *result = 0 ;
   16154             :   
   16155      104889 :   if (!args) SWIG_fail;
   16156      104889 :   swig_obj[0] = args;
   16157      104889 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   16158      104889 :   if (!SWIG_IsOK(res1)) {
   16159           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_ShortName_get" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
   16160             :   }
   16161      104889 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
   16162      104889 :   {
   16163      104889 :     const int bLocalUseExceptions = GetUseExceptions();
   16164      104889 :     if ( bLocalUseExceptions ) {
   16165       54918 :       pushErrorHandler();
   16166             :     }
   16167      104889 :     {
   16168      104889 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16169      104889 :       result = (char *)GDALDriverShadow_ShortName_get(arg1);
   16170      104889 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16171             :     }
   16172      104889 :     if ( bLocalUseExceptions ) {
   16173       54918 :       popErrorHandler();
   16174             :     }
   16175             : #ifndef SED_HACKS
   16176             :     if ( bLocalUseExceptions ) {
   16177             :       CPLErr eclass = CPLGetLastErrorType();
   16178             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16179             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16180             :       }
   16181             :     }
   16182             : #endif
   16183             :   }
   16184      104889 :   resultobj = SWIG_FromCharPtr((const char *)result);
   16185      104889 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   16186             :   return resultobj;
   16187             : fail:
   16188             :   return NULL;
   16189             : }
   16190             : 
   16191             : 
   16192          17 : SWIGINTERN PyObject *_wrap_Driver_LongName_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16193          17 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16194          17 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
   16195          17 :   void *argp1 = 0 ;
   16196          17 :   int res1 = 0 ;
   16197          17 :   PyObject *swig_obj[1] ;
   16198          17 :   char *result = 0 ;
   16199             :   
   16200          17 :   if (!args) SWIG_fail;
   16201          17 :   swig_obj[0] = args;
   16202          17 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   16203          17 :   if (!SWIG_IsOK(res1)) {
   16204           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_LongName_get" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
   16205             :   }
   16206          17 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
   16207          17 :   {
   16208          17 :     const int bLocalUseExceptions = GetUseExceptions();
   16209          17 :     if ( bLocalUseExceptions ) {
   16210           0 :       pushErrorHandler();
   16211             :     }
   16212          17 :     {
   16213          17 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16214          17 :       result = (char *)GDALDriverShadow_LongName_get(arg1);
   16215          17 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16216             :     }
   16217          17 :     if ( bLocalUseExceptions ) {
   16218           0 :       popErrorHandler();
   16219             :     }
   16220             : #ifndef SED_HACKS
   16221             :     if ( bLocalUseExceptions ) {
   16222             :       CPLErr eclass = CPLGetLastErrorType();
   16223             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16224             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16225             :       }
   16226             :     }
   16227             : #endif
   16228             :   }
   16229          17 :   resultobj = SWIG_FromCharPtr((const char *)result);
   16230          17 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   16231             :   return resultobj;
   16232             : fail:
   16233             :   return NULL;
   16234             : }
   16235             : 
   16236             : 
   16237           0 : SWIGINTERN PyObject *_wrap_Driver_HelpTopic_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16238           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16239           0 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
   16240           0 :   void *argp1 = 0 ;
   16241           0 :   int res1 = 0 ;
   16242           0 :   PyObject *swig_obj[1] ;
   16243           0 :   char *result = 0 ;
   16244             :   
   16245           0 :   if (!args) SWIG_fail;
   16246           0 :   swig_obj[0] = args;
   16247           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   16248           0 :   if (!SWIG_IsOK(res1)) {
   16249           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_HelpTopic_get" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
   16250             :   }
   16251           0 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
   16252           0 :   {
   16253           0 :     const int bLocalUseExceptions = GetUseExceptions();
   16254           0 :     if ( bLocalUseExceptions ) {
   16255           0 :       pushErrorHandler();
   16256             :     }
   16257           0 :     {
   16258           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16259           0 :       result = (char *)GDALDriverShadow_HelpTopic_get(arg1);
   16260           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16261             :     }
   16262           0 :     if ( bLocalUseExceptions ) {
   16263           0 :       popErrorHandler();
   16264             :     }
   16265             : #ifndef SED_HACKS
   16266             :     if ( bLocalUseExceptions ) {
   16267             :       CPLErr eclass = CPLGetLastErrorType();
   16268             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16269             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16270             :       }
   16271             :     }
   16272             : #endif
   16273             :   }
   16274           0 :   resultobj = SWIG_FromCharPtr((const char *)result);
   16275           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   16276             :   return resultobj;
   16277             : fail:
   16278             :   return NULL;
   16279             : }
   16280             : 
   16281             : 
   16282       13646 : SWIGINTERN PyObject *_wrap_Driver_Create(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   16283       13646 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16284       13646 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
   16285       13646 :   char *arg2 = (char *) 0 ;
   16286       13646 :   int arg3 ;
   16287       13646 :   int arg4 ;
   16288       13646 :   int arg5 = (int) 1 ;
   16289       13646 :   GDALDataType arg6 = (GDALDataType) GDT_Byte ;
   16290       13646 :   char **arg7 = (char **) 0 ;
   16291       13646 :   void *argp1 = 0 ;
   16292       13646 :   int res1 = 0 ;
   16293       13646 :   int bToFree2 = 0 ;
   16294       13646 :   int val3 ;
   16295       13646 :   int ecode3 = 0 ;
   16296       13646 :   int val4 ;
   16297       13646 :   int ecode4 = 0 ;
   16298       13646 :   int val5 ;
   16299       13646 :   int ecode5 = 0 ;
   16300       13646 :   PyObject * obj0 = 0 ;
   16301       13646 :   PyObject * obj1 = 0 ;
   16302       13646 :   PyObject * obj2 = 0 ;
   16303       13646 :   PyObject * obj3 = 0 ;
   16304       13646 :   PyObject * obj4 = 0 ;
   16305       13646 :   PyObject * obj5 = 0 ;
   16306       13646 :   PyObject * obj6 = 0 ;
   16307       13646 :   char * kwnames[] = {
   16308             :     (char *)"self",  (char *)"utf8_path",  (char *)"xsize",  (char *)"ysize",  (char *)"bands",  (char *)"eType",  (char *)"options",  NULL 
   16309             :   };
   16310       13646 :   GDALDatasetShadow *result = 0 ;
   16311             :   
   16312       13646 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO|OOO:Driver_Create", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
   16313       13646 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   16314       13646 :   if (!SWIG_IsOK(res1)) {
   16315           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_Create" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
   16316             :   }
   16317       13646 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
   16318       13646 :   {
   16319             :     /* %typemap(in) (const char *utf8_path) */
   16320       13646 :     if (PyUnicode_Check(obj1) || PyBytes_Check(obj1))
   16321             :     {
   16322       12348 :       arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
   16323             :     }
   16324             :     else
   16325             :     {
   16326        1298 :       arg2 = GDALPythonPathToCStr(obj1, &bToFree2);
   16327             :       
   16328             :     }
   16329       13646 :     if (arg2 == NULL)
   16330             :     {
   16331           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   16332           0 :       SWIG_fail;
   16333             :     }
   16334             :   }
   16335       13646 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   16336       13646 :   if (!SWIG_IsOK(ecode3)) {
   16337           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Driver_Create" "', argument " "3"" of type '" "int""'");
   16338             :   } 
   16339       13646 :   arg3 = static_cast< int >(val3);
   16340       13646 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   16341       13646 :   if (!SWIG_IsOK(ecode4)) {
   16342           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Driver_Create" "', argument " "4"" of type '" "int""'");
   16343             :   } 
   16344       13646 :   arg4 = static_cast< int >(val4);
   16345       13646 :   if (obj4) {
   16346       12461 :     ecode5 = SWIG_AsVal_int(obj4, &val5);
   16347       12461 :     if (!SWIG_IsOK(ecode5)) {
   16348           0 :       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Driver_Create" "', argument " "5"" of type '" "int""'");
   16349             :     } 
   16350             :     arg5 = static_cast< int >(val5);
   16351             :   }
   16352       13646 :   if (obj5) {
   16353        6321 :     {
   16354             :       // %typemap(in) GDALDataType
   16355        6321 :       int val = 0;
   16356        6321 :       int ecode = SWIG_AsVal_int(obj5, &val);
   16357        6321 :       if (!SWIG_IsOK(ecode)) {
   16358           0 :         SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   16359             :       }
   16360        6321 :       if( val < GDT_Unknown || val >= GDT_TypeCount )
   16361             :       {
   16362           0 :         SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   16363             :       }
   16364             :       arg6 = static_cast<GDALDataType>(val);
   16365             :     }
   16366             :   }
   16367       13646 :   if (obj6) {
   16368        3754 :     {
   16369             :       /* %typemap(in) char **dict */
   16370        3754 :       arg7 = NULL;
   16371        3754 :       if ( PySequence_Check( obj6 ) ) {
   16372        3740 :         int bErr = FALSE;
   16373        3740 :         arg7 = CSLFromPySequence(obj6, &bErr);
   16374        3740 :         if ( bErr )
   16375             :         {
   16376           0 :           SWIG_fail;
   16377             :         }
   16378             :       }
   16379          14 :       else if ( PyMapping_Check( obj6 ) ) {
   16380          14 :         int bErr = FALSE;
   16381          14 :         arg7 = CSLFromPyMapping(obj6, &bErr);
   16382          14 :         if ( bErr )
   16383             :         {
   16384           0 :           SWIG_fail;
   16385             :         }
   16386             :       }
   16387             :       else {
   16388           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   16389           0 :         SWIG_fail;
   16390             :       }
   16391             :     }
   16392             :   }
   16393       13646 :   {
   16394       13646 :     if (!arg2) {
   16395       13646 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   16396             :     }
   16397             :   }
   16398       13646 :   {
   16399       13646 :     const int bLocalUseExceptions = GetUseExceptions();
   16400       13646 :     if ( bLocalUseExceptions ) {
   16401        3472 :       pushErrorHandler();
   16402             :     }
   16403       13646 :     {
   16404       13646 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16405       13646 :       result = (GDALDatasetShadow *)GDALDriverShadow_Create(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7);
   16406       13646 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16407             :     }
   16408       13646 :     if ( bLocalUseExceptions ) {
   16409        3472 :       popErrorHandler();
   16410             :     }
   16411             : #ifndef SED_HACKS
   16412             :     if ( bLocalUseExceptions ) {
   16413             :       CPLErr eclass = CPLGetLastErrorType();
   16414             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16415             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16416             :       }
   16417             :     }
   16418             : #endif
   16419             :   }
   16420       13646 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   16421       13646 :   {
   16422             :     /* %typemap(freearg) (const char *utf8_path) */
   16423       13646 :     GDALPythonFreeCStr(arg2, bToFree2);
   16424             :   }
   16425       13646 :   {
   16426             :     /* %typemap(freearg) char **dict */
   16427       13646 :     CSLDestroy( arg7 );
   16428             :   }
   16429       13654 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   16430             :   return resultobj;
   16431           0 : fail:
   16432           0 :   {
   16433             :     /* %typemap(freearg) (const char *utf8_path) */
   16434           0 :     GDALPythonFreeCStr(arg2, bToFree2);
   16435             :   }
   16436           0 :   {
   16437             :     /* %typemap(freearg) char **dict */
   16438           0 :     CSLDestroy( arg7 );
   16439             :   }
   16440             :   return NULL;
   16441             : }
   16442             : 
   16443             : 
   16444         412 : SWIGINTERN PyObject *_wrap_Driver_CreateMultiDimensional(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   16445         412 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16446         412 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
   16447         412 :   char *arg2 = (char *) 0 ;
   16448         412 :   char **arg3 = (char **) 0 ;
   16449         412 :   char **arg4 = (char **) 0 ;
   16450         412 :   void *argp1 = 0 ;
   16451         412 :   int res1 = 0 ;
   16452         412 :   int bToFree2 = 0 ;
   16453         412 :   PyObject * obj0 = 0 ;
   16454         412 :   PyObject * obj1 = 0 ;
   16455         412 :   PyObject * obj2 = 0 ;
   16456         412 :   PyObject * obj3 = 0 ;
   16457         412 :   char * kwnames[] = {
   16458             :     (char *)"self",  (char *)"utf8_path",  (char *)"root_group_options",  (char *)"options",  NULL 
   16459             :   };
   16460         412 :   GDALDatasetShadow *result = 0 ;
   16461             :   
   16462         412 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OO:Driver_CreateMultiDimensional", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
   16463         412 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   16464         412 :   if (!SWIG_IsOK(res1)) {
   16465           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_CreateMultiDimensional" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
   16466             :   }
   16467         412 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
   16468         412 :   {
   16469             :     /* %typemap(in) (const char *utf8_path) */
   16470         412 :     if (PyUnicode_Check(obj1) || PyBytes_Check(obj1))
   16471             :     {
   16472         410 :       arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
   16473             :     }
   16474             :     else
   16475             :     {
   16476           2 :       arg2 = GDALPythonPathToCStr(obj1, &bToFree2);
   16477             :       
   16478             :     }
   16479         412 :     if (arg2 == NULL)
   16480             :     {
   16481           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   16482           0 :       SWIG_fail;
   16483             :     }
   16484             :   }
   16485         412 :   if (obj2) {
   16486           1 :     {
   16487             :       /* %typemap(in) char **dict */
   16488           1 :       arg3 = NULL;
   16489           1 :       if ( PySequence_Check( obj2 ) ) {
   16490           1 :         int bErr = FALSE;
   16491           1 :         arg3 = CSLFromPySequence(obj2, &bErr);
   16492           1 :         if ( bErr )
   16493             :         {
   16494           0 :           SWIG_fail;
   16495             :         }
   16496             :       }
   16497           0 :       else if ( PyMapping_Check( obj2 ) ) {
   16498           0 :         int bErr = FALSE;
   16499           0 :         arg3 = CSLFromPyMapping(obj2, &bErr);
   16500           0 :         if ( bErr )
   16501             :         {
   16502           0 :           SWIG_fail;
   16503             :         }
   16504             :       }
   16505             :       else {
   16506           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   16507           0 :         SWIG_fail;
   16508             :       }
   16509             :     }
   16510             :   }
   16511         412 :   if (obj3) {
   16512         209 :     {
   16513             :       /* %typemap(in) char **dict */
   16514         209 :       arg4 = NULL;
   16515         209 :       if ( PySequence_Check( obj3 ) ) {
   16516         209 :         int bErr = FALSE;
   16517         209 :         arg4 = CSLFromPySequence(obj3, &bErr);
   16518         209 :         if ( bErr )
   16519             :         {
   16520           0 :           SWIG_fail;
   16521             :         }
   16522             :       }
   16523           0 :       else if ( PyMapping_Check( obj3 ) ) {
   16524           0 :         int bErr = FALSE;
   16525           0 :         arg4 = CSLFromPyMapping(obj3, &bErr);
   16526           0 :         if ( bErr )
   16527             :         {
   16528           0 :           SWIG_fail;
   16529             :         }
   16530             :       }
   16531             :       else {
   16532           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   16533           0 :         SWIG_fail;
   16534             :       }
   16535             :     }
   16536             :   }
   16537         412 :   {
   16538         412 :     if (!arg2) {
   16539         412 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   16540             :     }
   16541             :   }
   16542         412 :   {
   16543         412 :     const int bLocalUseExceptions = GetUseExceptions();
   16544         412 :     if ( bLocalUseExceptions ) {
   16545         101 :       pushErrorHandler();
   16546             :     }
   16547         412 :     {
   16548         412 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16549         412 :       result = (GDALDatasetShadow *)GDALDriverShadow_CreateMultiDimensional(arg1,(char const *)arg2,arg3,arg4);
   16550         412 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16551             :     }
   16552         412 :     if ( bLocalUseExceptions ) {
   16553         101 :       popErrorHandler();
   16554             :     }
   16555             : #ifndef SED_HACKS
   16556             :     if ( bLocalUseExceptions ) {
   16557             :       CPLErr eclass = CPLGetLastErrorType();
   16558             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16559             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16560             :       }
   16561             :     }
   16562             : #endif
   16563             :   }
   16564         412 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   16565         412 :   {
   16566             :     /* %typemap(freearg) (const char *utf8_path) */
   16567         412 :     GDALPythonFreeCStr(arg2, bToFree2);
   16568             :   }
   16569         412 :   {
   16570             :     /* %typemap(freearg) char **dict */
   16571         412 :     CSLDestroy( arg3 );
   16572             :   }
   16573         412 :   {
   16574             :     /* %typemap(freearg) char **dict */
   16575         412 :     CSLDestroy( arg4 );
   16576             :   }
   16577         412 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   16578             :   return resultobj;
   16579           0 : fail:
   16580           0 :   {
   16581             :     /* %typemap(freearg) (const char *utf8_path) */
   16582           0 :     GDALPythonFreeCStr(arg2, bToFree2);
   16583             :   }
   16584           0 :   {
   16585             :     /* %typemap(freearg) char **dict */
   16586           0 :     CSLDestroy( arg3 );
   16587             :   }
   16588           0 :   {
   16589             :     /* %typemap(freearg) char **dict */
   16590           0 :     CSLDestroy( arg4 );
   16591             :   }
   16592             :   return NULL;
   16593             : }
   16594             : 
   16595             : 
   16596        4255 : SWIGINTERN PyObject *_wrap_Driver_CreateCopy(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   16597        4255 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16598        4255 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
   16599        4255 :   char *arg2 = (char *) 0 ;
   16600        4255 :   GDALDatasetShadow *arg3 = (GDALDatasetShadow *) 0 ;
   16601        4255 :   int arg4 = (int) 1 ;
   16602        4255 :   char **arg5 = (char **) 0 ;
   16603        4255 :   GDALProgressFunc arg6 = (GDALProgressFunc) NULL ;
   16604        4255 :   void *arg7 = (void *) NULL ;
   16605        4255 :   void *argp1 = 0 ;
   16606        4255 :   int res1 = 0 ;
   16607        4255 :   int bToFree2 = 0 ;
   16608        4255 :   void *argp3 = 0 ;
   16609        4255 :   int res3 = 0 ;
   16610        4255 :   int val4 ;
   16611        4255 :   int ecode4 = 0 ;
   16612        4255 :   PyObject * obj0 = 0 ;
   16613        4255 :   PyObject * obj1 = 0 ;
   16614        4255 :   PyObject * obj2 = 0 ;
   16615        4255 :   PyObject * obj3 = 0 ;
   16616        4255 :   PyObject * obj4 = 0 ;
   16617        4255 :   PyObject * obj5 = 0 ;
   16618        4255 :   PyObject * obj6 = 0 ;
   16619        4255 :   char * kwnames[] = {
   16620             :     (char *)"self",  (char *)"utf8_path",  (char *)"src",  (char *)"strict",  (char *)"options",  (char *)"callback",  (char *)"callback_data",  NULL 
   16621             :   };
   16622        4255 :   GDALDatasetShadow *result = 0 ;
   16623             :   
   16624             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   16625        4255 :   PyProgressData *psProgressInfo;
   16626        4255 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   16627        4255 :   psProgressInfo->nLastReported = -1;
   16628        4255 :   psProgressInfo->psPyCallback = NULL;
   16629        4255 :   psProgressInfo->psPyCallbackData = NULL;
   16630        4255 :   arg7 = psProgressInfo;
   16631        4255 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO|OOOO:Driver_CreateCopy", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
   16632        4255 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   16633        4255 :   if (!SWIG_IsOK(res1)) {
   16634           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_CreateCopy" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
   16635             :   }
   16636        4255 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
   16637        4255 :   {
   16638             :     /* %typemap(in) (const char *utf8_path) */
   16639        4255 :     if (PyUnicode_Check(obj1) || PyBytes_Check(obj1))
   16640             :     {
   16641        4195 :       arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
   16642             :     }
   16643             :     else
   16644             :     {
   16645          60 :       arg2 = GDALPythonPathToCStr(obj1, &bToFree2);
   16646             :       
   16647             :     }
   16648        4255 :     if (arg2 == NULL)
   16649             :     {
   16650           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   16651           0 :       SWIG_fail;
   16652             :     }
   16653             :   }
   16654        4255 :   res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   16655        4255 :   if (!SWIG_IsOK(res3)) {
   16656           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Driver_CreateCopy" "', argument " "3"" of type '" "GDALDatasetShadow *""'"); 
   16657             :   }
   16658        4255 :   arg3 = reinterpret_cast< GDALDatasetShadow * >(argp3);
   16659        4255 :   if (obj3) {
   16660         499 :     ecode4 = SWIG_AsVal_int(obj3, &val4);
   16661         499 :     if (!SWIG_IsOK(ecode4)) {
   16662           0 :       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Driver_CreateCopy" "', argument " "4"" of type '" "int""'");
   16663             :     } 
   16664             :     arg4 = static_cast< int >(val4);
   16665             :   }
   16666        4255 :   if (obj4) {
   16667        1443 :     {
   16668             :       /* %typemap(in) char **dict */
   16669        1443 :       arg5 = NULL;
   16670        1443 :       if ( PySequence_Check( obj4 ) ) {
   16671        1441 :         int bErr = FALSE;
   16672        1441 :         arg5 = CSLFromPySequence(obj4, &bErr);
   16673        1441 :         if ( bErr )
   16674             :         {
   16675           0 :           SWIG_fail;
   16676             :         }
   16677             :       }
   16678           2 :       else if ( PyMapping_Check( obj4 ) ) {
   16679           2 :         int bErr = FALSE;
   16680           2 :         arg5 = CSLFromPyMapping(obj4, &bErr);
   16681           2 :         if ( bErr )
   16682             :         {
   16683           0 :           SWIG_fail;
   16684             :         }
   16685             :       }
   16686             :       else {
   16687           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   16688           0 :         SWIG_fail;
   16689             :       }
   16690             :     }
   16691             :   }
   16692        4255 :   if (obj5) {
   16693          83 :     {
   16694             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   16695             :       /* callback_func typemap */
   16696             :       
   16697             :       /* In some cases 0 is passed instead of None. */
   16698             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   16699          83 :       if ( PyLong_Check(obj5) || PyInt_Check(obj5) )
   16700             :       {
   16701           0 :         if( PyLong_AsLong(obj5) == 0 )
   16702             :         {
   16703           0 :           obj5 = Py_None;
   16704             :         }
   16705             :       }
   16706             :       
   16707          83 :       if (obj5 && obj5 != Py_None ) {
   16708          83 :         void* cbfunction = NULL;
   16709          83 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj5,
   16710             :             (void**)&cbfunction,
   16711             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   16712             :             SWIG_POINTER_EXCEPTION | 0 ));
   16713             :         
   16714          83 :         if ( cbfunction == GDALTermProgress ) {
   16715             :           arg6 = GDALTermProgress;
   16716             :         } else {
   16717          83 :           if (!PyCallable_Check(obj5)) {
   16718           1 :             PyErr_SetString( PyExc_RuntimeError,
   16719             :               "Object given is not a Python function" );
   16720           1 :             SWIG_fail;
   16721             :           }
   16722          82 :           psProgressInfo->psPyCallback = obj5;
   16723          82 :           arg6 = PyProgressProxy;
   16724             :         }
   16725             :         
   16726             :       }
   16727             :       
   16728             :     }
   16729             :   }
   16730        4254 :   if (obj6) {
   16731          14 :     {
   16732             :       /* %typemap(in) ( void* callback_data=NULL)  */
   16733          14 :       psProgressInfo->psPyCallbackData = obj6 ;
   16734             :     }
   16735             :   }
   16736        4254 :   {
   16737        4254 :     if (!arg2) {
   16738        4254 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   16739             :     }
   16740             :   }
   16741        4254 :   {
   16742        4254 :     if (!arg3) {
   16743           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   16744             :     }
   16745             :   }
   16746        4254 :   {
   16747        4254 :     const int bLocalUseExceptions = GetUseExceptions();
   16748        4254 :     if ( bLocalUseExceptions ) {
   16749         623 :       pushErrorHandler();
   16750             :     }
   16751        4254 :     {
   16752        4254 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16753        4254 :       result = (GDALDatasetShadow *)GDALDriverShadow_CreateCopy(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7);
   16754        4254 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16755             :     }
   16756        4254 :     if ( bLocalUseExceptions ) {
   16757         623 :       popErrorHandler();
   16758             :     }
   16759             : #ifndef SED_HACKS
   16760             :     if ( bLocalUseExceptions ) {
   16761             :       CPLErr eclass = CPLGetLastErrorType();
   16762             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16763             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16764             :       }
   16765             :     }
   16766             : #endif
   16767             :   }
   16768        4254 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   16769        4254 :   {
   16770             :     /* %typemap(freearg) (const char *utf8_path) */
   16771        4254 :     GDALPythonFreeCStr(arg2, bToFree2);
   16772             :   }
   16773        4254 :   {
   16774             :     /* %typemap(freearg) char **dict */
   16775        4254 :     CSLDestroy( arg5 );
   16776             :   }
   16777        4254 :   {
   16778             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   16779             :     
   16780        4254 :     CPLFree(psProgressInfo);
   16781             :     
   16782             :   }
   16783        4260 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   16784             :   return resultobj;
   16785           1 : fail:
   16786           1 :   {
   16787             :     /* %typemap(freearg) (const char *utf8_path) */
   16788           1 :     GDALPythonFreeCStr(arg2, bToFree2);
   16789             :   }
   16790           1 :   {
   16791             :     /* %typemap(freearg) char **dict */
   16792           1 :     CSLDestroy( arg5 );
   16793             :   }
   16794           1 :   {
   16795             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   16796             :     
   16797           1 :     CPLFree(psProgressInfo);
   16798             :     
   16799             :   }
   16800             :   return NULL;
   16801             : }
   16802             : 
   16803             : 
   16804        2570 : SWIGINTERN PyObject *_wrap_Driver_Delete(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16805        2570 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16806        2570 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
   16807        2570 :   char *arg2 = (char *) 0 ;
   16808        2570 :   void *argp1 = 0 ;
   16809        2570 :   int res1 = 0 ;
   16810        2570 :   int bToFree2 = 0 ;
   16811        2570 :   PyObject *swig_obj[2] ;
   16812        2570 :   CPLErr result;
   16813             :   
   16814        2570 :   if (!SWIG_Python_UnpackTuple(args, "Driver_Delete", 2, 2, swig_obj)) SWIG_fail;
   16815        2570 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   16816        2570 :   if (!SWIG_IsOK(res1)) {
   16817           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_Delete" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
   16818             :   }
   16819        2570 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
   16820        2570 :   {
   16821             :     /* %typemap(in) (const char *utf8_path) */
   16822        2570 :     if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
   16823             :     {
   16824        2443 :       arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
   16825             :     }
   16826             :     else
   16827             :     {
   16828         127 :       arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
   16829             :       
   16830             :     }
   16831        2570 :     if (arg2 == NULL)
   16832             :     {
   16833           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   16834           0 :       SWIG_fail;
   16835             :     }
   16836             :   }
   16837        2570 :   {
   16838        2570 :     if (!arg2) {
   16839        2570 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   16840             :     }
   16841             :   }
   16842        2570 :   {
   16843        2570 :     const int bLocalUseExceptions = GetUseExceptions();
   16844        2570 :     if ( bLocalUseExceptions ) {
   16845        1277 :       pushErrorHandler();
   16846             :     }
   16847        2570 :     {
   16848        2570 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16849        2570 :       CPL_IGNORE_RET_VAL(result = (CPLErr)GDALDriverShadow_Delete(arg1,(char const *)arg2));
   16850        2570 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16851             :     }
   16852        2570 :     if ( bLocalUseExceptions ) {
   16853        1277 :       popErrorHandler();
   16854             :     }
   16855             : #ifndef SED_HACKS
   16856             :     if ( bLocalUseExceptions ) {
   16857             :       CPLErr eclass = CPLGetLastErrorType();
   16858             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16859             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16860             :       }
   16861             :     }
   16862             : #endif
   16863             :   }
   16864        2570 :   resultobj = SWIG_From_int(static_cast< int >(result));
   16865        2570 :   {
   16866             :     /* %typemap(freearg) (const char *utf8_path) */
   16867        2570 :     GDALPythonFreeCStr(arg2, bToFree2);
   16868             :   }
   16869        2570 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   16870             :   return resultobj;
   16871           0 : fail:
   16872           0 :   {
   16873             :     /* %typemap(freearg) (const char *utf8_path) */
   16874        2570 :     GDALPythonFreeCStr(arg2, bToFree2);
   16875             :   }
   16876             :   return NULL;
   16877             : }
   16878             : 
   16879             : 
   16880         173 : SWIGINTERN PyObject *_wrap_Driver_Rename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16881         173 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16882         173 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
   16883         173 :   char *arg2 = (char *) 0 ;
   16884         173 :   char *arg3 = (char *) 0 ;
   16885         173 :   void *argp1 = 0 ;
   16886         173 :   int res1 = 0 ;
   16887         173 :   int res2 ;
   16888         173 :   char *buf2 = 0 ;
   16889         173 :   int alloc2 = 0 ;
   16890         173 :   int res3 ;
   16891         173 :   char *buf3 = 0 ;
   16892         173 :   int alloc3 = 0 ;
   16893         173 :   PyObject *swig_obj[3] ;
   16894         173 :   CPLErr result;
   16895             :   
   16896         173 :   if (!SWIG_Python_UnpackTuple(args, "Driver_Rename", 3, 3, swig_obj)) SWIG_fail;
   16897         173 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   16898         173 :   if (!SWIG_IsOK(res1)) {
   16899           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_Rename" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
   16900             :   }
   16901         173 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
   16902         173 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   16903         173 :   if (!SWIG_IsOK(res2)) {
   16904           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Driver_Rename" "', argument " "2"" of type '" "char const *""'");
   16905             :   }
   16906         173 :   arg2 = reinterpret_cast< char * >(buf2);
   16907         173 :   res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   16908         173 :   if (!SWIG_IsOK(res3)) {
   16909           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Driver_Rename" "', argument " "3"" of type '" "char const *""'");
   16910             :   }
   16911         173 :   arg3 = reinterpret_cast< char * >(buf3);
   16912         173 :   {
   16913         173 :     if (!arg2) {
   16914           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   16915             :     }
   16916             :   }
   16917         173 :   {
   16918         173 :     if (!arg3) {
   16919           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   16920             :     }
   16921             :   }
   16922         173 :   {
   16923         173 :     const int bLocalUseExceptions = GetUseExceptions();
   16924         173 :     if ( bLocalUseExceptions ) {
   16925         173 :       pushErrorHandler();
   16926             :     }
   16927         173 :     {
   16928         173 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16929         173 :       CPL_IGNORE_RET_VAL(result = (CPLErr)GDALDriverShadow_Rename(arg1,(char const *)arg2,(char const *)arg3));
   16930         173 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16931             :     }
   16932         173 :     if ( bLocalUseExceptions ) {
   16933         173 :       popErrorHandler();
   16934             :     }
   16935             : #ifndef SED_HACKS
   16936             :     if ( bLocalUseExceptions ) {
   16937             :       CPLErr eclass = CPLGetLastErrorType();
   16938             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16939             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16940             :       }
   16941             :     }
   16942             : #endif
   16943             :   }
   16944         173 :   resultobj = SWIG_From_int(static_cast< int >(result));
   16945         173 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   16946         173 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   16947         173 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   16948             :   return resultobj;
   16949           0 : fail:
   16950           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   16951           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   16952             :   return NULL;
   16953             : }
   16954             : 
   16955             : 
   16956           3 : SWIGINTERN PyObject *_wrap_Driver_CopyFiles(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16957           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16958           3 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
   16959           3 :   char *arg2 = (char *) 0 ;
   16960           3 :   char *arg3 = (char *) 0 ;
   16961           3 :   void *argp1 = 0 ;
   16962           3 :   int res1 = 0 ;
   16963           3 :   int res2 ;
   16964           3 :   char *buf2 = 0 ;
   16965           3 :   int alloc2 = 0 ;
   16966           3 :   int res3 ;
   16967           3 :   char *buf3 = 0 ;
   16968           3 :   int alloc3 = 0 ;
   16969           3 :   PyObject *swig_obj[3] ;
   16970           3 :   CPLErr result;
   16971             :   
   16972           3 :   if (!SWIG_Python_UnpackTuple(args, "Driver_CopyFiles", 3, 3, swig_obj)) SWIG_fail;
   16973           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   16974           3 :   if (!SWIG_IsOK(res1)) {
   16975           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_CopyFiles" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
   16976             :   }
   16977           3 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
   16978           3 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   16979           3 :   if (!SWIG_IsOK(res2)) {
   16980           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Driver_CopyFiles" "', argument " "2"" of type '" "char const *""'");
   16981             :   }
   16982           3 :   arg2 = reinterpret_cast< char * >(buf2);
   16983           3 :   res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   16984           3 :   if (!SWIG_IsOK(res3)) {
   16985           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Driver_CopyFiles" "', argument " "3"" of type '" "char const *""'");
   16986             :   }
   16987           3 :   arg3 = reinterpret_cast< char * >(buf3);
   16988           3 :   {
   16989           3 :     if (!arg2) {
   16990           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   16991             :     }
   16992             :   }
   16993           3 :   {
   16994           3 :     if (!arg3) {
   16995           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   16996             :     }
   16997             :   }
   16998           3 :   {
   16999           3 :     const int bLocalUseExceptions = GetUseExceptions();
   17000           3 :     if ( bLocalUseExceptions ) {
   17001           3 :       pushErrorHandler();
   17002             :     }
   17003           3 :     {
   17004           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   17005           3 :       CPL_IGNORE_RET_VAL(result = (CPLErr)GDALDriverShadow_CopyFiles(arg1,(char const *)arg2,(char const *)arg3));
   17006           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   17007             :     }
   17008           3 :     if ( bLocalUseExceptions ) {
   17009           3 :       popErrorHandler();
   17010             :     }
   17011             : #ifndef SED_HACKS
   17012             :     if ( bLocalUseExceptions ) {
   17013             :       CPLErr eclass = CPLGetLastErrorType();
   17014             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17015             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17016             :       }
   17017             :     }
   17018             : #endif
   17019             :   }
   17020           3 :   resultobj = SWIG_From_int(static_cast< int >(result));
   17021           3 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   17022           3 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   17023           3 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   17024             :   return resultobj;
   17025           0 : fail:
   17026           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   17027           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   17028             :   return NULL;
   17029             : }
   17030             : 
   17031             : 
   17032           6 : SWIGINTERN PyObject *_wrap_Driver_TestCapability(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17033           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   17034           6 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
   17035           6 :   char *arg2 = (char *) 0 ;
   17036           6 :   void *argp1 = 0 ;
   17037           6 :   int res1 = 0 ;
   17038           6 :   int res2 ;
   17039           6 :   char *buf2 = 0 ;
   17040           6 :   int alloc2 = 0 ;
   17041           6 :   PyObject *swig_obj[2] ;
   17042           6 :   bool result;
   17043             :   
   17044           6 :   if (!SWIG_Python_UnpackTuple(args, "Driver_TestCapability", 2, 2, swig_obj)) SWIG_fail;
   17045           6 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   17046           6 :   if (!SWIG_IsOK(res1)) {
   17047           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_TestCapability" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
   17048             :   }
   17049           6 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
   17050           6 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   17051           6 :   if (!SWIG_IsOK(res2)) {
   17052           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Driver_TestCapability" "', argument " "2"" of type '" "char const *""'");
   17053             :   }
   17054           6 :   arg2 = reinterpret_cast< char * >(buf2);
   17055           6 :   {
   17056           6 :     const int bLocalUseExceptions = GetUseExceptions();
   17057           6 :     if ( bLocalUseExceptions ) {
   17058           4 :       pushErrorHandler();
   17059             :     }
   17060           6 :     {
   17061           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   17062           6 :       result = (bool)GDALDriverShadow_TestCapability(arg1,(char const *)arg2);
   17063           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   17064             :     }
   17065           6 :     if ( bLocalUseExceptions ) {
   17066           4 :       popErrorHandler();
   17067             :     }
   17068             : #ifndef SED_HACKS
   17069             :     if ( bLocalUseExceptions ) {
   17070             :       CPLErr eclass = CPLGetLastErrorType();
   17071             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17072             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17073             :       }
   17074             :     }
   17075             : #endif
   17076             :   }
   17077           6 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   17078           6 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   17079           6 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   17080             :   return resultobj;
   17081           0 : fail:
   17082           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   17083             :   return NULL;
   17084             : }
   17085             : 
   17086             : 
   17087          91 : SWIGINTERN PyObject *_wrap_Driver_Register(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17088          91 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   17089          91 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
   17090          91 :   void *argp1 = 0 ;
   17091          91 :   int res1 = 0 ;
   17092          91 :   PyObject *swig_obj[1] ;
   17093          91 :   int result;
   17094             :   
   17095          91 :   if (!args) SWIG_fail;
   17096          91 :   swig_obj[0] = args;
   17097          91 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   17098          91 :   if (!SWIG_IsOK(res1)) {
   17099           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_Register" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
   17100             :   }
   17101          91 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
   17102          91 :   {
   17103          91 :     const int bLocalUseExceptions = GetUseExceptions();
   17104          91 :     if ( bLocalUseExceptions ) {
   17105          13 :       pushErrorHandler();
   17106             :     }
   17107          91 :     {
   17108          91 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   17109          91 :       result = (int)GDALDriverShadow_Register(arg1);
   17110          91 :       SWIG_PYTHON_THREAD_END_ALLOW;
   17111             :     }
   17112          91 :     if ( bLocalUseExceptions ) {
   17113          13 :       popErrorHandler();
   17114             :     }
   17115             : #ifndef SED_HACKS
   17116             :     if ( bLocalUseExceptions ) {
   17117             :       CPLErr eclass = CPLGetLastErrorType();
   17118             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17119             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17120             :       }
   17121             :     }
   17122             : #endif
   17123             :   }
   17124          91 :   resultobj = SWIG_From_int(static_cast< int >(result));
   17125          91 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   17126             :   return resultobj;
   17127             : fail:
   17128             :   return NULL;
   17129             : }
   17130             : 
   17131             : 
   17132          91 : SWIGINTERN PyObject *_wrap_Driver_Deregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17133          91 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   17134          91 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
   17135          91 :   void *argp1 = 0 ;
   17136          91 :   int res1 = 0 ;
   17137          91 :   PyObject *swig_obj[1] ;
   17138             :   
   17139          91 :   if (!args) SWIG_fail;
   17140          91 :   swig_obj[0] = args;
   17141          91 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   17142          91 :   if (!SWIG_IsOK(res1)) {
   17143           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_Deregister" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
   17144             :   }
   17145          91 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
   17146          91 :   {
   17147          91 :     const int bLocalUseExceptions = GetUseExceptions();
   17148          91 :     if ( bLocalUseExceptions ) {
   17149          13 :       pushErrorHandler();
   17150             :     }
   17151          91 :     {
   17152          91 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   17153          91 :       GDALDriverShadow_Deregister(arg1);
   17154          91 :       SWIG_PYTHON_THREAD_END_ALLOW;
   17155             :     }
   17156          91 :     if ( bLocalUseExceptions ) {
   17157          13 :       popErrorHandler();
   17158             :     }
   17159             : #ifndef SED_HACKS
   17160             :     if ( bLocalUseExceptions ) {
   17161             :       CPLErr eclass = CPLGetLastErrorType();
   17162             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17163             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17164             :       }
   17165             :     }
   17166             : #endif
   17167             :   }
   17168          91 :   resultobj = SWIG_Py_Void();
   17169          91 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   17170             :   return resultobj;
   17171             : fail:
   17172             :   return NULL;
   17173             : }
   17174             : 
   17175             : 
   17176         271 : SWIGINTERN PyObject *Driver_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17177         271 :   PyObject *obj;
   17178         271 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   17179         271 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALDriverShadow, SWIG_NewClientData(obj));
   17180         271 :   return SWIG_Py_Void();
   17181             : }
   17182             : 
   17183           0 : SWIGINTERN PyObject *_wrap_ColorEntry_c1_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17184           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   17185           0 :   GDALColorEntry *arg1 = (GDALColorEntry *) 0 ;
   17186           0 :   short arg2 ;
   17187           0 :   GDALColorEntry ce1 ;
   17188           0 :   short val2 ;
   17189           0 :   int ecode2 = 0 ;
   17190           0 :   PyObject *swig_obj[2] ;
   17191             :   
   17192           0 :   if (!SWIG_Python_UnpackTuple(args, "ColorEntry_c1_set", 2, 2, swig_obj)) SWIG_fail;
   17193           0 :   {
   17194             :     /* %typemap(in) GDALColorEntry* */
   17195           0 :     ce1.c4 = 255;
   17196           0 :     if (! PySequence_Check(swig_obj[0]) ) {
   17197           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   17198           0 :       SWIG_fail;
   17199             :     }
   17200           0 :     Py_ssize_t size = PySequence_Size(swig_obj[0]);
   17201           0 :     if ( size > 4 ) {
   17202           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
   17203           0 :       SWIG_fail;
   17204             :     }
   17205           0 :     if ( size < 3 ) {
   17206           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
   17207           0 :       SWIG_fail;
   17208             :     }
   17209           0 :     if ( !PyArg_ParseTuple( swig_obj[0],"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
   17210           0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
   17211           0 :       SWIG_fail;
   17212             :     }
   17213           0 :     arg1 = &ce1;
   17214             :   }
   17215           0 :   ecode2 = SWIG_AsVal_short(swig_obj[1], &val2);
   17216           0 :   if (!SWIG_IsOK(ecode2)) {
   17217           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColorEntry_c1_set" "', argument " "2"" of type '" "short""'");
   17218             :   } 
   17219           0 :   arg2 = static_cast< short >(val2);
   17220           0 :   {
   17221           0 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   17222           0 :     if (arg1) (arg1)->c1 = arg2;
   17223           0 :     SWIG_PYTHON_THREAD_END_ALLOW;
   17224             :   }
   17225           0 :   resultobj = SWIG_Py_Void();
   17226           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   17227             :   return resultobj;
   17228             : fail:
   17229             :   return NULL;
   17230             : }
   17231             : 
   17232             : 
   17233           0 : SWIGINTERN PyObject *_wrap_ColorEntry_c1_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17234           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   17235           0 :   GDALColorEntry *arg1 = (GDALColorEntry *) 0 ;
   17236           0 :   GDALColorEntry ce1 ;
   17237           0 :   PyObject *swig_obj[1] ;
   17238           0 :   short result;
   17239             :   
   17240           0 :   if (!args) SWIG_fail;
   17241           0 :   swig_obj[0] = args;
   17242           0 :   {
   17243             :     /* %typemap(in) GDALColorEntry* */
   17244           0 :     ce1.c4 = 255;
   17245           0 :     if (! PySequence_Check(swig_obj[0]) ) {
   17246           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   17247           0 :       SWIG_fail;
   17248             :     }
   17249           0 :     Py_ssize_t size = PySequence_Size(swig_obj[0]);
   17250           0 :     if ( size > 4 ) {
   17251           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
   17252           0 :       SWIG_fail;
   17253             :     }
   17254           0 :     if ( size < 3 ) {
   17255           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
   17256           0 :       SWIG_fail;
   17257             :     }
   17258           0 :     if ( !PyArg_ParseTuple( swig_obj[0],"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
   17259           0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
   17260           0 :       SWIG_fail;
   17261             :     }
   17262           0 :     arg1 = &ce1;
   17263             :   }
   17264           0 :   {
   17265           0 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   17266           0 :     result = (short) ((arg1)->c1);
   17267           0 :     SWIG_PYTHON_THREAD_END_ALLOW;
   17268             :   }
   17269           0 :   resultobj = SWIG_From_short(static_cast< short >(result));
   17270           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   17271             :   return resultobj;
   17272             : fail:
   17273             :   return NULL;
   17274             : }
   17275             : 
   17276             : 
   17277           0 : SWIGINTERN PyObject *_wrap_ColorEntry_c2_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17278           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   17279           0 :   GDALColorEntry *arg1 = (GDALColorEntry *) 0 ;
   17280           0 :   short arg2 ;
   17281           0 :   GDALColorEntry ce1 ;
   17282           0 :   short val2 ;
   17283           0 :   int ecode2 = 0 ;
   17284           0 :   PyObject *swig_obj[2] ;
   17285             :   
   17286           0 :   if (!SWIG_Python_UnpackTuple(args, "ColorEntry_c2_set", 2, 2, swig_obj)) SWIG_fail;
   17287           0 :   {
   17288             :     /* %typemap(in) GDALColorEntry* */
   17289           0 :     ce1.c4 = 255;
   17290           0 :     if (! PySequence_Check(swig_obj[0]) ) {
   17291           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   17292           0 :       SWIG_fail;
   17293             :     }
   17294           0 :     Py_ssize_t size = PySequence_Size(swig_obj[0]);
   17295           0 :     if ( size > 4 ) {
   17296           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
   17297           0 :       SWIG_fail;
   17298             :     }
   17299           0 :     if ( size < 3 ) {
   17300           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
   17301           0 :       SWIG_fail;
   17302             :     }
   17303           0 :     if ( !PyArg_ParseTuple( swig_obj[0],"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
   17304           0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
   17305           0 :       SWIG_fail;
   17306             :     }
   17307           0 :     arg1 = &ce1;
   17308             :   }
   17309           0 :   ecode2 = SWIG_AsVal_short(swig_obj[1], &val2);
   17310           0 :   if (!SWIG_IsOK(ecode2)) {
   17311           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColorEntry_c2_set" "', argument " "2"" of type '" "short""'");
   17312             :   } 
   17313           0 :   arg2 = static_cast< short >(val2);
   17314           0 :   {
   17315           0 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   17316           0 :     if (arg1) (arg1)->c2 = arg2;
   17317           0 :     SWIG_PYTHON_THREAD_END_ALLOW;
   17318             :   }
   17319           0 :   resultobj = SWIG_Py_Void();
   17320           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   17321             :   return resultobj;
   17322             : fail:
   17323             :   return NULL;
   17324             : }
   17325             : 
   17326             : 
   17327           0 : SWIGINTERN PyObject *_wrap_ColorEntry_c2_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17328           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   17329           0 :   GDALColorEntry *arg1 = (GDALColorEntry *) 0 ;
   17330           0 :   GDALColorEntry ce1 ;
   17331           0 :   PyObject *swig_obj[1] ;
   17332           0 :   short result;
   17333             :   
   17334           0 :   if (!args) SWIG_fail;
   17335           0 :   swig_obj[0] = args;
   17336           0 :   {
   17337             :     /* %typemap(in) GDALColorEntry* */
   17338           0 :     ce1.c4 = 255;
   17339           0 :     if (! PySequence_Check(swig_obj[0]) ) {
   17340           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   17341           0 :       SWIG_fail;
   17342             :     }
   17343           0 :     Py_ssize_t size = PySequence_Size(swig_obj[0]);
   17344           0 :     if ( size > 4 ) {
   17345           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
   17346           0 :       SWIG_fail;
   17347             :     }
   17348           0 :     if ( size < 3 ) {
   17349           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
   17350           0 :       SWIG_fail;
   17351             :     }
   17352           0 :     if ( !PyArg_ParseTuple( swig_obj[0],"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
   17353           0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
   17354           0 :       SWIG_fail;
   17355             :     }
   17356           0 :     arg1 = &ce1;
   17357             :   }
   17358           0 :   {
   17359           0 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   17360           0 :     result = (short) ((arg1)->c2);
   17361           0 :     SWIG_PYTHON_THREAD_END_ALLOW;
   17362             :   }
   17363           0 :   resultobj = SWIG_From_short(static_cast< short >(result));
   17364           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   17365             :   return resultobj;
   17366             : fail:
   17367             :   return NULL;
   17368             : }
   17369             : 
   17370             : 
   17371           0 : SWIGINTERN PyObject *_wrap_ColorEntry_c3_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17372           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   17373           0 :   GDALColorEntry *arg1 = (GDALColorEntry *) 0 ;
   17374           0 :   short arg2 ;
   17375           0 :   GDALColorEntry ce1 ;
   17376           0 :   short val2 ;
   17377           0 :   int ecode2 = 0 ;
   17378           0 :   PyObject *swig_obj[2] ;
   17379             :   
   17380           0 :   if (!SWIG_Python_UnpackTuple(args, "ColorEntry_c3_set", 2, 2, swig_obj)) SWIG_fail;
   17381           0 :   {
   17382             :     /* %typemap(in) GDALColorEntry* */
   17383           0 :     ce1.c4 = 255;
   17384           0 :     if (! PySequence_Check(swig_obj[0]) ) {
   17385           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   17386           0 :       SWIG_fail;
   17387             :     }
   17388           0 :     Py_ssize_t size = PySequence_Size(swig_obj[0]);
   17389           0 :     if ( size > 4 ) {
   17390           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
   17391           0 :       SWIG_fail;
   17392             :     }
   17393           0 :     if ( size < 3 ) {
   17394           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
   17395           0 :       SWIG_fail;
   17396             :     }
   17397           0 :     if ( !PyArg_ParseTuple( swig_obj[0],"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
   17398           0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
   17399           0 :       SWIG_fail;
   17400             :     }
   17401           0 :     arg1 = &ce1;
   17402             :   }
   17403           0 :   ecode2 = SWIG_AsVal_short(swig_obj[1], &val2);
   17404           0 :   if (!SWIG_IsOK(ecode2)) {
   17405           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColorEntry_c3_set" "', argument " "2"" of type '" "short""'");
   17406             :   } 
   17407           0 :   arg2 = static_cast< short >(val2);
   17408           0 :   {
   17409           0 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   17410           0 :     if (arg1) (arg1)->c3 = arg2;
   17411           0 :     SWIG_PYTHON_THREAD_END_ALLOW;
   17412             :   }
   17413           0 :   resultobj = SWIG_Py_Void();
   17414           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   17415             :   return resultobj;
   17416             : fail:
   17417             :   return NULL;
   17418             : }
   17419             : 
   17420             : 
   17421           0 : SWIGINTERN PyObject *_wrap_ColorEntry_c3_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17422           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   17423           0 :   GDALColorEntry *arg1 = (GDALColorEntry *) 0 ;
   17424           0 :   GDALColorEntry ce1 ;
   17425           0 :   PyObject *swig_obj[1] ;
   17426           0 :   short result;
   17427             :   
   17428           0 :   if (!args) SWIG_fail;
   17429           0 :   swig_obj[0] = args;
   17430           0 :   {
   17431             :     /* %typemap(in) GDALColorEntry* */
   17432           0 :     ce1.c4 = 255;
   17433           0 :     if (! PySequence_Check(swig_obj[0]) ) {
   17434           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   17435           0 :       SWIG_fail;
   17436             :     }
   17437           0 :     Py_ssize_t size = PySequence_Size(swig_obj[0]);
   17438           0 :     if ( size > 4 ) {
   17439           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
   17440           0 :       SWIG_fail;
   17441             :     }
   17442           0 :     if ( size < 3 ) {
   17443           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
   17444           0 :       SWIG_fail;
   17445             :     }
   17446           0 :     if ( !PyArg_ParseTuple( swig_obj[0],"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
   17447           0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
   17448           0 :       SWIG_fail;
   17449             :     }
   17450           0 :     arg1 = &ce1;
   17451             :   }
   17452           0 :   {
   17453           0 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   17454           0 :     result = (short) ((arg1)->c3);
   17455           0 :     SWIG_PYTHON_THREAD_END_ALLOW;
   17456             :   }
   17457           0 :   resultobj = SWIG_From_short(static_cast< short >(result));
   17458           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   17459             :   return resultobj;
   17460             : fail:
   17461             :   return NULL;
   17462             : }
   17463             : 
   17464             : 
   17465           0 : SWIGINTERN PyObject *_wrap_ColorEntry_c4_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17466           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   17467           0 :   GDALColorEntry *arg1 = (GDALColorEntry *) 0 ;
   17468           0 :   short arg2 ;
   17469           0 :   GDALColorEntry ce1 ;
   17470           0 :   short val2 ;
   17471           0 :   int ecode2 = 0 ;
   17472           0 :   PyObject *swig_obj[2] ;
   17473             :   
   17474           0 :   if (!SWIG_Python_UnpackTuple(args, "ColorEntry_c4_set", 2, 2, swig_obj)) SWIG_fail;
   17475           0 :   {
   17476             :     /* %typemap(in) GDALColorEntry* */
   17477           0 :     ce1.c4 = 255;
   17478           0 :     if (! PySequence_Check(swig_obj[0]) ) {
   17479           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   17480           0 :       SWIG_fail;
   17481             :     }
   17482           0 :     Py_ssize_t size = PySequence_Size(swig_obj[0]);
   17483           0 :     if ( size > 4 ) {
   17484           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
   17485           0 :       SWIG_fail;
   17486             :     }
   17487           0 :     if ( size < 3 ) {
   17488           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
   17489           0 :       SWIG_fail;
   17490             :     }
   17491           0 :     if ( !PyArg_ParseTuple( swig_obj[0],"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
   17492           0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
   17493           0 :       SWIG_fail;
   17494             :     }
   17495           0 :     arg1 = &ce1;
   17496             :   }
   17497           0 :   ecode2 = SWIG_AsVal_short(swig_obj[1], &val2);
   17498           0 :   if (!SWIG_IsOK(ecode2)) {
   17499           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColorEntry_c4_set" "', argument " "2"" of type '" "short""'");
   17500             :   } 
   17501           0 :   arg2 = static_cast< short >(val2);
   17502           0 :   {
   17503           0 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   17504           0 :     if (arg1) (arg1)->c4 = arg2;
   17505           0 :     SWIG_PYTHON_THREAD_END_ALLOW;
   17506             :   }
   17507           0 :   resultobj = SWIG_Py_Void();
   17508           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   17509             :   return resultobj;
   17510             : fail:
   17511             :   return NULL;
   17512             : }
   17513             : 
   17514             : 
   17515           0 : SWIGINTERN PyObject *_wrap_ColorEntry_c4_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17516           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   17517           0 :   GDALColorEntry *arg1 = (GDALColorEntry *) 0 ;
   17518           0 :   GDALColorEntry ce1 ;
   17519           0 :   PyObject *swig_obj[1] ;
   17520           0 :   short result;
   17521             :   
   17522           0 :   if (!args) SWIG_fail;
   17523           0 :   swig_obj[0] = args;
   17524           0 :   {
   17525             :     /* %typemap(in) GDALColorEntry* */
   17526           0 :     ce1.c4 = 255;
   17527           0 :     if (! PySequence_Check(swig_obj[0]) ) {
   17528           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   17529           0 :       SWIG_fail;
   17530             :     }
   17531           0 :     Py_ssize_t size = PySequence_Size(swig_obj[0]);
   17532           0 :     if ( size > 4 ) {
   17533           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
   17534           0 :       SWIG_fail;
   17535             :     }
   17536           0 :     if ( size < 3 ) {
   17537           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
   17538           0 :       SWIG_fail;
   17539             :     }
   17540           0 :     if ( !PyArg_ParseTuple( swig_obj[0],"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
   17541           0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
   17542           0 :       SWIG_fail;
   17543             :     }
   17544           0 :     arg1 = &ce1;
   17545             :   }
   17546           0 :   {
   17547           0 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   17548           0 :     result = (short) ((arg1)->c4);
   17549           0 :     SWIG_PYTHON_THREAD_END_ALLOW;
   17550             :   }
   17551           0 :   resultobj = SWIG_From_short(static_cast< short >(result));
   17552           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   17553             :   return resultobj;
   17554             : fail:
   17555             :   return NULL;
   17556             : }
   17557             : 
   17558             : 
   17559         271 : SWIGINTERN PyObject *ColorEntry_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17560         271 :   PyObject *obj;
   17561         271 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   17562         271 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALColorEntry, SWIG_NewClientData(obj));
   17563         271 :   return SWIG_Py_Void();
   17564             : }
   17565             : 
   17566          48 : SWIGINTERN PyObject *_wrap_GCP_GCPX_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17567          48 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   17568          48 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   17569          48 :   double arg2 ;
   17570          48 :   void *argp1 = 0 ;
   17571          48 :   int res1 = 0 ;
   17572          48 :   double val2 ;
   17573          48 :   int ecode2 = 0 ;
   17574          48 :   PyObject *swig_obj[2] ;
   17575             :   
   17576          48 :   if (!SWIG_Python_UnpackTuple(args, "GCP_GCPX_set", 2, 2, swig_obj)) SWIG_fail;
   17577          48 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   17578          48 :   if (!SWIG_IsOK(res1)) {
   17579           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPX_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   17580             :   }
   17581          48 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   17582          48 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   17583          48 :   if (!SWIG_IsOK(ecode2)) {
   17584           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GCP_GCPX_set" "', argument " "2"" of type '" "double""'");
   17585             :   } 
   17586          48 :   arg2 = static_cast< double >(val2);
   17587          48 :   {
   17588          48 :     const int bLocalUseExceptions = GetUseExceptions();
   17589          48 :     if ( bLocalUseExceptions ) {
   17590          47 :       pushErrorHandler();
   17591             :     }
   17592          48 :     {
   17593          48 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   17594          48 :       GDAL_GCP_GCPX_set(arg1,arg2);
   17595          48 :       SWIG_PYTHON_THREAD_END_ALLOW;
   17596             :     }
   17597          48 :     if ( bLocalUseExceptions ) {
   17598          47 :       popErrorHandler();
   17599             :     }
   17600             : #ifndef SED_HACKS
   17601             :     if ( bLocalUseExceptions ) {
   17602             :       CPLErr eclass = CPLGetLastErrorType();
   17603             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17604             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17605             :       }
   17606             :     }
   17607             : #endif
   17608             :   }
   17609          48 :   resultobj = SWIG_Py_Void();
   17610          48 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   17611             :   return resultobj;
   17612             : fail:
   17613             :   return NULL;
   17614             : }
   17615             : 
   17616             : 
   17617        2206 : SWIGINTERN PyObject *_wrap_GCP_GCPX_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17618        2206 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   17619        2206 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   17620        2206 :   void *argp1 = 0 ;
   17621        2206 :   int res1 = 0 ;
   17622        2206 :   PyObject *swig_obj[1] ;
   17623        2206 :   double result;
   17624             :   
   17625        2206 :   if (!args) SWIG_fail;
   17626        2206 :   swig_obj[0] = args;
   17627        2206 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   17628        2206 :   if (!SWIG_IsOK(res1)) {
   17629           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPX_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   17630             :   }
   17631        2206 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   17632        2206 :   {
   17633        2206 :     const int bLocalUseExceptions = GetUseExceptions();
   17634        2206 :     if ( bLocalUseExceptions ) {
   17635        2163 :       pushErrorHandler();
   17636             :     }
   17637        2206 :     {
   17638        2206 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   17639        2206 :       result = (double)GDAL_GCP_GCPX_get(arg1);
   17640        2206 :       SWIG_PYTHON_THREAD_END_ALLOW;
   17641             :     }
   17642        2206 :     if ( bLocalUseExceptions ) {
   17643        2163 :       popErrorHandler();
   17644             :     }
   17645             : #ifndef SED_HACKS
   17646             :     if ( bLocalUseExceptions ) {
   17647             :       CPLErr eclass = CPLGetLastErrorType();
   17648             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17649             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17650             :       }
   17651             :     }
   17652             : #endif
   17653             :   }
   17654        2206 :   resultobj = SWIG_From_double(static_cast< double >(result));
   17655        2206 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   17656             :   return resultobj;
   17657             : fail:
   17658             :   return NULL;
   17659             : }
   17660             : 
   17661             : 
   17662          48 : SWIGINTERN PyObject *_wrap_GCP_GCPY_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17663          48 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   17664          48 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   17665          48 :   double arg2 ;
   17666          48 :   void *argp1 = 0 ;
   17667          48 :   int res1 = 0 ;
   17668          48 :   double val2 ;
   17669          48 :   int ecode2 = 0 ;
   17670          48 :   PyObject *swig_obj[2] ;
   17671             :   
   17672          48 :   if (!SWIG_Python_UnpackTuple(args, "GCP_GCPY_set", 2, 2, swig_obj)) SWIG_fail;
   17673          48 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   17674          48 :   if (!SWIG_IsOK(res1)) {
   17675           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPY_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   17676             :   }
   17677          48 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   17678          48 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   17679          48 :   if (!SWIG_IsOK(ecode2)) {
   17680           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GCP_GCPY_set" "', argument " "2"" of type '" "double""'");
   17681             :   } 
   17682          48 :   arg2 = static_cast< double >(val2);
   17683          48 :   {
   17684          48 :     const int bLocalUseExceptions = GetUseExceptions();
   17685          48 :     if ( bLocalUseExceptions ) {
   17686          47 :       pushErrorHandler();
   17687             :     }
   17688          48 :     {
   17689          48 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   17690          48 :       GDAL_GCP_GCPY_set(arg1,arg2);
   17691          48 :       SWIG_PYTHON_THREAD_END_ALLOW;
   17692             :     }
   17693          48 :     if ( bLocalUseExceptions ) {
   17694          47 :       popErrorHandler();
   17695             :     }
   17696             : #ifndef SED_HACKS
   17697             :     if ( bLocalUseExceptions ) {
   17698             :       CPLErr eclass = CPLGetLastErrorType();
   17699             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17700             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17701             :       }
   17702             :     }
   17703             : #endif
   17704             :   }
   17705          48 :   resultobj = SWIG_Py_Void();
   17706          48 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   17707             :   return resultobj;
   17708             : fail:
   17709             :   return NULL;
   17710             : }
   17711             : 
   17712             : 
   17713        2206 : SWIGINTERN PyObject *_wrap_GCP_GCPY_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17714        2206 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   17715        2206 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   17716        2206 :   void *argp1 = 0 ;
   17717        2206 :   int res1 = 0 ;
   17718        2206 :   PyObject *swig_obj[1] ;
   17719        2206 :   double result;
   17720             :   
   17721        2206 :   if (!args) SWIG_fail;
   17722        2206 :   swig_obj[0] = args;
   17723        2206 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   17724        2206 :   if (!SWIG_IsOK(res1)) {
   17725           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPY_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   17726             :   }
   17727        2206 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   17728        2206 :   {
   17729        2206 :     const int bLocalUseExceptions = GetUseExceptions();
   17730        2206 :     if ( bLocalUseExceptions ) {
   17731        2163 :       pushErrorHandler();
   17732             :     }
   17733        2206 :     {
   17734        2206 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   17735        2206 :       result = (double)GDAL_GCP_GCPY_get(arg1);
   17736        2206 :       SWIG_PYTHON_THREAD_END_ALLOW;
   17737             :     }
   17738        2206 :     if ( bLocalUseExceptions ) {
   17739        2163 :       popErrorHandler();
   17740             :     }
   17741             : #ifndef SED_HACKS
   17742             :     if ( bLocalUseExceptions ) {
   17743             :       CPLErr eclass = CPLGetLastErrorType();
   17744             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17745             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17746             :       }
   17747             :     }
   17748             : #endif
   17749             :   }
   17750        2206 :   resultobj = SWIG_From_double(static_cast< double >(result));
   17751        2206 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   17752             :   return resultobj;
   17753             : fail:
   17754             :   return NULL;
   17755             : }
   17756             : 
   17757             : 
   17758           0 : SWIGINTERN PyObject *_wrap_GCP_GCPZ_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17759           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   17760           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   17761           0 :   double arg2 ;
   17762           0 :   void *argp1 = 0 ;
   17763           0 :   int res1 = 0 ;
   17764           0 :   double val2 ;
   17765           0 :   int ecode2 = 0 ;
   17766           0 :   PyObject *swig_obj[2] ;
   17767             :   
   17768           0 :   if (!SWIG_Python_UnpackTuple(args, "GCP_GCPZ_set", 2, 2, swig_obj)) SWIG_fail;
   17769           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   17770           0 :   if (!SWIG_IsOK(res1)) {
   17771           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPZ_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   17772             :   }
   17773           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   17774           0 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   17775           0 :   if (!SWIG_IsOK(ecode2)) {
   17776           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GCP_GCPZ_set" "', argument " "2"" of type '" "double""'");
   17777             :   } 
   17778           0 :   arg2 = static_cast< double >(val2);
   17779           0 :   {
   17780           0 :     const int bLocalUseExceptions = GetUseExceptions();
   17781           0 :     if ( bLocalUseExceptions ) {
   17782           0 :       pushErrorHandler();
   17783             :     }
   17784           0 :     {
   17785           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   17786           0 :       GDAL_GCP_GCPZ_set(arg1,arg2);
   17787           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   17788             :     }
   17789           0 :     if ( bLocalUseExceptions ) {
   17790           0 :       popErrorHandler();
   17791             :     }
   17792             : #ifndef SED_HACKS
   17793             :     if ( bLocalUseExceptions ) {
   17794             :       CPLErr eclass = CPLGetLastErrorType();
   17795             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17796             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17797             :       }
   17798             :     }
   17799             : #endif
   17800             :   }
   17801           0 :   resultobj = SWIG_Py_Void();
   17802           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   17803             :   return resultobj;
   17804             : fail:
   17805             :   return NULL;
   17806             : }
   17807             : 
   17808             : 
   17809          35 : SWIGINTERN PyObject *_wrap_GCP_GCPZ_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17810          35 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   17811          35 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   17812          35 :   void *argp1 = 0 ;
   17813          35 :   int res1 = 0 ;
   17814          35 :   PyObject *swig_obj[1] ;
   17815          35 :   double result;
   17816             :   
   17817          35 :   if (!args) SWIG_fail;
   17818          35 :   swig_obj[0] = args;
   17819          35 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   17820          35 :   if (!SWIG_IsOK(res1)) {
   17821           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPZ_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   17822             :   }
   17823          35 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   17824          35 :   {
   17825          35 :     const int bLocalUseExceptions = GetUseExceptions();
   17826          35 :     if ( bLocalUseExceptions ) {
   17827          22 :       pushErrorHandler();
   17828             :     }
   17829          35 :     {
   17830          35 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   17831          35 :       result = (double)GDAL_GCP_GCPZ_get(arg1);
   17832          35 :       SWIG_PYTHON_THREAD_END_ALLOW;
   17833             :     }
   17834          35 :     if ( bLocalUseExceptions ) {
   17835          22 :       popErrorHandler();
   17836             :     }
   17837             : #ifndef SED_HACKS
   17838             :     if ( bLocalUseExceptions ) {
   17839             :       CPLErr eclass = CPLGetLastErrorType();
   17840             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17841             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17842             :       }
   17843             :     }
   17844             : #endif
   17845             :   }
   17846          35 :   resultobj = SWIG_From_double(static_cast< double >(result));
   17847          35 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   17848             :   return resultobj;
   17849             : fail:
   17850             :   return NULL;
   17851             : }
   17852             : 
   17853             : 
   17854          56 : SWIGINTERN PyObject *_wrap_GCP_GCPPixel_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17855          56 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   17856          56 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   17857          56 :   double arg2 ;
   17858          56 :   void *argp1 = 0 ;
   17859          56 :   int res1 = 0 ;
   17860          56 :   double val2 ;
   17861          56 :   int ecode2 = 0 ;
   17862          56 :   PyObject *swig_obj[2] ;
   17863             :   
   17864          56 :   if (!SWIG_Python_UnpackTuple(args, "GCP_GCPPixel_set", 2, 2, swig_obj)) SWIG_fail;
   17865          56 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   17866          56 :   if (!SWIG_IsOK(res1)) {
   17867           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPPixel_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   17868             :   }
   17869          56 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   17870          56 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   17871          56 :   if (!SWIG_IsOK(ecode2)) {
   17872           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GCP_GCPPixel_set" "', argument " "2"" of type '" "double""'");
   17873             :   } 
   17874          56 :   arg2 = static_cast< double >(val2);
   17875          56 :   {
   17876          56 :     const int bLocalUseExceptions = GetUseExceptions();
   17877          56 :     if ( bLocalUseExceptions ) {
   17878          55 :       pushErrorHandler();
   17879             :     }
   17880          56 :     {
   17881          56 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   17882          56 :       GDAL_GCP_GCPPixel_set(arg1,arg2);
   17883          56 :       SWIG_PYTHON_THREAD_END_ALLOW;
   17884             :     }
   17885          56 :     if ( bLocalUseExceptions ) {
   17886          55 :       popErrorHandler();
   17887             :     }
   17888             : #ifndef SED_HACKS
   17889             :     if ( bLocalUseExceptions ) {
   17890             :       CPLErr eclass = CPLGetLastErrorType();
   17891             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17892             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17893             :       }
   17894             :     }
   17895             : #endif
   17896             :   }
   17897          56 :   resultobj = SWIG_Py_Void();
   17898          56 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   17899             :   return resultobj;
   17900             : fail:
   17901             :   return NULL;
   17902             : }
   17903             : 
   17904             : 
   17905        8555 : SWIGINTERN PyObject *_wrap_GCP_GCPPixel_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17906        8555 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   17907        8555 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   17908        8555 :   void *argp1 = 0 ;
   17909        8555 :   int res1 = 0 ;
   17910        8555 :   PyObject *swig_obj[1] ;
   17911        8555 :   double result;
   17912             :   
   17913        8555 :   if (!args) SWIG_fail;
   17914        8555 :   swig_obj[0] = args;
   17915        8555 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   17916        8555 :   if (!SWIG_IsOK(res1)) {
   17917           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPPixel_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   17918             :   }
   17919        8555 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   17920        8555 :   {
   17921        8555 :     const int bLocalUseExceptions = GetUseExceptions();
   17922        8555 :     if ( bLocalUseExceptions ) {
   17923        8512 :       pushErrorHandler();
   17924             :     }
   17925        8555 :     {
   17926        8555 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   17927        8555 :       result = (double)GDAL_GCP_GCPPixel_get(arg1);
   17928        8555 :       SWIG_PYTHON_THREAD_END_ALLOW;
   17929             :     }
   17930        8555 :     if ( bLocalUseExceptions ) {
   17931        8512 :       popErrorHandler();
   17932             :     }
   17933             : #ifndef SED_HACKS
   17934             :     if ( bLocalUseExceptions ) {
   17935             :       CPLErr eclass = CPLGetLastErrorType();
   17936             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17937             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17938             :       }
   17939             :     }
   17940             : #endif
   17941             :   }
   17942        8555 :   resultobj = SWIG_From_double(static_cast< double >(result));
   17943        8555 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   17944             :   return resultobj;
   17945             : fail:
   17946             :   return NULL;
   17947             : }
   17948             : 
   17949             : 
   17950          56 : SWIGINTERN PyObject *_wrap_GCP_GCPLine_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17951          56 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   17952          56 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   17953          56 :   double arg2 ;
   17954          56 :   void *argp1 = 0 ;
   17955          56 :   int res1 = 0 ;
   17956          56 :   double val2 ;
   17957          56 :   int ecode2 = 0 ;
   17958          56 :   PyObject *swig_obj[2] ;
   17959             :   
   17960          56 :   if (!SWIG_Python_UnpackTuple(args, "GCP_GCPLine_set", 2, 2, swig_obj)) SWIG_fail;
   17961          56 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   17962          56 :   if (!SWIG_IsOK(res1)) {
   17963           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPLine_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   17964             :   }
   17965          56 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   17966          56 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   17967          56 :   if (!SWIG_IsOK(ecode2)) {
   17968           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GCP_GCPLine_set" "', argument " "2"" of type '" "double""'");
   17969             :   } 
   17970          56 :   arg2 = static_cast< double >(val2);
   17971          56 :   {
   17972          56 :     const int bLocalUseExceptions = GetUseExceptions();
   17973          56 :     if ( bLocalUseExceptions ) {
   17974          55 :       pushErrorHandler();
   17975             :     }
   17976          56 :     {
   17977          56 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   17978          56 :       GDAL_GCP_GCPLine_set(arg1,arg2);
   17979          56 :       SWIG_PYTHON_THREAD_END_ALLOW;
   17980             :     }
   17981          56 :     if ( bLocalUseExceptions ) {
   17982          55 :       popErrorHandler();
   17983             :     }
   17984             : #ifndef SED_HACKS
   17985             :     if ( bLocalUseExceptions ) {
   17986             :       CPLErr eclass = CPLGetLastErrorType();
   17987             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17988             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17989             :       }
   17990             :     }
   17991             : #endif
   17992             :   }
   17993          56 :   resultobj = SWIG_Py_Void();
   17994          56 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   17995             :   return resultobj;
   17996             : fail:
   17997             :   return NULL;
   17998             : }
   17999             : 
   18000             : 
   18001        8555 : SWIGINTERN PyObject *_wrap_GCP_GCPLine_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   18002        8555 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   18003        8555 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   18004        8555 :   void *argp1 = 0 ;
   18005        8555 :   int res1 = 0 ;
   18006        8555 :   PyObject *swig_obj[1] ;
   18007        8555 :   double result;
   18008             :   
   18009        8555 :   if (!args) SWIG_fail;
   18010        8555 :   swig_obj[0] = args;
   18011        8555 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   18012        8555 :   if (!SWIG_IsOK(res1)) {
   18013           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPLine_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   18014             :   }
   18015        8555 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   18016        8555 :   {
   18017        8555 :     const int bLocalUseExceptions = GetUseExceptions();
   18018        8555 :     if ( bLocalUseExceptions ) {
   18019        8512 :       pushErrorHandler();
   18020             :     }
   18021        8555 :     {
   18022        8555 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   18023        8555 :       result = (double)GDAL_GCP_GCPLine_get(arg1);
   18024        8555 :       SWIG_PYTHON_THREAD_END_ALLOW;
   18025             :     }
   18026        8555 :     if ( bLocalUseExceptions ) {
   18027        8512 :       popErrorHandler();
   18028             :     }
   18029             : #ifndef SED_HACKS
   18030             :     if ( bLocalUseExceptions ) {
   18031             :       CPLErr eclass = CPLGetLastErrorType();
   18032             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   18033             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   18034             :       }
   18035             :     }
   18036             : #endif
   18037             :   }
   18038        8555 :   resultobj = SWIG_From_double(static_cast< double >(result));
   18039        8555 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   18040             :   return resultobj;
   18041             : fail:
   18042             :   return NULL;
   18043             : }
   18044             : 
   18045             : 
   18046           1 : SWIGINTERN PyObject *_wrap_GCP_Info_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   18047           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   18048           1 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   18049           1 :   char *arg2 = (char *) 0 ;
   18050           1 :   void *argp1 = 0 ;
   18051           1 :   int res1 = 0 ;
   18052           1 :   int res2 ;
   18053           1 :   char *buf2 = 0 ;
   18054           1 :   int alloc2 = 0 ;
   18055           1 :   PyObject *swig_obj[2] ;
   18056             :   
   18057           1 :   if (!SWIG_Python_UnpackTuple(args, "GCP_Info_set", 2, 2, swig_obj)) SWIG_fail;
   18058           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   18059           1 :   if (!SWIG_IsOK(res1)) {
   18060           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_Info_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   18061             :   }
   18062           1 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   18063           1 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   18064           1 :   if (!SWIG_IsOK(res2)) {
   18065           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GCP_Info_set" "', argument " "2"" of type '" "char *""'");
   18066             :   }
   18067           1 :   arg2 = reinterpret_cast< char * >(buf2);
   18068           1 :   {
   18069           1 :     const int bLocalUseExceptions = GetUseExceptions();
   18070           1 :     if ( bLocalUseExceptions ) {
   18071           1 :       pushErrorHandler();
   18072             :     }
   18073           1 :     {
   18074           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   18075           1 :       GDAL_GCP_Info_set(arg1,arg2);
   18076           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   18077             :     }
   18078           1 :     if ( bLocalUseExceptions ) {
   18079           1 :       popErrorHandler();
   18080             :     }
   18081             : #ifndef SED_HACKS
   18082             :     if ( bLocalUseExceptions ) {
   18083             :       CPLErr eclass = CPLGetLastErrorType();
   18084             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   18085             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   18086             :       }
   18087             :     }
   18088             : #endif
   18089             :   }
   18090           1 :   resultobj = SWIG_Py_Void();
   18091           1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   18092           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   18093             :   return resultobj;
   18094           0 : fail:
   18095           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   18096             :   return NULL;
   18097             : }
   18098             : 
   18099             : 
   18100           8 : SWIGINTERN PyObject *_wrap_GCP_Info_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   18101           8 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   18102           8 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   18103           8 :   void *argp1 = 0 ;
   18104           8 :   int res1 = 0 ;
   18105           8 :   PyObject *swig_obj[1] ;
   18106           8 :   char *result = 0 ;
   18107             :   
   18108           8 :   if (!args) SWIG_fail;
   18109           8 :   swig_obj[0] = args;
   18110           8 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   18111           8 :   if (!SWIG_IsOK(res1)) {
   18112           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_Info_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   18113             :   }
   18114           8 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   18115           8 :   {
   18116           8 :     const int bLocalUseExceptions = GetUseExceptions();
   18117           8 :     if ( bLocalUseExceptions ) {
   18118           4 :       pushErrorHandler();
   18119             :     }
   18120           8 :     {
   18121           8 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   18122           8 :       result = (char *)GDAL_GCP_Info_get(arg1);
   18123           8 :       SWIG_PYTHON_THREAD_END_ALLOW;
   18124             :     }
   18125           8 :     if ( bLocalUseExceptions ) {
   18126           4 :       popErrorHandler();
   18127             :     }
   18128             : #ifndef SED_HACKS
   18129             :     if ( bLocalUseExceptions ) {
   18130             :       CPLErr eclass = CPLGetLastErrorType();
   18131             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   18132             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   18133             :       }
   18134             :     }
   18135             : #endif
   18136             :   }
   18137           8 :   resultobj = SWIG_FromCharPtr((const char *)result);
   18138           8 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   18139             :   return resultobj;
   18140             : fail:
   18141             :   return NULL;
   18142             : }
   18143             : 
   18144             : 
   18145           1 : SWIGINTERN PyObject *_wrap_GCP_Id_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   18146           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   18147           1 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   18148           1 :   char *arg2 = (char *) 0 ;
   18149           1 :   void *argp1 = 0 ;
   18150           1 :   int res1 = 0 ;
   18151           1 :   int res2 ;
   18152           1 :   char *buf2 = 0 ;
   18153           1 :   int alloc2 = 0 ;
   18154           1 :   PyObject *swig_obj[2] ;
   18155             :   
   18156           1 :   if (!SWIG_Python_UnpackTuple(args, "GCP_Id_set", 2, 2, swig_obj)) SWIG_fail;
   18157           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   18158           1 :   if (!SWIG_IsOK(res1)) {
   18159           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_Id_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   18160             :   }
   18161           1 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   18162           1 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   18163           1 :   if (!SWIG_IsOK(res2)) {
   18164           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GCP_Id_set" "', argument " "2"" of type '" "char *""'");
   18165             :   }
   18166           1 :   arg2 = reinterpret_cast< char * >(buf2);
   18167           1 :   {
   18168           1 :     const int bLocalUseExceptions = GetUseExceptions();
   18169           1 :     if ( bLocalUseExceptions ) {
   18170           1 :       pushErrorHandler();
   18171             :     }
   18172           1 :     {
   18173           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   18174           1 :       GDAL_GCP_Id_set(arg1,arg2);
   18175           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   18176             :     }
   18177           1 :     if ( bLocalUseExceptions ) {
   18178           1 :       popErrorHandler();
   18179             :     }
   18180             : #ifndef SED_HACKS
   18181             :     if ( bLocalUseExceptions ) {
   18182             :       CPLErr eclass = CPLGetLastErrorType();
   18183             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   18184             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   18185             :       }
   18186             :     }
   18187             : #endif
   18188             :   }
   18189           1 :   resultobj = SWIG_Py_Void();
   18190           1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   18191           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   18192             :   return resultobj;
   18193           0 : fail:
   18194           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   18195             :   return NULL;
   18196             : }
   18197             : 
   18198             : 
   18199           8 : SWIGINTERN PyObject *_wrap_GCP_Id_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   18200           8 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   18201           8 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   18202           8 :   void *argp1 = 0 ;
   18203           8 :   int res1 = 0 ;
   18204           8 :   PyObject *swig_obj[1] ;
   18205           8 :   char *result = 0 ;
   18206             :   
   18207           8 :   if (!args) SWIG_fail;
   18208           8 :   swig_obj[0] = args;
   18209           8 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   18210           8 :   if (!SWIG_IsOK(res1)) {
   18211           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_Id_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   18212             :   }
   18213           8 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   18214           8 :   {
   18215           8 :     const int bLocalUseExceptions = GetUseExceptions();
   18216           8 :     if ( bLocalUseExceptions ) {
   18217           4 :       pushErrorHandler();
   18218             :     }
   18219           8 :     {
   18220           8 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   18221           8 :       result = (char *)GDAL_GCP_Id_get(arg1);
   18222           8 :       SWIG_PYTHON_THREAD_END_ALLOW;
   18223             :     }
   18224           8 :     if ( bLocalUseExceptions ) {
   18225           4 :       popErrorHandler();
   18226             :     }
   18227             : #ifndef SED_HACKS
   18228             :     if ( bLocalUseExceptions ) {
   18229             :       CPLErr eclass = CPLGetLastErrorType();
   18230             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   18231             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   18232             :       }
   18233             :     }
   18234             : #endif
   18235             :   }
   18236           8 :   resultobj = SWIG_FromCharPtr((const char *)result);
   18237           8 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   18238             :   return resultobj;
   18239             : fail:
   18240             :   return NULL;
   18241             : }
   18242             : 
   18243             : 
   18244          76 : SWIGINTERN PyObject *_wrap_new_GCP(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   18245          76 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   18246          76 :   double arg1 = (double) 0.0 ;
   18247          76 :   double arg2 = (double) 0.0 ;
   18248          76 :   double arg3 = (double) 0.0 ;
   18249          76 :   double arg4 = (double) 0.0 ;
   18250          76 :   double arg5 = (double) 0.0 ;
   18251          76 :   char *arg6 = (char *) "" ;
   18252          76 :   char *arg7 = (char *) "" ;
   18253          76 :   double val1 ;
   18254          76 :   int ecode1 = 0 ;
   18255          76 :   double val2 ;
   18256          76 :   int ecode2 = 0 ;
   18257          76 :   double val3 ;
   18258          76 :   int ecode3 = 0 ;
   18259          76 :   double val4 ;
   18260          76 :   int ecode4 = 0 ;
   18261          76 :   double val5 ;
   18262          76 :   int ecode5 = 0 ;
   18263          76 :   int res6 ;
   18264          76 :   char *buf6 = 0 ;
   18265          76 :   int alloc6 = 0 ;
   18266          76 :   int res7 ;
   18267          76 :   char *buf7 = 0 ;
   18268          76 :   int alloc7 = 0 ;
   18269          76 :   PyObject *swig_obj[7] ;
   18270          76 :   GDAL_GCP *result = 0 ;
   18271             :   
   18272          76 :   if (!SWIG_Python_UnpackTuple(args, "new_GCP", 0, 7, swig_obj)) SWIG_fail;
   18273          76 :   if (swig_obj[0]) {
   18274          28 :     ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
   18275          28 :     if (!SWIG_IsOK(ecode1)) {
   18276           0 :       SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_GCP" "', argument " "1"" of type '" "double""'");
   18277             :     } 
   18278          28 :     arg1 = static_cast< double >(val1);
   18279             :   }
   18280          76 :   if (swig_obj[1]) {
   18281          28 :     ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   18282          28 :     if (!SWIG_IsOK(ecode2)) {
   18283           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_GCP" "', argument " "2"" of type '" "double""'");
   18284             :     } 
   18285          28 :     arg2 = static_cast< double >(val2);
   18286             :   }
   18287          76 :   if (swig_obj[2]) {
   18288          28 :     ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
   18289          28 :     if (!SWIG_IsOK(ecode3)) {
   18290           0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_GCP" "', argument " "3"" of type '" "double""'");
   18291             :     } 
   18292          28 :     arg3 = static_cast< double >(val3);
   18293             :   }
   18294          76 :   if (swig_obj[3]) {
   18295          28 :     ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
   18296          28 :     if (!SWIG_IsOK(ecode4)) {
   18297           0 :       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_GCP" "', argument " "4"" of type '" "double""'");
   18298             :     } 
   18299          28 :     arg4 = static_cast< double >(val4);
   18300             :   }
   18301          76 :   if (swig_obj[4]) {
   18302          28 :     ecode5 = SWIG_AsVal_double(swig_obj[4], &val5);
   18303          28 :     if (!SWIG_IsOK(ecode5)) {
   18304           0 :       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_GCP" "', argument " "5"" of type '" "double""'");
   18305             :     } 
   18306          28 :     arg5 = static_cast< double >(val5);
   18307             :   }
   18308          76 :   if (swig_obj[5]) {
   18309           0 :     res6 = SWIG_AsCharPtrAndSize(swig_obj[5], &buf6, NULL, &alloc6);
   18310           0 :     if (!SWIG_IsOK(res6)) {
   18311           0 :       SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_GCP" "', argument " "6"" of type '" "char const *""'");
   18312             :     }
   18313           0 :     arg6 = reinterpret_cast< char * >(buf6);
   18314             :   }
   18315          76 :   if (swig_obj[6]) {
   18316           0 :     res7 = SWIG_AsCharPtrAndSize(swig_obj[6], &buf7, NULL, &alloc7);
   18317           0 :     if (!SWIG_IsOK(res7)) {
   18318           0 :       SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_GCP" "', argument " "7"" of type '" "char const *""'");
   18319             :     }
   18320           0 :     arg7 = reinterpret_cast< char * >(buf7);
   18321             :   }
   18322          76 :   {
   18323          76 :     const int bLocalUseExceptions = GetUseExceptions();
   18324          76 :     if ( bLocalUseExceptions ) {
   18325          68 :       pushErrorHandler();
   18326             :     }
   18327          76 :     {
   18328          76 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   18329          76 :       result = (GDAL_GCP *)new_GDAL_GCP(arg1,arg2,arg3,arg4,arg5,(char const *)arg6,(char const *)arg7);
   18330          76 :       SWIG_PYTHON_THREAD_END_ALLOW;
   18331             :     }
   18332          76 :     if ( bLocalUseExceptions ) {
   18333          68 :       popErrorHandler();
   18334             :     }
   18335             : #ifndef SED_HACKS
   18336             :     if ( bLocalUseExceptions ) {
   18337             :       CPLErr eclass = CPLGetLastErrorType();
   18338             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   18339             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   18340             :       }
   18341             :     }
   18342             : #endif
   18343             :   }
   18344          76 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_NEW |  0 );
   18345          76 :   if (alloc6 == SWIG_NEWOBJ) delete[] buf6;
   18346          76 :   if (alloc7 == SWIG_NEWOBJ) delete[] buf7;
   18347          76 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   18348             :   return resultobj;
   18349           0 : fail:
   18350           0 :   if (alloc6 == SWIG_NEWOBJ) delete[] buf6;
   18351           0 :   if (alloc7 == SWIG_NEWOBJ) delete[] buf7;
   18352             :   return NULL;
   18353             : }
   18354             : 
   18355             : 
   18356        2550 : SWIGINTERN PyObject *_wrap_delete_GCP(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   18357        2550 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   18358        2550 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   18359        2550 :   void *argp1 = 0 ;
   18360        2550 :   int res1 = 0 ;
   18361        2550 :   PyObject *swig_obj[1] ;
   18362             :   
   18363        2550 :   if (!args) SWIG_fail;
   18364        2550 :   swig_obj[0] = args;
   18365        2550 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_DISOWN |  0 );
   18366        2550 :   if (!SWIG_IsOK(res1)) {
   18367           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GCP" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   18368             :   }
   18369        2550 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   18370        2550 :   {
   18371        2550 :     const int bLocalUseExceptions = GetUseExceptions();
   18372        2550 :     if ( bLocalUseExceptions ) {
   18373        2430 :       pushErrorHandler();
   18374             :     }
   18375        2550 :     {
   18376        2550 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   18377        2550 :       delete_GDAL_GCP(arg1);
   18378        2550 :       SWIG_PYTHON_THREAD_END_ALLOW;
   18379             :     }
   18380        2550 :     if ( bLocalUseExceptions ) {
   18381        2430 :       popErrorHandler();
   18382             :     }
   18383             : #ifndef SED_HACKS
   18384             :     if ( bLocalUseExceptions ) {
   18385             :       CPLErr eclass = CPLGetLastErrorType();
   18386             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   18387             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   18388             :       }
   18389             :     }
   18390             : #endif
   18391             :   }
   18392        2550 :   resultobj = SWIG_Py_Void();
   18393        2550 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   18394             :   return resultobj;
   18395             : fail:
   18396             :   return NULL;
   18397             : }
   18398             : 
   18399             : 
   18400         271 : SWIGINTERN PyObject *GCP_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   18401         271 :   PyObject *obj;
   18402         271 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   18403         271 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDAL_GCP, SWIG_NewClientData(obj));
   18404         271 :   return SWIG_Py_Void();
   18405             : }
   18406             : 
   18407          76 : SWIGINTERN PyObject *GCP_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   18408          76 :   return SWIG_Python_InitShadowInstance(args);
   18409             : }
   18410             : 
   18411           0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPX_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   18412           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   18413           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   18414           0 :   void *argp1 = 0 ;
   18415           0 :   int res1 = 0 ;
   18416           0 :   PyObject *swig_obj[1] ;
   18417           0 :   double result;
   18418             :   
   18419           0 :   if (!args) SWIG_fail;
   18420           0 :   swig_obj[0] = args;
   18421           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   18422           0 :   if (!SWIG_IsOK(res1)) {
   18423           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPX_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   18424             :   }
   18425           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   18426           0 :   {
   18427           0 :     if (!arg1) {
   18428           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   18429             :     }
   18430             :   }
   18431           0 :   {
   18432           0 :     const int bLocalUseExceptions = GetUseExceptions();
   18433           0 :     if ( bLocalUseExceptions ) {
   18434           0 :       pushErrorHandler();
   18435             :     }
   18436           0 :     {
   18437           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   18438           0 :       result = (double)GDAL_GCP_GCPX_get(arg1);
   18439           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   18440             :     }
   18441           0 :     if ( bLocalUseExceptions ) {
   18442           0 :       popErrorHandler();
   18443             :     }
   18444             : #ifndef SED_HACKS
   18445             :     if ( bLocalUseExceptions ) {
   18446             :       CPLErr eclass = CPLGetLastErrorType();
   18447             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   18448             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   18449             :       }
   18450             :     }
   18451             : #endif
   18452             :   }
   18453           0 :   resultobj = SWIG_From_double(static_cast< double >(result));
   18454           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   18455             :   return resultobj;
   18456             : fail:
   18457             :   return NULL;
   18458             : }
   18459             : 
   18460             : 
   18461           0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPX_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   18462           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   18463           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   18464           0 :   double arg2 ;
   18465           0 :   void *argp1 = 0 ;
   18466           0 :   int res1 = 0 ;
   18467           0 :   double val2 ;
   18468           0 :   int ecode2 = 0 ;
   18469           0 :   PyObject *swig_obj[2] ;
   18470             :   
   18471           0 :   if (!SWIG_Python_UnpackTuple(args, "GDAL_GCP_GCPX_set", 2, 2, swig_obj)) SWIG_fail;
   18472           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   18473           0 :   if (!SWIG_IsOK(res1)) {
   18474           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPX_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   18475             :   }
   18476           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   18477           0 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   18478           0 :   if (!SWIG_IsOK(ecode2)) {
   18479           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GDAL_GCP_GCPX_set" "', argument " "2"" of type '" "double""'");
   18480             :   } 
   18481           0 :   arg2 = static_cast< double >(val2);
   18482           0 :   {
   18483           0 :     if (!arg1) {
   18484           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   18485             :     }
   18486             :   }
   18487           0 :   {
   18488           0 :     const int bLocalUseExceptions = GetUseExceptions();
   18489           0 :     if ( bLocalUseExceptions ) {
   18490           0 :       pushErrorHandler();
   18491             :     }
   18492           0 :     {
   18493           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   18494           0 :       GDAL_GCP_GCPX_set(arg1,arg2);
   18495           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   18496             :     }
   18497           0 :     if ( bLocalUseExceptions ) {
   18498           0 :       popErrorHandler();
   18499             :     }
   18500             : #ifndef SED_HACKS
   18501             :     if ( bLocalUseExceptions ) {
   18502             :       CPLErr eclass = CPLGetLastErrorType();
   18503             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   18504             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   18505             :       }
   18506             :     }
   18507             : #endif
   18508             :   }
   18509           0 :   resultobj = SWIG_Py_Void();
   18510           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   18511             :   return resultobj;
   18512             : fail:
   18513             :   return NULL;
   18514             : }
   18515             : 
   18516             : 
   18517           0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPY_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   18518           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   18519           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   18520           0 :   void *argp1 = 0 ;
   18521           0 :   int res1 = 0 ;
   18522           0 :   PyObject *swig_obj[1] ;
   18523           0 :   double result;
   18524             :   
   18525           0 :   if (!args) SWIG_fail;
   18526           0 :   swig_obj[0] = args;
   18527           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   18528           0 :   if (!SWIG_IsOK(res1)) {
   18529           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPY_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   18530             :   }
   18531           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   18532           0 :   {
   18533           0 :     if (!arg1) {
   18534           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   18535             :     }
   18536             :   }
   18537           0 :   {
   18538           0 :     const int bLocalUseExceptions = GetUseExceptions();
   18539           0 :     if ( bLocalUseExceptions ) {
   18540           0 :       pushErrorHandler();
   18541             :     }
   18542           0 :     {
   18543           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   18544           0 :       result = (double)GDAL_GCP_GCPY_get(arg1);
   18545           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   18546             :     }
   18547           0 :     if ( bLocalUseExceptions ) {
   18548           0 :       popErrorHandler();
   18549             :     }
   18550             : #ifndef SED_HACKS
   18551             :     if ( bLocalUseExceptions ) {
   18552             :       CPLErr eclass = CPLGetLastErrorType();
   18553             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   18554             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   18555             :       }
   18556             :     }
   18557             : #endif
   18558             :   }
   18559           0 :   resultobj = SWIG_From_double(static_cast< double >(result));
   18560           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   18561             :   return resultobj;
   18562             : fail:
   18563             :   return NULL;
   18564             : }
   18565             : 
   18566             : 
   18567           0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPY_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   18568           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   18569           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   18570           0 :   double arg2 ;
   18571           0 :   void *argp1 = 0 ;
   18572           0 :   int res1 = 0 ;
   18573           0 :   double val2 ;
   18574           0 :   int ecode2 = 0 ;
   18575           0 :   PyObject *swig_obj[2] ;
   18576             :   
   18577           0 :   if (!SWIG_Python_UnpackTuple(args, "GDAL_GCP_GCPY_set", 2, 2, swig_obj)) SWIG_fail;
   18578           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   18579           0 :   if (!SWIG_IsOK(res1)) {
   18580           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPY_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   18581             :   }
   18582           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   18583           0 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   18584           0 :   if (!SWIG_IsOK(ecode2)) {
   18585           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GDAL_GCP_GCPY_set" "', argument " "2"" of type '" "double""'");
   18586             :   } 
   18587           0 :   arg2 = static_cast< double >(val2);
   18588           0 :   {
   18589           0 :     if (!arg1) {
   18590           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   18591             :     }
   18592             :   }
   18593           0 :   {
   18594           0 :     const int bLocalUseExceptions = GetUseExceptions();
   18595           0 :     if ( bLocalUseExceptions ) {
   18596           0 :       pushErrorHandler();
   18597             :     }
   18598           0 :     {
   18599           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   18600           0 :       GDAL_GCP_GCPY_set(arg1,arg2);
   18601           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   18602             :     }
   18603           0 :     if ( bLocalUseExceptions ) {
   18604           0 :       popErrorHandler();
   18605             :     }
   18606             : #ifndef SED_HACKS
   18607             :     if ( bLocalUseExceptions ) {
   18608             :       CPLErr eclass = CPLGetLastErrorType();
   18609             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   18610             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   18611             :       }
   18612             :     }
   18613             : #endif
   18614             :   }
   18615           0 :   resultobj = SWIG_Py_Void();
   18616           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   18617             :   return resultobj;
   18618             : fail:
   18619             :   return NULL;
   18620             : }
   18621             : 
   18622             : 
   18623           0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPZ_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   18624           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   18625           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   18626           0 :   void *argp1 = 0 ;
   18627           0 :   int res1 = 0 ;
   18628           0 :   PyObject *swig_obj[1] ;
   18629           0 :   double result;
   18630             :   
   18631           0 :   if (!args) SWIG_fail;
   18632           0 :   swig_obj[0] = args;
   18633           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   18634           0 :   if (!SWIG_IsOK(res1)) {
   18635           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPZ_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   18636             :   }
   18637           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   18638           0 :   {
   18639           0 :     if (!arg1) {
   18640           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   18641             :     }
   18642             :   }
   18643           0 :   {
   18644           0 :     const int bLocalUseExceptions = GetUseExceptions();
   18645           0 :     if ( bLocalUseExceptions ) {
   18646           0 :       pushErrorHandler();
   18647             :     }
   18648           0 :     {
   18649           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   18650           0 :       result = (double)GDAL_GCP_GCPZ_get(arg1);
   18651           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   18652             :     }
   18653           0 :     if ( bLocalUseExceptions ) {
   18654           0 :       popErrorHandler();
   18655             :     }
   18656             : #ifndef SED_HACKS
   18657             :     if ( bLocalUseExceptions ) {
   18658             :       CPLErr eclass = CPLGetLastErrorType();
   18659             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   18660             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   18661             :       }
   18662             :     }
   18663             : #endif
   18664             :   }
   18665           0 :   resultobj = SWIG_From_double(static_cast< double >(result));
   18666           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   18667             :   return resultobj;
   18668             : fail:
   18669             :   return NULL;
   18670             : }
   18671             : 
   18672             : 
   18673           0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPZ_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   18674           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   18675           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   18676           0 :   double arg2 ;
   18677           0 :   void *argp1 = 0 ;
   18678           0 :   int res1 = 0 ;
   18679           0 :   double val2 ;
   18680           0 :   int ecode2 = 0 ;
   18681           0 :   PyObject *swig_obj[2] ;
   18682             :   
   18683           0 :   if (!SWIG_Python_UnpackTuple(args, "GDAL_GCP_GCPZ_set", 2, 2, swig_obj)) SWIG_fail;
   18684           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   18685           0 :   if (!SWIG_IsOK(res1)) {
   18686           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPZ_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   18687             :   }
   18688           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   18689           0 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   18690           0 :   if (!SWIG_IsOK(ecode2)) {
   18691           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GDAL_GCP_GCPZ_set" "', argument " "2"" of type '" "double""'");
   18692             :   } 
   18693           0 :   arg2 = static_cast< double >(val2);
   18694           0 :   {
   18695           0 :     if (!arg1) {
   18696           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   18697             :     }
   18698             :   }
   18699           0 :   {
   18700           0 :     const int bLocalUseExceptions = GetUseExceptions();
   18701           0 :     if ( bLocalUseExceptions ) {
   18702           0 :       pushErrorHandler();
   18703             :     }
   18704           0 :     {
   18705           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   18706           0 :       GDAL_GCP_GCPZ_set(arg1,arg2);
   18707           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   18708             :     }
   18709           0 :     if ( bLocalUseExceptions ) {
   18710           0 :       popErrorHandler();
   18711             :     }
   18712             : #ifndef SED_HACKS
   18713             :     if ( bLocalUseExceptions ) {
   18714             :       CPLErr eclass = CPLGetLastErrorType();
   18715             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   18716             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   18717             :       }
   18718             :     }
   18719             : #endif
   18720             :   }
   18721           0 :   resultobj = SWIG_Py_Void();
   18722           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   18723             :   return resultobj;
   18724             : fail:
   18725             :   return NULL;
   18726             : }
   18727             : 
   18728             : 
   18729           0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPPixel_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   18730           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   18731           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   18732           0 :   void *argp1 = 0 ;
   18733           0 :   int res1 = 0 ;
   18734           0 :   PyObject *swig_obj[1] ;
   18735           0 :   double result;
   18736             :   
   18737           0 :   if (!args) SWIG_fail;
   18738           0 :   swig_obj[0] = args;
   18739           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   18740           0 :   if (!SWIG_IsOK(res1)) {
   18741           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPPixel_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   18742             :   }
   18743           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   18744           0 :   {
   18745           0 :     if (!arg1) {
   18746           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   18747             :     }
   18748             :   }
   18749           0 :   {
   18750           0 :     const int bLocalUseExceptions = GetUseExceptions();
   18751           0 :     if ( bLocalUseExceptions ) {
   18752           0 :       pushErrorHandler();
   18753             :     }
   18754           0 :     {
   18755           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   18756           0 :       result = (double)GDAL_GCP_GCPPixel_get(arg1);
   18757           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   18758             :     }
   18759           0 :     if ( bLocalUseExceptions ) {
   18760           0 :       popErrorHandler();
   18761             :     }
   18762             : #ifndef SED_HACKS
   18763             :     if ( bLocalUseExceptions ) {
   18764             :       CPLErr eclass = CPLGetLastErrorType();
   18765             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   18766             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   18767             :       }
   18768             :     }
   18769             : #endif
   18770             :   }
   18771           0 :   resultobj = SWIG_From_double(static_cast< double >(result));
   18772           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   18773             :   return resultobj;
   18774             : fail:
   18775             :   return NULL;
   18776             : }
   18777             : 
   18778             : 
   18779           0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPPixel_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   18780           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   18781           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   18782           0 :   double arg2 ;
   18783           0 :   void *argp1 = 0 ;
   18784           0 :   int res1 = 0 ;
   18785           0 :   double val2 ;
   18786           0 :   int ecode2 = 0 ;
   18787           0 :   PyObject *swig_obj[2] ;
   18788             :   
   18789           0 :   if (!SWIG_Python_UnpackTuple(args, "GDAL_GCP_GCPPixel_set", 2, 2, swig_obj)) SWIG_fail;
   18790           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   18791           0 :   if (!SWIG_IsOK(res1)) {
   18792           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPPixel_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   18793             :   }
   18794           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   18795           0 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   18796           0 :   if (!SWIG_IsOK(ecode2)) {
   18797           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GDAL_GCP_GCPPixel_set" "', argument " "2"" of type '" "double""'");
   18798             :   } 
   18799           0 :   arg2 = static_cast< double >(val2);
   18800           0 :   {
   18801           0 :     if (!arg1) {
   18802           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   18803             :     }
   18804             :   }
   18805           0 :   {
   18806           0 :     const int bLocalUseExceptions = GetUseExceptions();
   18807           0 :     if ( bLocalUseExceptions ) {
   18808           0 :       pushErrorHandler();
   18809             :     }
   18810           0 :     {
   18811           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   18812           0 :       GDAL_GCP_GCPPixel_set(arg1,arg2);
   18813           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   18814             :     }
   18815           0 :     if ( bLocalUseExceptions ) {
   18816           0 :       popErrorHandler();
   18817             :     }
   18818             : #ifndef SED_HACKS
   18819             :     if ( bLocalUseExceptions ) {
   18820             :       CPLErr eclass = CPLGetLastErrorType();
   18821             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   18822             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   18823             :       }
   18824             :     }
   18825             : #endif
   18826             :   }
   18827           0 :   resultobj = SWIG_Py_Void();
   18828           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   18829             :   return resultobj;
   18830             : fail:
   18831             :   return NULL;
   18832             : }
   18833             : 
   18834             : 
   18835           0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPLine_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   18836           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   18837           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   18838           0 :   void *argp1 = 0 ;
   18839           0 :   int res1 = 0 ;
   18840           0 :   PyObject *swig_obj[1] ;
   18841           0 :   double result;
   18842             :   
   18843           0 :   if (!args) SWIG_fail;
   18844           0 :   swig_obj[0] = args;
   18845           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   18846           0 :   if (!SWIG_IsOK(res1)) {
   18847           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPLine_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   18848             :   }
   18849           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   18850           0 :   {
   18851           0 :     if (!arg1) {
   18852           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   18853             :     }
   18854             :   }
   18855           0 :   {
   18856           0 :     const int bLocalUseExceptions = GetUseExceptions();
   18857           0 :     if ( bLocalUseExceptions ) {
   18858           0 :       pushErrorHandler();
   18859             :     }
   18860           0 :     {
   18861           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   18862           0 :       result = (double)GDAL_GCP_GCPLine_get(arg1);
   18863           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   18864             :     }
   18865           0 :     if ( bLocalUseExceptions ) {
   18866           0 :       popErrorHandler();
   18867             :     }
   18868             : #ifndef SED_HACKS
   18869             :     if ( bLocalUseExceptions ) {
   18870             :       CPLErr eclass = CPLGetLastErrorType();
   18871             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   18872             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   18873             :       }
   18874             :     }
   18875             : #endif
   18876             :   }
   18877           0 :   resultobj = SWIG_From_double(static_cast< double >(result));
   18878           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   18879             :   return resultobj;
   18880             : fail:
   18881             :   return NULL;
   18882             : }
   18883             : 
   18884             : 
   18885           0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPLine_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   18886           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   18887           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   18888           0 :   double arg2 ;
   18889           0 :   void *argp1 = 0 ;
   18890           0 :   int res1 = 0 ;
   18891           0 :   double val2 ;
   18892           0 :   int ecode2 = 0 ;
   18893           0 :   PyObject *swig_obj[2] ;
   18894             :   
   18895           0 :   if (!SWIG_Python_UnpackTuple(args, "GDAL_GCP_GCPLine_set", 2, 2, swig_obj)) SWIG_fail;
   18896           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   18897           0 :   if (!SWIG_IsOK(res1)) {
   18898           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPLine_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   18899             :   }
   18900           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   18901           0 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   18902           0 :   if (!SWIG_IsOK(ecode2)) {
   18903           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GDAL_GCP_GCPLine_set" "', argument " "2"" of type '" "double""'");
   18904             :   } 
   18905           0 :   arg2 = static_cast< double >(val2);
   18906           0 :   {
   18907           0 :     if (!arg1) {
   18908           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   18909             :     }
   18910             :   }
   18911           0 :   {
   18912           0 :     const int bLocalUseExceptions = GetUseExceptions();
   18913           0 :     if ( bLocalUseExceptions ) {
   18914           0 :       pushErrorHandler();
   18915             :     }
   18916           0 :     {
   18917           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   18918           0 :       GDAL_GCP_GCPLine_set(arg1,arg2);
   18919           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   18920             :     }
   18921           0 :     if ( bLocalUseExceptions ) {
   18922           0 :       popErrorHandler();
   18923             :     }
   18924             : #ifndef SED_HACKS
   18925             :     if ( bLocalUseExceptions ) {
   18926             :       CPLErr eclass = CPLGetLastErrorType();
   18927             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   18928             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   18929             :       }
   18930             :     }
   18931             : #endif
   18932             :   }
   18933           0 :   resultobj = SWIG_Py_Void();
   18934           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   18935             :   return resultobj;
   18936             : fail:
   18937             :   return NULL;
   18938             : }
   18939             : 
   18940             : 
   18941           0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_Info_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   18942           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   18943           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   18944           0 :   void *argp1 = 0 ;
   18945           0 :   int res1 = 0 ;
   18946           0 :   PyObject *swig_obj[1] ;
   18947           0 :   char *result = 0 ;
   18948             :   
   18949           0 :   if (!args) SWIG_fail;
   18950           0 :   swig_obj[0] = args;
   18951           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   18952           0 :   if (!SWIG_IsOK(res1)) {
   18953           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_Info_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   18954             :   }
   18955           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   18956           0 :   {
   18957           0 :     if (!arg1) {
   18958           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   18959             :     }
   18960             :   }
   18961           0 :   {
   18962           0 :     const int bLocalUseExceptions = GetUseExceptions();
   18963           0 :     if ( bLocalUseExceptions ) {
   18964           0 :       pushErrorHandler();
   18965             :     }
   18966           0 :     {
   18967           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   18968           0 :       result = (char *)GDAL_GCP_Info_get(arg1);
   18969           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   18970             :     }
   18971           0 :     if ( bLocalUseExceptions ) {
   18972           0 :       popErrorHandler();
   18973             :     }
   18974             : #ifndef SED_HACKS
   18975             :     if ( bLocalUseExceptions ) {
   18976             :       CPLErr eclass = CPLGetLastErrorType();
   18977             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   18978             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   18979             :       }
   18980             :     }
   18981             : #endif
   18982             :   }
   18983           0 :   resultobj = SWIG_FromCharPtr((const char *)result);
   18984           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   18985             :   return resultobj;
   18986             : fail:
   18987             :   return NULL;
   18988             : }
   18989             : 
   18990             : 
   18991           0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_Info_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   18992           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   18993           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   18994           0 :   char *arg2 = (char *) 0 ;
   18995           0 :   void *argp1 = 0 ;
   18996           0 :   int res1 = 0 ;
   18997           0 :   int res2 ;
   18998           0 :   char *buf2 = 0 ;
   18999           0 :   int alloc2 = 0 ;
   19000           0 :   PyObject *swig_obj[2] ;
   19001             :   
   19002           0 :   if (!SWIG_Python_UnpackTuple(args, "GDAL_GCP_Info_set", 2, 2, swig_obj)) SWIG_fail;
   19003           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   19004           0 :   if (!SWIG_IsOK(res1)) {
   19005           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_Info_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   19006             :   }
   19007           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   19008           0 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   19009           0 :   if (!SWIG_IsOK(res2)) {
   19010           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GDAL_GCP_Info_set" "', argument " "2"" of type '" "char const *""'");
   19011             :   }
   19012           0 :   arg2 = reinterpret_cast< char * >(buf2);
   19013           0 :   {
   19014           0 :     if (!arg1) {
   19015           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   19016             :     }
   19017             :   }
   19018           0 :   {
   19019           0 :     const int bLocalUseExceptions = GetUseExceptions();
   19020           0 :     if ( bLocalUseExceptions ) {
   19021           0 :       pushErrorHandler();
   19022             :     }
   19023           0 :     {
   19024           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19025           0 :       GDAL_GCP_Info_set(arg1,(char const *)arg2);
   19026           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   19027             :     }
   19028           0 :     if ( bLocalUseExceptions ) {
   19029           0 :       popErrorHandler();
   19030             :     }
   19031             : #ifndef SED_HACKS
   19032             :     if ( bLocalUseExceptions ) {
   19033             :       CPLErr eclass = CPLGetLastErrorType();
   19034             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19035             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19036             :       }
   19037             :     }
   19038             : #endif
   19039             :   }
   19040           0 :   resultobj = SWIG_Py_Void();
   19041           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   19042           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   19043             :   return resultobj;
   19044           0 : fail:
   19045           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   19046             :   return NULL;
   19047             : }
   19048             : 
   19049             : 
   19050           0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_Id_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19051           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19052           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   19053           0 :   void *argp1 = 0 ;
   19054           0 :   int res1 = 0 ;
   19055           0 :   PyObject *swig_obj[1] ;
   19056           0 :   char *result = 0 ;
   19057             :   
   19058           0 :   if (!args) SWIG_fail;
   19059           0 :   swig_obj[0] = args;
   19060           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   19061           0 :   if (!SWIG_IsOK(res1)) {
   19062           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_Id_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   19063             :   }
   19064           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   19065           0 :   {
   19066           0 :     if (!arg1) {
   19067           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   19068             :     }
   19069             :   }
   19070           0 :   {
   19071           0 :     const int bLocalUseExceptions = GetUseExceptions();
   19072           0 :     if ( bLocalUseExceptions ) {
   19073           0 :       pushErrorHandler();
   19074             :     }
   19075           0 :     {
   19076           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19077           0 :       result = (char *)GDAL_GCP_Id_get(arg1);
   19078           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   19079             :     }
   19080           0 :     if ( bLocalUseExceptions ) {
   19081           0 :       popErrorHandler();
   19082             :     }
   19083             : #ifndef SED_HACKS
   19084             :     if ( bLocalUseExceptions ) {
   19085             :       CPLErr eclass = CPLGetLastErrorType();
   19086             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19087             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19088             :       }
   19089             :     }
   19090             : #endif
   19091             :   }
   19092           0 :   resultobj = SWIG_FromCharPtr((const char *)result);
   19093           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   19094             :   return resultobj;
   19095             : fail:
   19096             :   return NULL;
   19097             : }
   19098             : 
   19099             : 
   19100           0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_Id_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19101           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19102           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   19103           0 :   char *arg2 = (char *) 0 ;
   19104           0 :   void *argp1 = 0 ;
   19105           0 :   int res1 = 0 ;
   19106           0 :   int res2 ;
   19107           0 :   char *buf2 = 0 ;
   19108           0 :   int alloc2 = 0 ;
   19109           0 :   PyObject *swig_obj[2] ;
   19110             :   
   19111           0 :   if (!SWIG_Python_UnpackTuple(args, "GDAL_GCP_Id_set", 2, 2, swig_obj)) SWIG_fail;
   19112           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   19113           0 :   if (!SWIG_IsOK(res1)) {
   19114           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_Id_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   19115             :   }
   19116           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   19117           0 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   19118           0 :   if (!SWIG_IsOK(res2)) {
   19119           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GDAL_GCP_Id_set" "', argument " "2"" of type '" "char const *""'");
   19120             :   }
   19121           0 :   arg2 = reinterpret_cast< char * >(buf2);
   19122           0 :   {
   19123           0 :     if (!arg1) {
   19124           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   19125             :     }
   19126             :   }
   19127           0 :   {
   19128           0 :     const int bLocalUseExceptions = GetUseExceptions();
   19129           0 :     if ( bLocalUseExceptions ) {
   19130           0 :       pushErrorHandler();
   19131             :     }
   19132           0 :     {
   19133           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19134           0 :       GDAL_GCP_Id_set(arg1,(char const *)arg2);
   19135           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   19136             :     }
   19137           0 :     if ( bLocalUseExceptions ) {
   19138           0 :       popErrorHandler();
   19139             :     }
   19140             : #ifndef SED_HACKS
   19141             :     if ( bLocalUseExceptions ) {
   19142             :       CPLErr eclass = CPLGetLastErrorType();
   19143             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19144             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19145             :       }
   19146             :     }
   19147             : #endif
   19148             :   }
   19149           0 :   resultobj = SWIG_Py_Void();
   19150           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   19151           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   19152             :   return resultobj;
   19153           0 : fail:
   19154           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   19155             :   return NULL;
   19156             : }
   19157             : 
   19158             : 
   19159           8 : SWIGINTERN PyObject *_wrap_GCPsToGeoTransform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19160           8 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19161           8 :   int arg1 ;
   19162           8 :   GDAL_GCP *arg2 = (GDAL_GCP *) 0 ;
   19163           8 :   double *arg3 ;
   19164           8 :   int arg4 = (int) 1 ;
   19165           8 :   GDAL_GCP *tmpGCPList1 ;
   19166           8 :   double argout3[6] ;
   19167           8 :   int val4 ;
   19168           8 :   int ecode4 = 0 ;
   19169           8 :   PyObject *swig_obj[2] ;
   19170           8 :   RETURN_NONE result;
   19171             :   
   19172           8 :   {
   19173             :     /* %typemap(in,numinputs=0) (double argout3[ANY]) */
   19174           8 :     memset(argout3, 0, sizeof(argout3));
   19175           8 :     arg3 = argout3;
   19176             :   }
   19177           8 :   if (!SWIG_Python_UnpackTuple(args, "GCPsToGeoTransform", 1, 2, swig_obj)) SWIG_fail;
   19178           8 :   {
   19179             :     /* %typemap(in,numinputs=1) (int nGCPs, GDAL_GCP const *pGCPs ) */
   19180             :     /* check if is List */
   19181           8 :     if ( !PySequence_Check(swig_obj[0]) ) {
   19182           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   19183           0 :       SWIG_fail;
   19184             :     }
   19185           8 :     Py_ssize_t size = PySequence_Size(swig_obj[0]);
   19186           8 :     if( size > (Py_ssize_t)INT_MAX ) {
   19187           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   19188           0 :       SWIG_fail;
   19189             :     }
   19190           8 :     if( (size_t)size > SIZE_MAX / sizeof(GDAL_GCP) ) {
   19191           0 :       PyErr_SetString(PyExc_RuntimeError, "too big sequence");
   19192           0 :       SWIG_fail;
   19193             :     }
   19194           8 :     arg1 = (int)size;
   19195           8 :     tmpGCPList1 = (GDAL_GCP*) malloc(arg1*sizeof(GDAL_GCP));
   19196           8 :     if( !tmpGCPList1 ) {
   19197           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   19198           0 :       SWIG_fail;
   19199             :     }
   19200          36 :     arg2 = tmpGCPList1;
   19201          36 :     for( int i = 0; i<arg1; i++ ) {
   19202          28 :       PyObject *o = PySequence_GetItem(swig_obj[0],i);
   19203          28 :       GDAL_GCP *item = 0;
   19204          28 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&item, SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_EXCEPTION | 0 ));
   19205          28 :       if ( ! item ) {
   19206           0 :         Py_DECREF(o);
   19207           0 :         SWIG_fail;
   19208             :       }
   19209          28 :       memcpy( tmpGCPList1 + i, item, sizeof( GDAL_GCP ) );
   19210          28 :       Py_DECREF(o);
   19211             :     }
   19212             :   }
   19213           8 :   if (swig_obj[1]) {
   19214           1 :     ecode4 = SWIG_AsVal_int(swig_obj[1], &val4);
   19215           1 :     if (!SWIG_IsOK(ecode4)) {
   19216           0 :       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "GCPsToGeoTransform" "', argument " "4"" of type '" "int""'");
   19217             :     } 
   19218             :     arg4 = static_cast< int >(val4);
   19219             :   }
   19220           8 :   {
   19221           8 :     const int bLocalUseExceptions = GetUseExceptions();
   19222           8 :     if ( bLocalUseExceptions ) {
   19223           8 :       pushErrorHandler();
   19224             :     }
   19225           8 :     {
   19226           8 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19227           8 :       result = (RETURN_NONE)GDALGCPsToGeoTransform(arg1,(GDAL_GCP const *)arg2,arg3,arg4);
   19228           8 :       SWIG_PYTHON_THREAD_END_ALLOW;
   19229             :     }
   19230           8 :     if ( bLocalUseExceptions ) {
   19231           8 :       popErrorHandler();
   19232             :     }
   19233             : #ifndef SED_HACKS
   19234             :     if ( bLocalUseExceptions ) {
   19235             :       CPLErr eclass = CPLGetLastErrorType();
   19236             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19237             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19238             :       }
   19239             :     }
   19240             : #endif
   19241             :   }
   19242             :   /*%typemap(out) IF_FALSE_RETURN_NONE */
   19243           8 :   {
   19244             :     /* %typemap(argout) (double argout[ANY]) */
   19245           8 :     PyObject *out = CreateTupleFromDoubleArray( arg3, 6 );
   19246           8 :     resultobj = t_output_helper(resultobj,out);
   19247             :   }
   19248           8 :   {
   19249             :     /* %typemap(freearg) (int nGCPs, GDAL_GCP const *pGCPs ) */
   19250           8 :     free( arg2 );
   19251             :   }
   19252           8 :   {
   19253             :     /* %typemap(ret) IF_FALSE_RETURN_NONE */
   19254           8 :     if (result == 0 ) {
   19255           2 :       Py_XDECREF( resultobj );
   19256           2 :       resultobj = Py_None;
   19257           2 :       Py_INCREF(resultobj);
   19258             :     }
   19259           8 :     if (resultobj == 0) {
   19260           0 :       resultobj = Py_None;
   19261           0 :       Py_INCREF(resultobj);
   19262             :     }
   19263             :   }
   19264           8 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   19265             :   return resultobj;
   19266           0 : fail:
   19267           0 :   {
   19268             :     /* %typemap(freearg) (int nGCPs, GDAL_GCP const *pGCPs ) */
   19269           0 :     free( arg2 );
   19270             :   }
   19271           0 :   return NULL;
   19272             : }
   19273             : 
   19274             : 
   19275           0 : SWIGINTERN PyObject *_wrap_delete_VirtualMem(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19276           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19277           0 :   CPLVirtualMemShadow *arg1 = (CPLVirtualMemShadow *) 0 ;
   19278           0 :   void *argp1 = 0 ;
   19279           0 :   int res1 = 0 ;
   19280           0 :   PyObject *swig_obj[1] ;
   19281             :   
   19282           0 :   if (!args) SWIG_fail;
   19283           0 :   swig_obj[0] = args;
   19284           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CPLVirtualMemShadow, SWIG_POINTER_DISOWN |  0 );
   19285           0 :   if (!SWIG_IsOK(res1)) {
   19286           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_VirtualMem" "', argument " "1"" of type '" "CPLVirtualMemShadow *""'"); 
   19287             :   }
   19288           0 :   arg1 = reinterpret_cast< CPLVirtualMemShadow * >(argp1);
   19289           0 :   {
   19290           0 :     const int bLocalUseExceptions = GetUseExceptions();
   19291           0 :     if ( bLocalUseExceptions ) {
   19292           0 :       pushErrorHandler();
   19293             :     }
   19294           0 :     {
   19295           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19296           0 :       delete_CPLVirtualMemShadow(arg1);
   19297           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   19298             :     }
   19299           0 :     if ( bLocalUseExceptions ) {
   19300           0 :       popErrorHandler();
   19301             :     }
   19302             : #ifndef SED_HACKS
   19303             :     if ( bLocalUseExceptions ) {
   19304             :       CPLErr eclass = CPLGetLastErrorType();
   19305             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19306             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19307             :       }
   19308             :     }
   19309             : #endif
   19310             :   }
   19311           0 :   resultobj = SWIG_Py_Void();
   19312           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   19313             :   return resultobj;
   19314             : fail:
   19315             :   return NULL;
   19316             : }
   19317             : 
   19318             : 
   19319           0 : SWIGINTERN PyObject *_wrap_VirtualMem_GetAddr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19320           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19321           0 :   CPLVirtualMemShadow *arg1 = (CPLVirtualMemShadow *) 0 ;
   19322           0 :   void **arg2 = (void **) 0 ;
   19323           0 :   size_t *arg3 = (size_t *) 0 ;
   19324           0 :   GDALDataType *arg4 = (GDALDataType *) 0 ;
   19325           0 :   int *arg5 = (int *) 0 ;
   19326           0 :   void *argp1 = 0 ;
   19327           0 :   int res1 = 0 ;
   19328           0 :   void *ptr2 ;
   19329           0 :   size_t nsize2 ;
   19330           0 :   GDALDataType datatype2 ;
   19331           0 :   int readonly2 ;
   19332           0 :   PyObject *swig_obj[1] ;
   19333             :   
   19334           0 :   {
   19335             :     /* %typemap(in,numinputs=0) (void** pptr, size_t* pnsize, GDALDataType* pdatatype, int* preadonly) */
   19336           0 :     arg2 = &ptr2;
   19337           0 :     arg3 = &nsize2;
   19338           0 :     arg4 = &datatype2;
   19339           0 :     arg5 = &readonly2;
   19340             :   }
   19341           0 :   if (!args) SWIG_fail;
   19342           0 :   swig_obj[0] = args;
   19343           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CPLVirtualMemShadow, 0 |  0 );
   19344           0 :   if (!SWIG_IsOK(res1)) {
   19345           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VirtualMem_GetAddr" "', argument " "1"" of type '" "CPLVirtualMemShadow *""'"); 
   19346             :   }
   19347           0 :   arg1 = reinterpret_cast< CPLVirtualMemShadow * >(argp1);
   19348           0 :   {
   19349           0 :     const int bLocalUseExceptions = GetUseExceptions();
   19350           0 :     if ( bLocalUseExceptions ) {
   19351           0 :       pushErrorHandler();
   19352             :     }
   19353           0 :     {
   19354           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19355           0 :       CPLVirtualMemShadow_GetAddr(arg1,arg2,arg3,arg4,arg5);
   19356           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   19357             :     }
   19358           0 :     if ( bLocalUseExceptions ) {
   19359           0 :       popErrorHandler();
   19360             :     }
   19361             : #ifndef SED_HACKS
   19362             :     if ( bLocalUseExceptions ) {
   19363             :       CPLErr eclass = CPLGetLastErrorType();
   19364             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19365             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19366             :       }
   19367             :     }
   19368             : #endif
   19369             :   }
   19370           0 :   resultobj = SWIG_Py_Void();
   19371           0 :   {
   19372             :     /* %typemap(argout) (void** pptr, size_t* pnsize, GDALDataType* pdatatype, int* preadonly)*/
   19373           0 :     Py_buffer *buf=(Py_buffer*)malloc(sizeof(Py_buffer));
   19374             :     
   19375           0 :     if (PyBuffer_FillInfo(buf, swig_obj[0], *(arg2), *(arg3), *(arg5), PyBUF_ND)) {
   19376             :       // error, handle
   19377             :     }
   19378           0 :     if( *(arg4) == GDT_Byte )
   19379             :     {
   19380           0 :       buf->format = (char*) "B";
   19381           0 :       buf->itemsize = 1;
   19382             :     }
   19383           0 :     else if( *(arg4) == GDT_Int16 )
   19384             :     {
   19385           0 :       buf->format = (char*) "h";
   19386           0 :       buf->itemsize = 2;
   19387             :     }
   19388           0 :     else if( *(arg4) == GDT_UInt16 )
   19389             :     {
   19390           0 :       buf->format = (char*) "H";
   19391           0 :       buf->itemsize = 2;
   19392             :     }
   19393           0 :     else if( *(arg4) == GDT_Int32 )
   19394             :     {
   19395           0 :       buf->format = (char*) "i";
   19396           0 :       buf->itemsize = 4;
   19397             :     }
   19398           0 :     else if( *(arg4) == GDT_UInt32 )
   19399             :     {
   19400           0 :       buf->format = (char*) "I";
   19401           0 :       buf->itemsize = 4;
   19402             :     }
   19403           0 :     else if( *(arg4) == GDT_Float32 )
   19404             :     {
   19405           0 :       buf->format = (char*) "f";
   19406           0 :       buf->itemsize = 4;
   19407             :     }
   19408           0 :     else if( *(arg4) == GDT_Float64 )
   19409             :     {
   19410           0 :       buf->format = (char*) "F";
   19411           0 :       buf->itemsize = 8;
   19412             :     }
   19413             :     else
   19414             :     {
   19415           0 :       buf->format = (char*) "B";
   19416           0 :       buf->itemsize = 1;
   19417             :     }
   19418           0 :     Py_DECREF(resultobj);
   19419           0 :     resultobj = PyMemoryView_FromBuffer(buf);
   19420             :   }
   19421           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   19422             :   return resultobj;
   19423             : fail:
   19424             :   return NULL;
   19425             : }
   19426             : 
   19427             : 
   19428           0 : SWIGINTERN PyObject *_wrap_VirtualMem_Pin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19429           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19430           0 :   CPLVirtualMemShadow *arg1 = (CPLVirtualMemShadow *) 0 ;
   19431           0 :   size_t arg2 = (size_t) 0 ;
   19432           0 :   size_t arg3 = (size_t) 0 ;
   19433           0 :   int arg4 = (int) 0 ;
   19434           0 :   void *argp1 = 0 ;
   19435           0 :   int res1 = 0 ;
   19436           0 :   size_t val2 ;
   19437           0 :   int ecode2 = 0 ;
   19438           0 :   size_t val3 ;
   19439           0 :   int ecode3 = 0 ;
   19440           0 :   int val4 ;
   19441           0 :   int ecode4 = 0 ;
   19442           0 :   PyObject *swig_obj[4] ;
   19443             :   
   19444           0 :   if (!SWIG_Python_UnpackTuple(args, "VirtualMem_Pin", 1, 4, swig_obj)) SWIG_fail;
   19445           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CPLVirtualMemShadow, 0 |  0 );
   19446           0 :   if (!SWIG_IsOK(res1)) {
   19447           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VirtualMem_Pin" "', argument " "1"" of type '" "CPLVirtualMemShadow *""'"); 
   19448             :   }
   19449           0 :   arg1 = reinterpret_cast< CPLVirtualMemShadow * >(argp1);
   19450           0 :   if (swig_obj[1]) {
   19451           0 :     ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2);
   19452           0 :     if (!SWIG_IsOK(ecode2)) {
   19453           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VirtualMem_Pin" "', argument " "2"" of type '" "size_t""'");
   19454             :     } 
   19455             :     arg2 = static_cast< size_t >(val2);
   19456             :   }
   19457           0 :   if (swig_obj[2]) {
   19458           0 :     ecode3 = SWIG_AsVal_size_t(swig_obj[2], &val3);
   19459           0 :     if (!SWIG_IsOK(ecode3)) {
   19460           0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VirtualMem_Pin" "', argument " "3"" of type '" "size_t""'");
   19461             :     } 
   19462             :     arg3 = static_cast< size_t >(val3);
   19463             :   }
   19464           0 :   if (swig_obj[3]) {
   19465           0 :     ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
   19466           0 :     if (!SWIG_IsOK(ecode4)) {
   19467           0 :       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VirtualMem_Pin" "', argument " "4"" of type '" "int""'");
   19468             :     } 
   19469             :     arg4 = static_cast< int >(val4);
   19470             :   }
   19471           0 :   {
   19472           0 :     const int bLocalUseExceptions = GetUseExceptions();
   19473           0 :     if ( bLocalUseExceptions ) {
   19474           0 :       pushErrorHandler();
   19475             :     }
   19476           0 :     {
   19477           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19478           0 :       CPLVirtualMemShadow_Pin(arg1,arg2,arg3,arg4);
   19479           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   19480             :     }
   19481           0 :     if ( bLocalUseExceptions ) {
   19482           0 :       popErrorHandler();
   19483             :     }
   19484             : #ifndef SED_HACKS
   19485             :     if ( bLocalUseExceptions ) {
   19486             :       CPLErr eclass = CPLGetLastErrorType();
   19487             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19488             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19489             :       }
   19490             :     }
   19491             : #endif
   19492             :   }
   19493           0 :   resultobj = SWIG_Py_Void();
   19494           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   19495             :   return resultobj;
   19496             : fail:
   19497             :   return NULL;
   19498             : }
   19499             : 
   19500             : 
   19501         271 : SWIGINTERN PyObject *VirtualMem_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19502         271 :   PyObject *obj;
   19503         271 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   19504         271 :   SWIG_TypeNewClientData(SWIGTYPE_p_CPLVirtualMemShadow, SWIG_NewClientData(obj));
   19505         271 :   return SWIG_Py_Void();
   19506             : }
   19507             : 
   19508           1 : SWIGINTERN PyObject *_wrap_delete_AsyncReader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19509           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19510           1 :   GDALAsyncReaderShadow *arg1 = (GDALAsyncReaderShadow *) 0 ;
   19511           1 :   void *argp1 = 0 ;
   19512           1 :   int res1 = 0 ;
   19513           1 :   PyObject *swig_obj[1] ;
   19514             :   
   19515           1 :   if (!args) SWIG_fail;
   19516           1 :   swig_obj[0] = args;
   19517           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAsyncReaderShadow, SWIG_POINTER_DISOWN |  0 );
   19518           1 :   if (!SWIG_IsOK(res1)) {
   19519           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_AsyncReader" "', argument " "1"" of type '" "GDALAsyncReaderShadow *""'"); 
   19520             :   }
   19521           1 :   arg1 = reinterpret_cast< GDALAsyncReaderShadow * >(argp1);
   19522           1 :   {
   19523           1 :     const int bLocalUseExceptions = GetUseExceptions();
   19524           1 :     if ( bLocalUseExceptions ) {
   19525           1 :       pushErrorHandler();
   19526             :     }
   19527           1 :     {
   19528           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19529           1 :       delete_GDALAsyncReaderShadow(arg1);
   19530           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   19531             :     }
   19532           1 :     if ( bLocalUseExceptions ) {
   19533           1 :       popErrorHandler();
   19534             :     }
   19535             : #ifndef SED_HACKS
   19536             :     if ( bLocalUseExceptions ) {
   19537             :       CPLErr eclass = CPLGetLastErrorType();
   19538             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19539             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19540             :       }
   19541             :     }
   19542             : #endif
   19543             :   }
   19544           1 :   resultobj = SWIG_Py_Void();
   19545           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   19546             :   return resultobj;
   19547             : fail:
   19548             :   return NULL;
   19549             : }
   19550             : 
   19551             : 
   19552           1 : SWIGINTERN PyObject *_wrap_AsyncReader_GetNextUpdatedRegion(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19553           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19554           1 :   GDALAsyncReaderShadow *arg1 = (GDALAsyncReaderShadow *) 0 ;
   19555           1 :   double arg2 ;
   19556           1 :   int *arg3 = (int *) 0 ;
   19557           1 :   int *arg4 = (int *) 0 ;
   19558           1 :   int *arg5 = (int *) 0 ;
   19559           1 :   int *arg6 = (int *) 0 ;
   19560           1 :   void *argp1 = 0 ;
   19561           1 :   int res1 = 0 ;
   19562           1 :   double val2 ;
   19563           1 :   int ecode2 = 0 ;
   19564           1 :   int temp3 ;
   19565           1 :   int res3 = SWIG_TMPOBJ ;
   19566           1 :   int temp4 ;
   19567           1 :   int res4 = SWIG_TMPOBJ ;
   19568           1 :   int temp5 ;
   19569           1 :   int res5 = SWIG_TMPOBJ ;
   19570           1 :   int temp6 ;
   19571           1 :   int res6 = SWIG_TMPOBJ ;
   19572           1 :   PyObject *swig_obj[2] ;
   19573           1 :   GDALAsyncStatusType result;
   19574             :   
   19575           1 :   arg3 = &temp3;
   19576           1 :   arg4 = &temp4;
   19577           1 :   arg5 = &temp5;
   19578           1 :   arg6 = &temp6;
   19579           1 :   if (!SWIG_Python_UnpackTuple(args, "AsyncReader_GetNextUpdatedRegion", 2, 2, swig_obj)) SWIG_fail;
   19580           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAsyncReaderShadow, 0 |  0 );
   19581           1 :   if (!SWIG_IsOK(res1)) {
   19582           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AsyncReader_GetNextUpdatedRegion" "', argument " "1"" of type '" "GDALAsyncReaderShadow *""'"); 
   19583             :   }
   19584           1 :   arg1 = reinterpret_cast< GDALAsyncReaderShadow * >(argp1);
   19585           1 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   19586           1 :   if (!SWIG_IsOK(ecode2)) {
   19587           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "AsyncReader_GetNextUpdatedRegion" "', argument " "2"" of type '" "double""'");
   19588             :   } 
   19589           1 :   arg2 = static_cast< double >(val2);
   19590           1 :   {
   19591           1 :     const int bLocalUseExceptions = GetUseExceptions();
   19592           1 :     if ( bLocalUseExceptions ) {
   19593           1 :       pushErrorHandler();
   19594             :     }
   19595           1 :     {
   19596           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19597           1 :       result = (GDALAsyncStatusType)GDALAsyncReaderShadow_GetNextUpdatedRegion(arg1,arg2,arg3,arg4,arg5,arg6);
   19598           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   19599             :     }
   19600           1 :     if ( bLocalUseExceptions ) {
   19601           1 :       popErrorHandler();
   19602             :     }
   19603             : #ifndef SED_HACKS
   19604             :     if ( bLocalUseExceptions ) {
   19605             :       CPLErr eclass = CPLGetLastErrorType();
   19606             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19607             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19608             :       }
   19609             :     }
   19610             : #endif
   19611             :   }
   19612           1 :   resultobj = SWIG_From_int(static_cast< int >(result));
   19613           1 :   if (ReturnSame(SWIG_IsTmpObj(res3))) {
   19614           1 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3)));
   19615             :   } else {
   19616           0 :     int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   19617           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags));
   19618             :   }
   19619           1 :   if (ReturnSame(SWIG_IsTmpObj(res4))) {
   19620           1 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg4)));
   19621             :   } else {
   19622           0 :     int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   19623           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_int, new_flags));
   19624             :   }
   19625           1 :   if (ReturnSame(SWIG_IsTmpObj(res5))) {
   19626           1 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg5)));
   19627             :   } else {
   19628           0 :     int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   19629           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_int, new_flags));
   19630             :   }
   19631           1 :   if (ReturnSame(SWIG_IsTmpObj(res6))) {
   19632           1 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg6)));
   19633             :   } else {
   19634           0 :     int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   19635           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_int, new_flags));
   19636             :   }
   19637           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   19638             :   return resultobj;
   19639             : fail:
   19640             :   return NULL;
   19641             : }
   19642             : 
   19643             : 
   19644           1 : SWIGINTERN PyObject *_wrap_AsyncReader_GetBuffer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19645           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19646           1 :   GDALAsyncReaderShadow *arg1 = (GDALAsyncReaderShadow *) 0 ;
   19647           1 :   void **arg2 = (void **) 0 ;
   19648           1 :   void *argp1 = 0 ;
   19649           1 :   int res1 = 0 ;
   19650           1 :   void *pyObject2 = NULL ;
   19651           1 :   PyObject *swig_obj[1] ;
   19652             :   
   19653           1 :   {
   19654             :     /* %typemap(in,numinputs=0) ( void **outPythonObject ) ( void *pyObject2 = NULL ) */
   19655           1 :     arg2 = &pyObject2;
   19656             :   }
   19657           1 :   if (!args) SWIG_fail;
   19658           1 :   swig_obj[0] = args;
   19659           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAsyncReaderShadow, 0 |  0 );
   19660           1 :   if (!SWIG_IsOK(res1)) {
   19661           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AsyncReader_GetBuffer" "', argument " "1"" of type '" "GDALAsyncReaderShadow *""'"); 
   19662             :   }
   19663           1 :   arg1 = reinterpret_cast< GDALAsyncReaderShadow * >(argp1);
   19664           1 :   {
   19665           1 :     const int bLocalUseExceptions = GetUseExceptions();
   19666           1 :     if ( bLocalUseExceptions ) {
   19667           1 :       pushErrorHandler();
   19668             :     }
   19669           1 :     {
   19670           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19671           1 :       GDALAsyncReaderShadow_GetBuffer(arg1,arg2);
   19672           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   19673             :     }
   19674           1 :     if ( bLocalUseExceptions ) {
   19675           1 :       popErrorHandler();
   19676             :     }
   19677             : #ifndef SED_HACKS
   19678             :     if ( bLocalUseExceptions ) {
   19679             :       CPLErr eclass = CPLGetLastErrorType();
   19680             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19681             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19682             :       }
   19683             :     }
   19684             : #endif
   19685             :   }
   19686           1 :   resultobj = SWIG_Py_Void();
   19687           1 :   {
   19688             :     /* %typemap(argout) ( void **outPythonObject ) */
   19689           1 :     Py_XDECREF(resultobj);
   19690           1 :     if (*arg2)
   19691             :     {
   19692             :       resultobj = (PyObject*)*arg2;
   19693             :     }
   19694             :     else
   19695             :     {
   19696           0 :       resultobj = Py_None;
   19697           0 :       Py_INCREF(resultobj);
   19698             :     }
   19699             :   }
   19700           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   19701             :   return resultobj;
   19702             : fail:
   19703             :   return NULL;
   19704             : }
   19705             : 
   19706             : 
   19707           0 : SWIGINTERN PyObject *_wrap_AsyncReader_LockBuffer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19708           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19709           0 :   GDALAsyncReaderShadow *arg1 = (GDALAsyncReaderShadow *) 0 ;
   19710           0 :   double arg2 ;
   19711           0 :   void *argp1 = 0 ;
   19712           0 :   int res1 = 0 ;
   19713           0 :   double val2 ;
   19714           0 :   int ecode2 = 0 ;
   19715           0 :   PyObject *swig_obj[2] ;
   19716           0 :   int result;
   19717             :   
   19718           0 :   if (!SWIG_Python_UnpackTuple(args, "AsyncReader_LockBuffer", 2, 2, swig_obj)) SWIG_fail;
   19719           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAsyncReaderShadow, 0 |  0 );
   19720           0 :   if (!SWIG_IsOK(res1)) {
   19721           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AsyncReader_LockBuffer" "', argument " "1"" of type '" "GDALAsyncReaderShadow *""'"); 
   19722             :   }
   19723           0 :   arg1 = reinterpret_cast< GDALAsyncReaderShadow * >(argp1);
   19724           0 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   19725           0 :   if (!SWIG_IsOK(ecode2)) {
   19726           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "AsyncReader_LockBuffer" "', argument " "2"" of type '" "double""'");
   19727             :   } 
   19728           0 :   arg2 = static_cast< double >(val2);
   19729           0 :   {
   19730           0 :     const int bLocalUseExceptions = GetUseExceptions();
   19731           0 :     if ( bLocalUseExceptions ) {
   19732           0 :       pushErrorHandler();
   19733             :     }
   19734           0 :     {
   19735           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19736           0 :       result = (int)GDALAsyncReaderShadow_LockBuffer(arg1,arg2);
   19737           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   19738             :     }
   19739           0 :     if ( bLocalUseExceptions ) {
   19740           0 :       popErrorHandler();
   19741             :     }
   19742             : #ifndef SED_HACKS
   19743             :     if ( bLocalUseExceptions ) {
   19744             :       CPLErr eclass = CPLGetLastErrorType();
   19745             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19746             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19747             :       }
   19748             :     }
   19749             : #endif
   19750             :   }
   19751           0 :   resultobj = SWIG_From_int(static_cast< int >(result));
   19752           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   19753             :   return resultobj;
   19754             : fail:
   19755             :   return NULL;
   19756             : }
   19757             : 
   19758             : 
   19759           0 : SWIGINTERN PyObject *_wrap_AsyncReader_UnlockBuffer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19760           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19761           0 :   GDALAsyncReaderShadow *arg1 = (GDALAsyncReaderShadow *) 0 ;
   19762           0 :   void *argp1 = 0 ;
   19763           0 :   int res1 = 0 ;
   19764           0 :   PyObject *swig_obj[1] ;
   19765             :   
   19766           0 :   if (!args) SWIG_fail;
   19767           0 :   swig_obj[0] = args;
   19768           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAsyncReaderShadow, 0 |  0 );
   19769           0 :   if (!SWIG_IsOK(res1)) {
   19770           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AsyncReader_UnlockBuffer" "', argument " "1"" of type '" "GDALAsyncReaderShadow *""'"); 
   19771             :   }
   19772           0 :   arg1 = reinterpret_cast< GDALAsyncReaderShadow * >(argp1);
   19773           0 :   {
   19774           0 :     const int bLocalUseExceptions = GetUseExceptions();
   19775           0 :     if ( bLocalUseExceptions ) {
   19776           0 :       pushErrorHandler();
   19777             :     }
   19778           0 :     {
   19779           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19780           0 :       GDALAsyncReaderShadow_UnlockBuffer(arg1);
   19781           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   19782             :     }
   19783           0 :     if ( bLocalUseExceptions ) {
   19784           0 :       popErrorHandler();
   19785             :     }
   19786             : #ifndef SED_HACKS
   19787             :     if ( bLocalUseExceptions ) {
   19788             :       CPLErr eclass = CPLGetLastErrorType();
   19789             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19790             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19791             :       }
   19792             :     }
   19793             : #endif
   19794             :   }
   19795           0 :   resultobj = SWIG_Py_Void();
   19796           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   19797             :   return resultobj;
   19798             : fail:
   19799             :   return NULL;
   19800             : }
   19801             : 
   19802             : 
   19803         271 : SWIGINTERN PyObject *AsyncReader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19804         271 :   PyObject *obj;
   19805         271 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   19806         271 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALAsyncReaderShadow, SWIG_NewClientData(obj));
   19807         271 :   return SWIG_Py_Void();
   19808             : }
   19809             : 
   19810       17603 : SWIGINTERN PyObject *_wrap_Dataset_RasterXSize_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19811       17603 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19812       17603 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   19813       17603 :   void *argp1 = 0 ;
   19814       17603 :   int res1 = 0 ;
   19815       17603 :   PyObject *swig_obj[1] ;
   19816       17603 :   int result;
   19817             :   
   19818       17603 :   if (!args) SWIG_fail;
   19819       17603 :   swig_obj[0] = args;
   19820       17603 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   19821       17603 :   if (!SWIG_IsOK(res1)) {
   19822           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_RasterXSize_get" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   19823             :   }
   19824       17603 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   19825       17603 :   {
   19826       17603 :     const int bLocalUseExceptions = GetUseExceptions();
   19827       17603 :     if ( bLocalUseExceptions ) {
   19828       14316 :       pushErrorHandler();
   19829             :     }
   19830       17603 :     {
   19831       17603 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19832       17603 :       result = (int)GDALDatasetShadow_RasterXSize_get(arg1);
   19833       17603 :       SWIG_PYTHON_THREAD_END_ALLOW;
   19834             :     }
   19835       17603 :     if ( bLocalUseExceptions ) {
   19836       14316 :       popErrorHandler();
   19837             :     }
   19838             : #ifndef SED_HACKS
   19839             :     if ( bLocalUseExceptions ) {
   19840             :       CPLErr eclass = CPLGetLastErrorType();
   19841             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19842             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19843             :       }
   19844             :     }
   19845             : #endif
   19846             :   }
   19847       17603 :   resultobj = SWIG_From_int(static_cast< int >(result));
   19848       17603 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   19849             :   return resultobj;
   19850             : fail:
   19851             :   return NULL;
   19852             : }
   19853             : 
   19854             : 
   19855       17872 : SWIGINTERN PyObject *_wrap_Dataset_RasterYSize_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19856       17872 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19857       17872 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   19858       17872 :   void *argp1 = 0 ;
   19859       17872 :   int res1 = 0 ;
   19860       17872 :   PyObject *swig_obj[1] ;
   19861       17872 :   int result;
   19862             :   
   19863       17872 :   if (!args) SWIG_fail;
   19864       17872 :   swig_obj[0] = args;
   19865       17872 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   19866       17872 :   if (!SWIG_IsOK(res1)) {
   19867           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_RasterYSize_get" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   19868             :   }
   19869       17872 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   19870       17872 :   {
   19871       17872 :     const int bLocalUseExceptions = GetUseExceptions();
   19872       17872 :     if ( bLocalUseExceptions ) {
   19873        6390 :       pushErrorHandler();
   19874             :     }
   19875       17872 :     {
   19876       17872 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19877       17872 :       result = (int)GDALDatasetShadow_RasterYSize_get(arg1);
   19878       17872 :       SWIG_PYTHON_THREAD_END_ALLOW;
   19879             :     }
   19880       17872 :     if ( bLocalUseExceptions ) {
   19881        6390 :       popErrorHandler();
   19882             :     }
   19883             : #ifndef SED_HACKS
   19884             :     if ( bLocalUseExceptions ) {
   19885             :       CPLErr eclass = CPLGetLastErrorType();
   19886             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19887             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19888             :       }
   19889             :     }
   19890             : #endif
   19891             :   }
   19892       17872 :   resultobj = SWIG_From_int(static_cast< int >(result));
   19893       17872 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   19894             :   return resultobj;
   19895             : fail:
   19896             :   return NULL;
   19897             : }
   19898             : 
   19899             : 
   19900      348270 : SWIGINTERN PyObject *_wrap_Dataset_RasterCount_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19901      348270 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19902      348270 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   19903      348270 :   void *argp1 = 0 ;
   19904      348270 :   int res1 = 0 ;
   19905      348270 :   PyObject *swig_obj[1] ;
   19906      348270 :   int result;
   19907             :   
   19908      348270 :   if (!args) SWIG_fail;
   19909      348270 :   swig_obj[0] = args;
   19910      348270 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   19911      348270 :   if (!SWIG_IsOK(res1)) {
   19912           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_RasterCount_get" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   19913             :   }
   19914      348270 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   19915      348270 :   {
   19916      348270 :     const int bLocalUseExceptions = GetUseExceptions();
   19917      348270 :     if ( bLocalUseExceptions ) {
   19918        2462 :       pushErrorHandler();
   19919             :     }
   19920      348270 :     {
   19921      348270 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19922      348270 :       result = (int)GDALDatasetShadow_RasterCount_get(arg1);
   19923      348270 :       SWIG_PYTHON_THREAD_END_ALLOW;
   19924             :     }
   19925      348270 :     if ( bLocalUseExceptions ) {
   19926        2462 :       popErrorHandler();
   19927             :     }
   19928             : #ifndef SED_HACKS
   19929             :     if ( bLocalUseExceptions ) {
   19930             :       CPLErr eclass = CPLGetLastErrorType();
   19931             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19932             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19933             :       }
   19934             :     }
   19935             : #endif
   19936             :   }
   19937      348270 :   resultobj = SWIG_From_int(static_cast< int >(result));
   19938      348270 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   19939             :   return resultobj;
   19940             : fail:
   19941             :   return NULL;
   19942             : }
   19943             : 
   19944             : 
   19945       48571 : SWIGINTERN PyObject *_wrap_delete_Dataset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19946       48571 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19947       48571 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   19948       48571 :   void *argp1 = 0 ;
   19949       48571 :   int res1 = 0 ;
   19950       48571 :   PyObject *swig_obj[1] ;
   19951             :   
   19952       48571 :   if (!args) SWIG_fail;
   19953       48571 :   swig_obj[0] = args;
   19954       48571 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_DISOWN |  0 );
   19955       48571 :   if (!SWIG_IsOK(res1)) {
   19956           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Dataset" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   19957             :   }
   19958       48571 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   19959       48571 :   {
   19960       48571 :     const int bLocalUseExceptions = GetUseExceptions();
   19961       48571 :     if ( bLocalUseExceptions ) {
   19962       18988 :       pushErrorHandler();
   19963             :     }
   19964       48571 :     {
   19965       48571 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19966       48571 :       delete_GDALDatasetShadow(arg1);
   19967       48571 :       SWIG_PYTHON_THREAD_END_ALLOW;
   19968             :     }
   19969       48571 :     if ( bLocalUseExceptions ) {
   19970       18988 :       popErrorHandler();
   19971             :     }
   19972             : #ifndef SED_HACKS
   19973             :     if ( bLocalUseExceptions ) {
   19974             :       CPLErr eclass = CPLGetLastErrorType();
   19975             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19976             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19977             :       }
   19978             :     }
   19979             : #endif
   19980             :   }
   19981       48571 :   resultobj = SWIG_Py_Void();
   19982       48571 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   19983             :   return resultobj;
   19984             : fail:
   19985             :   return NULL;
   19986             : }
   19987             : 
   19988             : 
   19989         511 : SWIGINTERN PyObject *_wrap_Dataset_Close(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19990         511 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19991         511 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   19992         511 :   void *argp1 = 0 ;
   19993         511 :   int res1 = 0 ;
   19994         511 :   PyObject *swig_obj[1] ;
   19995         511 :   CPLErr result;
   19996             :   
   19997         511 :   if (!args) SWIG_fail;
   19998         511 :   swig_obj[0] = args;
   19999         511 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   20000         511 :   if (!SWIG_IsOK(res1)) {
   20001           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_Close" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   20002             :   }
   20003         511 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   20004         511 :   {
   20005         511 :     const int bLocalUseExceptions = GetUseExceptions();
   20006         511 :     if ( bLocalUseExceptions ) {
   20007         220 :       pushErrorHandler();
   20008             :     }
   20009         511 :     {
   20010         511 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20011         511 :       CPL_IGNORE_RET_VAL(result = (CPLErr)GDALDatasetShadow_Close(arg1));
   20012         511 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20013             :     }
   20014         511 :     if ( bLocalUseExceptions ) {
   20015         220 :       popErrorHandler();
   20016             :     }
   20017             : #ifndef SED_HACKS
   20018             :     if ( bLocalUseExceptions ) {
   20019             :       CPLErr eclass = CPLGetLastErrorType();
   20020             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20021             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20022             :       }
   20023             :     }
   20024             : #endif
   20025             :   }
   20026         511 :   resultobj = SWIG_From_int(static_cast< int >(result));
   20027         511 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   20028             :   return resultobj;
   20029             : fail:
   20030             :   return NULL;
   20031             : }
   20032             : 
   20033             : 
   20034        1300 : SWIGINTERN PyObject *_wrap_Dataset_GetDriver(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20035        1300 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20036        1300 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   20037        1300 :   void *argp1 = 0 ;
   20038        1300 :   int res1 = 0 ;
   20039        1300 :   PyObject *swig_obj[1] ;
   20040        1300 :   GDALDriverShadow *result = 0 ;
   20041             :   
   20042        1300 :   if (!args) SWIG_fail;
   20043        1300 :   swig_obj[0] = args;
   20044        1300 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   20045        1300 :   if (!SWIG_IsOK(res1)) {
   20046           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetDriver" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   20047             :   }
   20048        1300 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   20049        1300 :   {
   20050        1300 :     const int bLocalUseExceptions = GetUseExceptions();
   20051        1300 :     if ( bLocalUseExceptions ) {
   20052         796 :       pushErrorHandler();
   20053             :     }
   20054        1300 :     {
   20055        1300 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20056        1300 :       result = (GDALDriverShadow *)GDALDatasetShadow_GetDriver(arg1);
   20057        1300 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20058             :     }
   20059        1300 :     if ( bLocalUseExceptions ) {
   20060         796 :       popErrorHandler();
   20061             :     }
   20062             : #ifndef SED_HACKS
   20063             :     if ( bLocalUseExceptions ) {
   20064             :       CPLErr eclass = CPLGetLastErrorType();
   20065             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20066             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20067             :       }
   20068             :     }
   20069             : #endif
   20070             :   }
   20071        1300 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   20072        1300 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   20073             :   return resultobj;
   20074             : fail:
   20075             :   return NULL;
   20076             : }
   20077             : 
   20078             : 
   20079      225107 : SWIGINTERN PyObject *_wrap_Dataset_GetRasterBand(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20080      225107 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20081      225107 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   20082      225107 :   int arg2 ;
   20083      225107 :   void *argp1 = 0 ;
   20084      225107 :   int res1 = 0 ;
   20085      225107 :   int val2 ;
   20086      225107 :   int ecode2 = 0 ;
   20087      225107 :   PyObject *swig_obj[2] ;
   20088      225107 :   GDALRasterBandShadow *result = 0 ;
   20089             :   
   20090      225107 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_GetRasterBand", 2, 2, swig_obj)) SWIG_fail;
   20091      225107 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   20092      225107 :   if (!SWIG_IsOK(res1)) {
   20093           8 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetRasterBand" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   20094             :   }
   20095      225103 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   20096      225103 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   20097      225103 :   if (!SWIG_IsOK(ecode2)) {
   20098           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_GetRasterBand" "', argument " "2"" of type '" "int""'");
   20099             :   } 
   20100      225103 :   arg2 = static_cast< int >(val2);
   20101      225103 :   {
   20102      225103 :     const int bLocalUseExceptions = GetUseExceptions();
   20103      225103 :     if ( bLocalUseExceptions ) {
   20104       34066 :       pushErrorHandler();
   20105             :     }
   20106      225103 :     {
   20107      225103 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20108      225103 :       result = (GDALRasterBandShadow *)GDALDatasetShadow_GetRasterBand(arg1,arg2);
   20109      225103 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20110             :     }
   20111      225103 :     if ( bLocalUseExceptions ) {
   20112       34066 :       popErrorHandler();
   20113             :     }
   20114             : #ifndef SED_HACKS
   20115             :     if ( bLocalUseExceptions ) {
   20116             :       CPLErr eclass = CPLGetLastErrorType();
   20117             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20118             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20119             :       }
   20120             :     }
   20121             : #endif
   20122             :   }
   20123      225103 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   20124      225107 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   20125             :   return resultobj;
   20126             : fail:
   20127             :   return NULL;
   20128             : }
   20129             : 
   20130             : 
   20131        1115 : SWIGINTERN PyObject *_wrap_Dataset_GetRootGroup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20132        1115 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20133        1115 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   20134        1115 :   void *argp1 = 0 ;
   20135        1115 :   int res1 = 0 ;
   20136        1115 :   PyObject *swig_obj[1] ;
   20137        1115 :   GDALGroupHS *result = 0 ;
   20138             :   
   20139        1115 :   if (!args) SWIG_fail;
   20140        1115 :   swig_obj[0] = args;
   20141        1115 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   20142        1115 :   if (!SWIG_IsOK(res1)) {
   20143           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetRootGroup" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   20144             :   }
   20145        1115 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   20146        1115 :   {
   20147        1115 :     const int bLocalUseExceptions = GetUseExceptions();
   20148        1115 :     if ( bLocalUseExceptions ) {
   20149         298 :       pushErrorHandler();
   20150             :     }
   20151        1115 :     {
   20152        1115 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20153        1115 :       result = (GDALGroupHS *)GDALDatasetShadow_GetRootGroup(arg1);
   20154        1115 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20155             :     }
   20156        1115 :     if ( bLocalUseExceptions ) {
   20157         298 :       popErrorHandler();
   20158             :     }
   20159             : #ifndef SED_HACKS
   20160             :     if ( bLocalUseExceptions ) {
   20161             :       CPLErr eclass = CPLGetLastErrorType();
   20162             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20163             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20164             :       }
   20165             :     }
   20166             : #endif
   20167             :   }
   20168        1115 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALGroupHS, SWIG_POINTER_OWN |  0 );
   20169        1115 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   20170             :   return resultobj;
   20171             : fail:
   20172             :   return NULL;
   20173             : }
   20174             : 
   20175             : 
   20176         396 : SWIGINTERN PyObject *_wrap_Dataset_GetProjection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20177         396 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20178         396 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   20179         396 :   void *argp1 = 0 ;
   20180         396 :   int res1 = 0 ;
   20181         396 :   PyObject *swig_obj[1] ;
   20182         396 :   char *result = 0 ;
   20183             :   
   20184         396 :   if (!args) SWIG_fail;
   20185         396 :   swig_obj[0] = args;
   20186         396 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   20187         396 :   if (!SWIG_IsOK(res1)) {
   20188           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetProjection" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   20189             :   }
   20190         396 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   20191         396 :   {
   20192         396 :     const int bLocalUseExceptions = GetUseExceptions();
   20193         396 :     if ( bLocalUseExceptions ) {
   20194         347 :       pushErrorHandler();
   20195             :     }
   20196         396 :     {
   20197         396 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20198         396 :       result = (char *)GDALDatasetShadow_GetProjection(arg1);
   20199         396 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20200             :     }
   20201         396 :     if ( bLocalUseExceptions ) {
   20202         347 :       popErrorHandler();
   20203             :     }
   20204             : #ifndef SED_HACKS
   20205             :     if ( bLocalUseExceptions ) {
   20206             :       CPLErr eclass = CPLGetLastErrorType();
   20207             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20208             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20209             :       }
   20210             :     }
   20211             : #endif
   20212             :   }
   20213         396 :   resultobj = SWIG_FromCharPtr((const char *)result);
   20214         396 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   20215             :   return resultobj;
   20216             : fail:
   20217             :   return NULL;
   20218             : }
   20219             : 
   20220             : 
   20221         464 : SWIGINTERN PyObject *_wrap_Dataset_GetProjectionRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20222         464 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20223         464 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   20224         464 :   void *argp1 = 0 ;
   20225         464 :   int res1 = 0 ;
   20226         464 :   PyObject *swig_obj[1] ;
   20227         464 :   char *result = 0 ;
   20228             :   
   20229         464 :   if (!args) SWIG_fail;
   20230         464 :   swig_obj[0] = args;
   20231         464 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   20232         464 :   if (!SWIG_IsOK(res1)) {
   20233           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetProjectionRef" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   20234             :   }
   20235         464 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   20236         464 :   {
   20237         464 :     const int bLocalUseExceptions = GetUseExceptions();
   20238         464 :     if ( bLocalUseExceptions ) {
   20239         216 :       pushErrorHandler();
   20240             :     }
   20241         464 :     {
   20242         464 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20243         464 :       result = (char *)GDALDatasetShadow_GetProjectionRef(arg1);
   20244         464 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20245             :     }
   20246         464 :     if ( bLocalUseExceptions ) {
   20247         216 :       popErrorHandler();
   20248             :     }
   20249             : #ifndef SED_HACKS
   20250             :     if ( bLocalUseExceptions ) {
   20251             :       CPLErr eclass = CPLGetLastErrorType();
   20252             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20253             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20254             :       }
   20255             :     }
   20256             : #endif
   20257             :   }
   20258         464 :   resultobj = SWIG_FromCharPtr((const char *)result);
   20259         464 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   20260             :   return resultobj;
   20261             : fail:
   20262             :   return NULL;
   20263             : }
   20264             : 
   20265             : 
   20266           4 : SWIGINTERN PyObject *_wrap_Dataset_GetRefCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20267           4 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20268           4 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   20269           4 :   void *argp1 = 0 ;
   20270           4 :   int res1 = 0 ;
   20271           4 :   PyObject *swig_obj[1] ;
   20272           4 :   int result;
   20273             :   
   20274           4 :   if (!args) SWIG_fail;
   20275           4 :   swig_obj[0] = args;
   20276           4 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   20277           4 :   if (!SWIG_IsOK(res1)) {
   20278           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetRefCount" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   20279             :   }
   20280           4 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   20281           4 :   {
   20282           4 :     const int bLocalUseExceptions = GetUseExceptions();
   20283           4 :     if ( bLocalUseExceptions ) {
   20284           0 :       pushErrorHandler();
   20285             :     }
   20286           4 :     {
   20287           4 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20288           4 :       result = (int)GDALDatasetShadow_GetRefCount(arg1);
   20289           4 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20290             :     }
   20291           4 :     if ( bLocalUseExceptions ) {
   20292           0 :       popErrorHandler();
   20293             :     }
   20294             : #ifndef SED_HACKS
   20295             :     if ( bLocalUseExceptions ) {
   20296             :       CPLErr eclass = CPLGetLastErrorType();
   20297             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20298             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20299             :       }
   20300             :     }
   20301             : #endif
   20302             :   }
   20303           4 :   resultobj = SWIG_From_int(static_cast< int >(result));
   20304           4 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   20305             :   return resultobj;
   20306             : fail:
   20307             :   return NULL;
   20308             : }
   20309             : 
   20310             : 
   20311           0 : SWIGINTERN PyObject *_wrap_Dataset_GetSummaryRefCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20312           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20313           0 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   20314           0 :   void *argp1 = 0 ;
   20315           0 :   int res1 = 0 ;
   20316           0 :   PyObject *swig_obj[1] ;
   20317           0 :   int result;
   20318             :   
   20319           0 :   if (!args) SWIG_fail;
   20320           0 :   swig_obj[0] = args;
   20321           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   20322           0 :   if (!SWIG_IsOK(res1)) {
   20323           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetSummaryRefCount" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   20324             :   }
   20325           0 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   20326           0 :   {
   20327           0 :     const int bLocalUseExceptions = GetUseExceptions();
   20328           0 :     if ( bLocalUseExceptions ) {
   20329           0 :       pushErrorHandler();
   20330             :     }
   20331           0 :     {
   20332           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20333           0 :       result = (int)GDALDatasetShadow_GetSummaryRefCount(arg1);
   20334           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20335             :     }
   20336           0 :     if ( bLocalUseExceptions ) {
   20337           0 :       popErrorHandler();
   20338             :     }
   20339             : #ifndef SED_HACKS
   20340             :     if ( bLocalUseExceptions ) {
   20341             :       CPLErr eclass = CPLGetLastErrorType();
   20342             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20343             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20344             :       }
   20345             :     }
   20346             : #endif
   20347             :   }
   20348           0 :   resultobj = SWIG_From_int(static_cast< int >(result));
   20349           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   20350             :   return resultobj;
   20351             : fail:
   20352             :   return NULL;
   20353             : }
   20354             : 
   20355             : 
   20356         698 : SWIGINTERN PyObject *_wrap_Dataset_GetSpatialRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20357         698 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20358         698 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   20359         698 :   void *argp1 = 0 ;
   20360         698 :   int res1 = 0 ;
   20361         698 :   PyObject *swig_obj[1] ;
   20362         698 :   OSRSpatialReferenceShadow *result = 0 ;
   20363             :   
   20364         698 :   if (!args) SWIG_fail;
   20365         698 :   swig_obj[0] = args;
   20366         698 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   20367         698 :   if (!SWIG_IsOK(res1)) {
   20368           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetSpatialRef" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   20369             :   }
   20370         698 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   20371         698 :   {
   20372         698 :     const int bLocalUseExceptions = GetUseExceptions();
   20373         698 :     if ( bLocalUseExceptions ) {
   20374         443 :       pushErrorHandler();
   20375             :     }
   20376         698 :     {
   20377         698 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20378         698 :       result = (OSRSpatialReferenceShadow *)GDALDatasetShadow_GetSpatialRef(arg1);
   20379         698 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20380             :     }
   20381         698 :     if ( bLocalUseExceptions ) {
   20382         443 :       popErrorHandler();
   20383             :     }
   20384             : #ifndef SED_HACKS
   20385             :     if ( bLocalUseExceptions ) {
   20386             :       CPLErr eclass = CPLGetLastErrorType();
   20387             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20388             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20389             :       }
   20390             :     }
   20391             : #endif
   20392             :   }
   20393         698 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_POINTER_OWN |  0 );
   20394         698 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   20395             :   return resultobj;
   20396             : fail:
   20397             :   return NULL;
   20398             : }
   20399             : 
   20400             : 
   20401        1670 : SWIGINTERN PyObject *_wrap_Dataset_SetProjection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20402        1670 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20403        1670 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   20404        1670 :   char *arg2 = (char *) 0 ;
   20405        1670 :   void *argp1 = 0 ;
   20406        1670 :   int res1 = 0 ;
   20407        1670 :   int res2 ;
   20408        1670 :   char *buf2 = 0 ;
   20409        1670 :   int alloc2 = 0 ;
   20410        1670 :   PyObject *swig_obj[2] ;
   20411        1670 :   CPLErr result;
   20412             :   
   20413        1670 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_SetProjection", 2, 2, swig_obj)) SWIG_fail;
   20414        1670 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   20415        1670 :   if (!SWIG_IsOK(res1)) {
   20416           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_SetProjection" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   20417             :   }
   20418        1670 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   20419        1670 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   20420        1670 :   if (!SWIG_IsOK(res2)) {
   20421           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_SetProjection" "', argument " "2"" of type '" "char const *""'");
   20422             :   }
   20423        1670 :   arg2 = reinterpret_cast< char * >(buf2);
   20424        1670 :   {
   20425        1670 :     if (!arg2) {
   20426           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   20427             :     }
   20428             :   }
   20429        1670 :   {
   20430        1670 :     const int bLocalUseExceptions = GetUseExceptions();
   20431        1670 :     if ( bLocalUseExceptions ) {
   20432         693 :       pushErrorHandler();
   20433             :     }
   20434        1670 :     {
   20435        1670 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20436        1670 :       CPL_IGNORE_RET_VAL(result = (CPLErr)GDALDatasetShadow_SetProjection(arg1,(char const *)arg2));
   20437        1670 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20438             :     }
   20439        1670 :     if ( bLocalUseExceptions ) {
   20440         693 :       popErrorHandler();
   20441             :     }
   20442             : #ifndef SED_HACKS
   20443             :     if ( bLocalUseExceptions ) {
   20444             :       CPLErr eclass = CPLGetLastErrorType();
   20445             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20446             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20447             :       }
   20448             :     }
   20449             : #endif
   20450             :   }
   20451        1670 :   resultobj = SWIG_From_int(static_cast< int >(result));
   20452        1670 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   20453        1670 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   20454             :   return resultobj;
   20455           0 : fail:
   20456           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   20457             :   return NULL;
   20458             : }
   20459             : 
   20460             : 
   20461         215 : SWIGINTERN PyObject *_wrap_Dataset_SetSpatialRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20462         215 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20463         215 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   20464         215 :   OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
   20465         215 :   void *argp1 = 0 ;
   20466         215 :   int res1 = 0 ;
   20467         215 :   void *argp2 = 0 ;
   20468         215 :   int res2 = 0 ;
   20469         215 :   PyObject *swig_obj[2] ;
   20470         215 :   CPLErr result;
   20471             :   
   20472         215 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_SetSpatialRef", 2, 2, swig_obj)) SWIG_fail;
   20473         215 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   20474         215 :   if (!SWIG_IsOK(res1)) {
   20475           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_SetSpatialRef" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   20476             :   }
   20477         215 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   20478         215 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
   20479         215 :   if (!SWIG_IsOK(res2)) {
   20480           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_SetSpatialRef" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'"); 
   20481             :   }
   20482         215 :   arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
   20483         215 :   {
   20484         215 :     const int bLocalUseExceptions = GetUseExceptions();
   20485         215 :     if ( bLocalUseExceptions ) {
   20486          94 :       pushErrorHandler();
   20487             :     }
   20488         215 :     {
   20489         215 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20490         215 :       CPL_IGNORE_RET_VAL(result = (CPLErr)GDALDatasetShadow_SetSpatialRef(arg1,arg2));
   20491         215 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20492             :     }
   20493         215 :     if ( bLocalUseExceptions ) {
   20494          94 :       popErrorHandler();
   20495             :     }
   20496             : #ifndef SED_HACKS
   20497             :     if ( bLocalUseExceptions ) {
   20498             :       CPLErr eclass = CPLGetLastErrorType();
   20499             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20500             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20501             :       }
   20502             :     }
   20503             : #endif
   20504             :   }
   20505         215 :   resultobj = SWIG_From_int(static_cast< int >(result));
   20506         215 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   20507             :   return resultobj;
   20508             : fail:
   20509             :   return NULL;
   20510             : }
   20511             : 
   20512             : 
   20513        3544 : SWIGINTERN PyObject *_wrap_Dataset_GetGeoTransform(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   20514        3544 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20515        3544 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   20516        3544 :   double *arg2 ;
   20517        3544 :   int *arg3 = (int *) 0 ;
   20518        3544 :   int *arg4 = (int *) 0 ;
   20519        3544 :   void *argp1 = 0 ;
   20520        3544 :   int res1 = 0 ;
   20521        3544 :   double argout2[6] ;
   20522        3544 :   int isvalid2 ;
   20523        3544 :   int val4 ;
   20524        3544 :   PyObject * obj0 = 0 ;
   20525        3544 :   PyObject * obj1 = 0 ;
   20526        3544 :   char * kwnames[] = {
   20527             :     (char *)"self",  (char *)"can_return_null",  NULL 
   20528             :   };
   20529             :   
   20530        3544 :   {
   20531             :     /* %typemap(in,numinputs=0) (double argout2[6], int* isvalid2) */
   20532        3544 :     arg2 = argout2;
   20533        3544 :     arg3 = &isvalid2;
   20534             :   }
   20535        3544 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:Dataset_GetGeoTransform", kwnames, &obj0, &obj1)) SWIG_fail;
   20536        3544 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   20537        3544 :   if (!SWIG_IsOK(res1)) {
   20538           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetGeoTransform" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   20539             :   }
   20540        3544 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   20541        3544 :   if (obj1) {
   20542         392 :     {
   20543             :       /* %typemap(in) (int *optional_##int) */
   20544         392 :       if ( obj1 == Py_None ) {
   20545             :         arg4 = 0;
   20546             :       }
   20547         392 :       else if ( PyArg_Parse( obj1,"i" ,&val4 ) ) {
   20548             :         arg4 = (int *) &val4;
   20549             :       }
   20550             :       else {
   20551           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   20552           0 :         SWIG_fail;
   20553             :       }
   20554             :     }
   20555             :   }
   20556        3544 :   {
   20557        3544 :     const int bLocalUseExceptions = GetUseExceptions();
   20558        3544 :     if ( bLocalUseExceptions ) {
   20559        2176 :       pushErrorHandler();
   20560             :     }
   20561        3544 :     {
   20562        3544 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20563        3544 :       GDALDatasetShadow_GetGeoTransform(arg1,arg2,arg3,arg4);
   20564        3544 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20565             :     }
   20566        3544 :     if ( bLocalUseExceptions ) {
   20567        2176 :       popErrorHandler();
   20568             :     }
   20569             : #ifndef SED_HACKS
   20570             :     if ( bLocalUseExceptions ) {
   20571             :       CPLErr eclass = CPLGetLastErrorType();
   20572             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20573             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20574             :       }
   20575             :     }
   20576             : #endif
   20577             :   }
   20578        3544 :   resultobj = SWIG_Py_Void();
   20579        3544 :   {
   20580             :     /* %typemap(argout) (double argout[6], int* isvalid)  */
   20581        3544 :     PyObject *r;
   20582        3544 :     if ( !*arg3 ) {
   20583         130 :       Py_INCREF(Py_None);
   20584         130 :       r = Py_None;
   20585             :     }
   20586             :     else {
   20587        3414 :       r = CreateTupleFromDoubleArray(arg2, 6);
   20588             :     }
   20589        3544 :     resultobj = t_output_helper(resultobj,r);
   20590             :   }
   20591        3544 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   20592             :   return resultobj;
   20593             : fail:
   20594             :   return NULL;
   20595             : }
   20596             : 
   20597             : 
   20598        2629 : SWIGINTERN PyObject *_wrap_Dataset_SetGeoTransform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20599        2629 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20600        2629 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   20601        2629 :   double *arg2 ;
   20602        2629 :   void *argp1 = 0 ;
   20603        2629 :   int res1 = 0 ;
   20604        2629 :   double argin2[6] ;
   20605        2629 :   PyObject *swig_obj[2] ;
   20606        2629 :   CPLErr result;
   20607             :   
   20608        2629 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_SetGeoTransform", 2, 2, swig_obj)) SWIG_fail;
   20609        2629 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   20610        2629 :   if (!SWIG_IsOK(res1)) {
   20611           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_SetGeoTransform" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   20612             :   }
   20613        2629 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   20614        2629 :   {
   20615             :     /* %typemap(in) (double argin2[ANY]) */
   20616        2629 :     arg2 = argin2;
   20617        2629 :     if (! PySequence_Check(swig_obj[1]) ) {
   20618           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   20619           0 :       SWIG_fail;
   20620             :     }
   20621        2629 :     Py_ssize_t seq_size = PySequence_Size(swig_obj[1]);
   20622        2629 :     if ( seq_size != 6 ) {
   20623           0 :       PyErr_SetString(PyExc_TypeError, "sequence must have length ##size");
   20624           0 :       SWIG_fail;
   20625             :     }
   20626       18403 :     for (unsigned int i=0; i<6; i++) {
   20627       15774 :       PyObject *o = PySequence_GetItem(swig_obj[1],i);
   20628       15774 :       double val;
   20629       15774 :       if ( !PyArg_Parse(o, "d", &val ) ) {
   20630           0 :         PyErr_SetString(PyExc_TypeError, "not a number");
   20631           0 :         Py_DECREF(o);
   20632           0 :         SWIG_fail;
   20633             :       }
   20634       15774 :       arg2[i] =  val;
   20635       15774 :       Py_DECREF(o);
   20636             :     }
   20637             :   }
   20638        2629 :   {
   20639        2629 :     const int bLocalUseExceptions = GetUseExceptions();
   20640        2629 :     if ( bLocalUseExceptions ) {
   20641        1430 :       pushErrorHandler();
   20642             :     }
   20643        2629 :     {
   20644        2629 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20645        2629 :       CPL_IGNORE_RET_VAL(result = (CPLErr)GDALDatasetShadow_SetGeoTransform(arg1,arg2));
   20646        2629 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20647             :     }
   20648        2629 :     if ( bLocalUseExceptions ) {
   20649        1430 :       popErrorHandler();
   20650             :     }
   20651             : #ifndef SED_HACKS
   20652             :     if ( bLocalUseExceptions ) {
   20653             :       CPLErr eclass = CPLGetLastErrorType();
   20654             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20655             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20656             :       }
   20657             :     }
   20658             : #endif
   20659             :   }
   20660        2629 :   resultobj = SWIG_From_int(static_cast< int >(result));
   20661        2629 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   20662             :   return resultobj;
   20663             : fail:
   20664             :   return NULL;
   20665             : }
   20666             : 
   20667             : 
   20668         530 : SWIGINTERN PyObject *_wrap_Dataset_BuildOverviews(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   20669         530 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20670         530 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   20671         530 :   char *arg2 = (char *) "NEAREST" ;
   20672         530 :   int arg3 = (int) 0 ;
   20673         530 :   int *arg4 = (int *) 0 ;
   20674         530 :   GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
   20675         530 :   void *arg6 = (void *) NULL ;
   20676         530 :   char **arg7 = (char **) NULL ;
   20677         530 :   void *argp1 = 0 ;
   20678         530 :   int res1 = 0 ;
   20679         530 :   int res2 ;
   20680         530 :   char *buf2 = 0 ;
   20681         530 :   int alloc2 = 0 ;
   20682         530 :   PyObject * obj0 = 0 ;
   20683         530 :   PyObject * obj1 = 0 ;
   20684         530 :   PyObject * obj2 = 0 ;
   20685         530 :   PyObject * obj3 = 0 ;
   20686         530 :   PyObject * obj4 = 0 ;
   20687         530 :   PyObject * obj5 = 0 ;
   20688         530 :   char * kwnames[] = {
   20689             :     (char *)"self",  (char *)"resampling",  (char *)"overviewlist",  (char *)"callback",  (char *)"callback_data",  (char *)"options",  NULL 
   20690             :   };
   20691         530 :   int result;
   20692             :   
   20693             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   20694         530 :   PyProgressData *psProgressInfo;
   20695         530 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   20696         530 :   psProgressInfo->nLastReported = -1;
   20697         530 :   psProgressInfo->psPyCallback = NULL;
   20698         530 :   psProgressInfo->psPyCallbackData = NULL;
   20699         530 :   arg6 = psProgressInfo;
   20700         530 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OOOOO:Dataset_BuildOverviews", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
   20701         530 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   20702         530 :   if (!SWIG_IsOK(res1)) {
   20703           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_BuildOverviews" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   20704             :   }
   20705         530 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   20706         530 :   if (obj1) {
   20707         479 :     res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   20708         479 :     if (!SWIG_IsOK(res2)) {
   20709           0 :       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_BuildOverviews" "', argument " "2"" of type '" "char const *""'");
   20710             :     }
   20711         479 :     arg2 = reinterpret_cast< char * >(buf2);
   20712             :   }
   20713         530 :   if (obj2) {
   20714         530 :     {
   20715             :       /* %typemap(in,numinputs=1) (int nList, int* pList)*/
   20716         530 :       arg4 = CreateCIntListFromSequence(obj2, &arg3);
   20717         530 :       if( arg3 < 0 ) {
   20718           0 :         SWIG_fail;
   20719             :       }
   20720             :     }
   20721             :   }
   20722         530 :   if (obj3) {
   20723           2 :     {
   20724             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   20725             :       /* callback_func typemap */
   20726             :       
   20727             :       /* In some cases 0 is passed instead of None. */
   20728             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   20729           2 :       if ( PyLong_Check(obj3) || PyInt_Check(obj3) )
   20730             :       {
   20731           0 :         if( PyLong_AsLong(obj3) == 0 )
   20732             :         {
   20733           0 :           obj3 = Py_None;
   20734             :         }
   20735             :       }
   20736             :       
   20737           2 :       if (obj3 && obj3 != Py_None ) {
   20738           2 :         void* cbfunction = NULL;
   20739           2 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj3,
   20740             :             (void**)&cbfunction,
   20741             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   20742             :             SWIG_POINTER_EXCEPTION | 0 ));
   20743             :         
   20744           2 :         if ( cbfunction == GDALTermProgress ) {
   20745             :           arg5 = GDALTermProgress;
   20746             :         } else {
   20747           2 :           if (!PyCallable_Check(obj3)) {
   20748           0 :             PyErr_SetString( PyExc_RuntimeError,
   20749             :               "Object given is not a Python function" );
   20750           0 :             SWIG_fail;
   20751             :           }
   20752           2 :           psProgressInfo->psPyCallback = obj3;
   20753           2 :           arg5 = PyProgressProxy;
   20754             :         }
   20755             :         
   20756             :       }
   20757             :       
   20758             :     }
   20759             :   }
   20760         530 :   if (obj4) {
   20761           2 :     {
   20762             :       /* %typemap(in) ( void* callback_data=NULL)  */
   20763           2 :       psProgressInfo->psPyCallbackData = obj4 ;
   20764             :     }
   20765             :   }
   20766         530 :   if (obj5) {
   20767          13 :     {
   20768             :       /* %typemap(in) char **dict */
   20769          13 :       arg7 = NULL;
   20770          13 :       if ( PySequence_Check( obj5 ) ) {
   20771          13 :         int bErr = FALSE;
   20772          13 :         arg7 = CSLFromPySequence(obj5, &bErr);
   20773          13 :         if ( bErr )
   20774             :         {
   20775           0 :           SWIG_fail;
   20776             :         }
   20777             :       }
   20778           0 :       else if ( PyMapping_Check( obj5 ) ) {
   20779           0 :         int bErr = FALSE;
   20780           0 :         arg7 = CSLFromPyMapping(obj5, &bErr);
   20781           0 :         if ( bErr )
   20782             :         {
   20783           0 :           SWIG_fail;
   20784             :         }
   20785             :       }
   20786             :       else {
   20787           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   20788           0 :         SWIG_fail;
   20789             :       }
   20790             :     }
   20791             :   }
   20792         530 :   {
   20793         530 :     const int bLocalUseExceptions = GetUseExceptions();
   20794         530 :     if ( bLocalUseExceptions ) {
   20795         114 :       pushErrorHandler();
   20796             :     }
   20797         530 :     {
   20798         530 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20799         530 :       result = (int)GDALDatasetShadow_BuildOverviews(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7);
   20800         530 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20801             :     }
   20802         530 :     if ( bLocalUseExceptions ) {
   20803         114 :       popErrorHandler();
   20804             :     }
   20805             : #ifndef SED_HACKS
   20806             :     if ( bLocalUseExceptions ) {
   20807             :       CPLErr eclass = CPLGetLastErrorType();
   20808             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20809             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20810             :       }
   20811             :     }
   20812             : #endif
   20813             :   }
   20814         530 :   resultobj = SWIG_From_int(static_cast< int >(result));
   20815         530 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   20816         530 :   {
   20817             :     /* %typemap(freearg) (int nList, int* pList) */
   20818         530 :     free(arg4);
   20819             :   }
   20820         530 :   {
   20821             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   20822             :     
   20823         530 :     CPLFree(psProgressInfo);
   20824             :     
   20825             :   }
   20826         530 :   {
   20827             :     /* %typemap(freearg) char **dict */
   20828         530 :     CSLDestroy( arg7 );
   20829             :   }
   20830         530 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   20831             :   return resultobj;
   20832           0 : fail:
   20833           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   20834           0 :   {
   20835             :     /* %typemap(freearg) (int nList, int* pList) */
   20836           0 :     free(arg4);
   20837             :   }
   20838           0 :   {
   20839             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   20840             :     
   20841           0 :     CPLFree(psProgressInfo);
   20842             :     
   20843             :   }
   20844           0 :   {
   20845             :     /* %typemap(freearg) char **dict */
   20846           0 :     CSLDestroy( arg7 );
   20847             :   }
   20848             :   return NULL;
   20849             : }
   20850             : 
   20851             : 
   20852         110 : SWIGINTERN PyObject *_wrap_Dataset_GetGCPCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20853         110 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20854         110 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   20855         110 :   void *argp1 = 0 ;
   20856         110 :   int res1 = 0 ;
   20857         110 :   PyObject *swig_obj[1] ;
   20858         110 :   int result;
   20859             :   
   20860         110 :   if (!args) SWIG_fail;
   20861         110 :   swig_obj[0] = args;
   20862         110 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   20863         110 :   if (!SWIG_IsOK(res1)) {
   20864           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetGCPCount" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   20865             :   }
   20866         110 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   20867         110 :   {
   20868         110 :     const int bLocalUseExceptions = GetUseExceptions();
   20869         110 :     if ( bLocalUseExceptions ) {
   20870          60 :       pushErrorHandler();
   20871             :     }
   20872         110 :     {
   20873         110 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20874         110 :       result = (int)GDALDatasetShadow_GetGCPCount(arg1);
   20875         110 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20876             :     }
   20877         110 :     if ( bLocalUseExceptions ) {
   20878          60 :       popErrorHandler();
   20879             :     }
   20880             : #ifndef SED_HACKS
   20881             :     if ( bLocalUseExceptions ) {
   20882             :       CPLErr eclass = CPLGetLastErrorType();
   20883             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20884             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20885             :       }
   20886             :     }
   20887             : #endif
   20888             :   }
   20889         110 :   resultobj = SWIG_From_int(static_cast< int >(result));
   20890         110 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   20891             :   return resultobj;
   20892             : fail:
   20893             :   return NULL;
   20894             : }
   20895             : 
   20896             : 
   20897          59 : SWIGINTERN PyObject *_wrap_Dataset_GetGCPProjection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20898          59 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20899          59 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   20900          59 :   void *argp1 = 0 ;
   20901          59 :   int res1 = 0 ;
   20902          59 :   PyObject *swig_obj[1] ;
   20903          59 :   char *result = 0 ;
   20904             :   
   20905          59 :   if (!args) SWIG_fail;
   20906          59 :   swig_obj[0] = args;
   20907          59 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   20908          59 :   if (!SWIG_IsOK(res1)) {
   20909           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetGCPProjection" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   20910             :   }
   20911          59 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   20912          59 :   {
   20913          59 :     const int bLocalUseExceptions = GetUseExceptions();
   20914          59 :     if ( bLocalUseExceptions ) {
   20915          36 :       pushErrorHandler();
   20916             :     }
   20917          59 :     {
   20918          59 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20919          59 :       result = (char *)GDALDatasetShadow_GetGCPProjection(arg1);
   20920          59 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20921             :     }
   20922          59 :     if ( bLocalUseExceptions ) {
   20923          36 :       popErrorHandler();
   20924             :     }
   20925             : #ifndef SED_HACKS
   20926             :     if ( bLocalUseExceptions ) {
   20927             :       CPLErr eclass = CPLGetLastErrorType();
   20928             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20929             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20930             :       }
   20931             :     }
   20932             : #endif
   20933             :   }
   20934          59 :   resultobj = SWIG_FromCharPtr((const char *)result);
   20935          59 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   20936             :   return resultobj;
   20937             : fail:
   20938             :   return NULL;
   20939             : }
   20940             : 
   20941             : 
   20942          19 : SWIGINTERN PyObject *_wrap_Dataset_GetGCPSpatialRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20943          19 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20944          19 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   20945          19 :   void *argp1 = 0 ;
   20946          19 :   int res1 = 0 ;
   20947          19 :   PyObject *swig_obj[1] ;
   20948          19 :   OSRSpatialReferenceShadow *result = 0 ;
   20949             :   
   20950          19 :   if (!args) SWIG_fail;
   20951          19 :   swig_obj[0] = args;
   20952          19 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   20953          19 :   if (!SWIG_IsOK(res1)) {
   20954           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetGCPSpatialRef" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   20955             :   }
   20956          19 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   20957          19 :   {
   20958          19 :     const int bLocalUseExceptions = GetUseExceptions();
   20959          19 :     if ( bLocalUseExceptions ) {
   20960           5 :       pushErrorHandler();
   20961             :     }
   20962          19 :     {
   20963          19 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20964          19 :       result = (OSRSpatialReferenceShadow *)GDALDatasetShadow_GetGCPSpatialRef(arg1);
   20965          19 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20966             :     }
   20967          19 :     if ( bLocalUseExceptions ) {
   20968           5 :       popErrorHandler();
   20969             :     }
   20970             : #ifndef SED_HACKS
   20971             :     if ( bLocalUseExceptions ) {
   20972             :       CPLErr eclass = CPLGetLastErrorType();
   20973             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20974             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20975             :       }
   20976             :     }
   20977             : #endif
   20978             :   }
   20979          19 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_POINTER_OWN |  0 );
   20980          19 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   20981             :   return resultobj;
   20982             : fail:
   20983             :   return NULL;
   20984             : }
   20985             : 
   20986             : 
   20987         105 : SWIGINTERN PyObject *_wrap_Dataset_GetGCPs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20988         105 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20989         105 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   20990         105 :   int *arg2 = (int *) 0 ;
   20991         105 :   GDAL_GCP **arg3 = (GDAL_GCP **) 0 ;
   20992         105 :   void *argp1 = 0 ;
   20993         105 :   int res1 = 0 ;
   20994         105 :   int nGCPs2 = 0 ;
   20995         105 :   GDAL_GCP *pGCPs2 = 0 ;
   20996         105 :   PyObject *swig_obj[1] ;
   20997             :   
   20998         105 :   {
   20999             :     /* %typemap(in,numinputs=0) (int *nGCPs2, GDAL_GCP const **pGCPs2 ) */
   21000         105 :     arg2 = &nGCPs2;
   21001         105 :     arg3 = &pGCPs2;
   21002             :   }
   21003         105 :   if (!args) SWIG_fail;
   21004         105 :   swig_obj[0] = args;
   21005         105 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   21006         105 :   if (!SWIG_IsOK(res1)) {
   21007           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetGCPs" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   21008             :   }
   21009         105 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   21010         105 :   {
   21011         105 :     const int bLocalUseExceptions = GetUseExceptions();
   21012         105 :     if ( bLocalUseExceptions ) {
   21013          62 :       pushErrorHandler();
   21014             :     }
   21015         105 :     {
   21016         105 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   21017         105 :       GDALDatasetShadow_GetGCPs(arg1,arg2,(GDAL_GCP const **)arg3);
   21018         105 :       SWIG_PYTHON_THREAD_END_ALLOW;
   21019             :     }
   21020         105 :     if ( bLocalUseExceptions ) {
   21021          62 :       popErrorHandler();
   21022             :     }
   21023             : #ifndef SED_HACKS
   21024             :     if ( bLocalUseExceptions ) {
   21025             :       CPLErr eclass = CPLGetLastErrorType();
   21026             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21027             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21028             :       }
   21029             :     }
   21030             : #endif
   21031             :   }
   21032         105 :   resultobj = SWIG_Py_Void();
   21033         105 :   {
   21034             :     /* %typemap(argout) (int *nGCPs, GDAL_GCP const **pGCPs ) */
   21035         105 :     PyObject *dict = PyTuple_New( *arg2 );
   21036        2579 :     for( int i = 0; i < *arg2; i++ ) {
   21037        4948 :       GDAL_GCP *o = new_GDAL_GCP( (*arg3)[i].dfGCPX,
   21038             :         (*arg3)[i].dfGCPY,
   21039             :         (*arg3)[i].dfGCPZ,
   21040             :         (*arg3)[i].dfGCPPixel,
   21041             :         (*arg3)[i].dfGCPLine,
   21042        2474 :         (*arg3)[i].pszInfo,
   21043        2474 :         (*arg3)[i].pszId );
   21044             :       
   21045        2474 :       PyTuple_SetItem(dict, i,
   21046             :         SWIG_NewPointerObj((void*)o,SWIGTYPE_p_GDAL_GCP,1) );
   21047             :     }
   21048         105 :     Py_DECREF(resultobj);
   21049         105 :     resultobj = dict;
   21050             :   }
   21051         105 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   21052             :   return resultobj;
   21053             : fail:
   21054             :   return NULL;
   21055             : }
   21056             : 
   21057             : 
   21058          30 : SWIGINTERN PyObject *_wrap_Dataset__SetGCPs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21059          30 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   21060          30 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   21061          30 :   int arg2 ;
   21062          30 :   GDAL_GCP *arg3 = (GDAL_GCP *) 0 ;
   21063          30 :   char *arg4 = (char *) 0 ;
   21064          30 :   void *argp1 = 0 ;
   21065          30 :   int res1 = 0 ;
   21066          30 :   GDAL_GCP *tmpGCPList2 ;
   21067          30 :   int res4 ;
   21068          30 :   char *buf4 = 0 ;
   21069          30 :   int alloc4 = 0 ;
   21070          30 :   PyObject *swig_obj[3] ;
   21071          30 :   CPLErr result;
   21072             :   
   21073          30 :   if (!SWIG_Python_UnpackTuple(args, "Dataset__SetGCPs", 3, 3, swig_obj)) SWIG_fail;
   21074          30 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   21075          30 :   if (!SWIG_IsOK(res1)) {
   21076           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset__SetGCPs" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   21077             :   }
   21078          30 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   21079          30 :   {
   21080             :     /* %typemap(in,numinputs=1) (int nGCPs, GDAL_GCP const *pGCPs ) */
   21081             :     /* check if is List */
   21082          30 :     if ( !PySequence_Check(swig_obj[1]) ) {
   21083           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   21084           0 :       SWIG_fail;
   21085             :     }
   21086          30 :     Py_ssize_t size = PySequence_Size(swig_obj[1]);
   21087          30 :     if( size > (Py_ssize_t)INT_MAX ) {
   21088           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   21089           0 :       SWIG_fail;
   21090             :     }
   21091          30 :     if( (size_t)size > SIZE_MAX / sizeof(GDAL_GCP) ) {
   21092           0 :       PyErr_SetString(PyExc_RuntimeError, "too big sequence");
   21093           0 :       SWIG_fail;
   21094             :     }
   21095          30 :     arg2 = (int)size;
   21096          30 :     tmpGCPList2 = (GDAL_GCP*) malloc(arg2*sizeof(GDAL_GCP));
   21097          30 :     if( !tmpGCPList2 ) {
   21098           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   21099           0 :       SWIG_fail;
   21100             :     }
   21101         100 :     arg3 = tmpGCPList2;
   21102         100 :     for( int i = 0; i<arg2; i++ ) {
   21103          70 :       PyObject *o = PySequence_GetItem(swig_obj[1],i);
   21104          70 :       GDAL_GCP *item = 0;
   21105          70 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&item, SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_EXCEPTION | 0 ));
   21106          70 :       if ( ! item ) {
   21107           0 :         Py_DECREF(o);
   21108           0 :         SWIG_fail;
   21109             :       }
   21110          70 :       memcpy( tmpGCPList2 + i, item, sizeof( GDAL_GCP ) );
   21111          70 :       Py_DECREF(o);
   21112             :     }
   21113             :   }
   21114          30 :   res4 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf4, NULL, &alloc4);
   21115          30 :   if (!SWIG_IsOK(res4)) {
   21116           0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Dataset__SetGCPs" "', argument " "4"" of type '" "char const *""'");
   21117             :   }
   21118          30 :   arg4 = reinterpret_cast< char * >(buf4);
   21119          30 :   {
   21120          30 :     const int bLocalUseExceptions = GetUseExceptions();
   21121          30 :     if ( bLocalUseExceptions ) {
   21122          13 :       pushErrorHandler();
   21123             :     }
   21124          30 :     {
   21125          30 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   21126          30 :       CPL_IGNORE_RET_VAL(result = (CPLErr)GDALDatasetShadow_SetGCPs(arg1,arg2,(GDAL_GCP const *)arg3,(char const *)arg4));
   21127          30 :       SWIG_PYTHON_THREAD_END_ALLOW;
   21128             :     }
   21129          30 :     if ( bLocalUseExceptions ) {
   21130          13 :       popErrorHandler();
   21131             :     }
   21132             : #ifndef SED_HACKS
   21133             :     if ( bLocalUseExceptions ) {
   21134             :       CPLErr eclass = CPLGetLastErrorType();
   21135             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21136             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21137             :       }
   21138             :     }
   21139             : #endif
   21140             :   }
   21141          30 :   resultobj = SWIG_From_int(static_cast< int >(result));
   21142          30 :   {
   21143             :     /* %typemap(freearg) (int nGCPs, GDAL_GCP const *pGCPs ) */
   21144          30 :     free( arg3 );
   21145             :   }
   21146          30 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   21147          30 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   21148             :   return resultobj;
   21149           0 : fail:
   21150           0 :   {
   21151             :     /* %typemap(freearg) (int nGCPs, GDAL_GCP const *pGCPs ) */
   21152           0 :     free( arg3 );
   21153             :   }
   21154           0 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   21155             :   return NULL;
   21156             : }
   21157             : 
   21158             : 
   21159           6 : SWIGINTERN PyObject *_wrap_Dataset__SetGCPs2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21160           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   21161           6 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   21162           6 :   int arg2 ;
   21163           6 :   GDAL_GCP *arg3 = (GDAL_GCP *) 0 ;
   21164           6 :   OSRSpatialReferenceShadow *arg4 = (OSRSpatialReferenceShadow *) 0 ;
   21165           6 :   void *argp1 = 0 ;
   21166           6 :   int res1 = 0 ;
   21167           6 :   GDAL_GCP *tmpGCPList2 ;
   21168           6 :   void *argp4 = 0 ;
   21169           6 :   int res4 = 0 ;
   21170           6 :   PyObject *swig_obj[3] ;
   21171           6 :   CPLErr result;
   21172             :   
   21173           6 :   if (!SWIG_Python_UnpackTuple(args, "Dataset__SetGCPs2", 3, 3, swig_obj)) SWIG_fail;
   21174           6 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   21175           6 :   if (!SWIG_IsOK(res1)) {
   21176           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset__SetGCPs2" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   21177             :   }
   21178           6 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   21179           6 :   {
   21180             :     /* %typemap(in,numinputs=1) (int nGCPs, GDAL_GCP const *pGCPs ) */
   21181             :     /* check if is List */
   21182           6 :     if ( !PySequence_Check(swig_obj[1]) ) {
   21183           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   21184           0 :       SWIG_fail;
   21185             :     }
   21186           6 :     Py_ssize_t size = PySequence_Size(swig_obj[1]);
   21187           6 :     if( size > (Py_ssize_t)INT_MAX ) {
   21188           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   21189           0 :       SWIG_fail;
   21190             :     }
   21191           6 :     if( (size_t)size > SIZE_MAX / sizeof(GDAL_GCP) ) {
   21192           0 :       PyErr_SetString(PyExc_RuntimeError, "too big sequence");
   21193           0 :       SWIG_fail;
   21194             :     }
   21195           6 :     arg2 = (int)size;
   21196           6 :     tmpGCPList2 = (GDAL_GCP*) malloc(arg2*sizeof(GDAL_GCP));
   21197           6 :     if( !tmpGCPList2 ) {
   21198           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   21199           0 :       SWIG_fail;
   21200             :     }
   21201          12 :     arg3 = tmpGCPList2;
   21202          12 :     for( int i = 0; i<arg2; i++ ) {
   21203           6 :       PyObject *o = PySequence_GetItem(swig_obj[1],i);
   21204           6 :       GDAL_GCP *item = 0;
   21205           6 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&item, SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_EXCEPTION | 0 ));
   21206           6 :       if ( ! item ) {
   21207           0 :         Py_DECREF(o);
   21208           0 :         SWIG_fail;
   21209             :       }
   21210           6 :       memcpy( tmpGCPList2 + i, item, sizeof( GDAL_GCP ) );
   21211           6 :       Py_DECREF(o);
   21212             :     }
   21213             :   }
   21214           6 :   res4 = SWIG_ConvertPtr(swig_obj[2], &argp4,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
   21215           6 :   if (!SWIG_IsOK(res4)) {
   21216           0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Dataset__SetGCPs2" "', argument " "4"" of type '" "OSRSpatialReferenceShadow *""'"); 
   21217             :   }
   21218           6 :   arg4 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp4);
   21219           6 :   {
   21220           6 :     const int bLocalUseExceptions = GetUseExceptions();
   21221           6 :     if ( bLocalUseExceptions ) {
   21222           1 :       pushErrorHandler();
   21223             :     }
   21224           6 :     {
   21225           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   21226           6 :       CPL_IGNORE_RET_VAL(result = (CPLErr)GDALDatasetShadow_SetGCPs2(arg1,arg2,(GDAL_GCP const *)arg3,arg4));
   21227           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   21228             :     }
   21229           6 :     if ( bLocalUseExceptions ) {
   21230           1 :       popErrorHandler();
   21231             :     }
   21232             : #ifndef SED_HACKS
   21233             :     if ( bLocalUseExceptions ) {
   21234             :       CPLErr eclass = CPLGetLastErrorType();
   21235             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21236             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21237             :       }
   21238             :     }
   21239             : #endif
   21240             :   }
   21241           6 :   resultobj = SWIG_From_int(static_cast< int >(result));
   21242           6 :   {
   21243             :     /* %typemap(freearg) (int nGCPs, GDAL_GCP const *pGCPs ) */
   21244           6 :     free( arg3 );
   21245             :   }
   21246           6 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   21247             :   return resultobj;
   21248           0 : fail:
   21249           0 :   {
   21250             :     /* %typemap(freearg) (int nGCPs, GDAL_GCP const *pGCPs ) */
   21251           0 :     free( arg3 );
   21252             :   }
   21253           0 :   return NULL;
   21254             : }
   21255             : 
   21256             : 
   21257        1609 : SWIGINTERN PyObject *_wrap_Dataset_FlushCache(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21258        1609 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   21259        1609 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   21260        1609 :   void *argp1 = 0 ;
   21261        1609 :   int res1 = 0 ;
   21262        1609 :   PyObject *swig_obj[1] ;
   21263        1609 :   CPLErr result;
   21264             :   
   21265        1609 :   if (!args) SWIG_fail;
   21266        1609 :   swig_obj[0] = args;
   21267        1609 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   21268        1609 :   if (!SWIG_IsOK(res1)) {
   21269           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_FlushCache" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   21270             :   }
   21271        1609 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   21272        1609 :   {
   21273        1609 :     const int bLocalUseExceptions = GetUseExceptions();
   21274        1609 :     if ( bLocalUseExceptions ) {
   21275         397 :       pushErrorHandler();
   21276             :     }
   21277        1609 :     {
   21278        1609 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   21279        1609 :       CPL_IGNORE_RET_VAL(result = (CPLErr)GDALDatasetShadow_FlushCache(arg1));
   21280        1609 :       SWIG_PYTHON_THREAD_END_ALLOW;
   21281             :     }
   21282        1609 :     if ( bLocalUseExceptions ) {
   21283         397 :       popErrorHandler();
   21284             :     }
   21285             : #ifndef SED_HACKS
   21286             :     if ( bLocalUseExceptions ) {
   21287             :       CPLErr eclass = CPLGetLastErrorType();
   21288             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21289             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21290             :       }
   21291             :     }
   21292             : #endif
   21293             :   }
   21294        1609 :   resultobj = SWIG_From_int(static_cast< int >(result));
   21295        1609 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   21296             :   return resultobj;
   21297             : fail:
   21298             :   return NULL;
   21299             : }
   21300             : 
   21301             : 
   21302          26 : SWIGINTERN PyObject *_wrap_Dataset_AddBand(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   21303          26 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   21304          26 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   21305          26 :   GDALDataType arg2 = (GDALDataType) GDT_Byte ;
   21306          26 :   char **arg3 = (char **) 0 ;
   21307          26 :   void *argp1 = 0 ;
   21308          26 :   int res1 = 0 ;
   21309          26 :   PyObject * obj0 = 0 ;
   21310          26 :   PyObject * obj1 = 0 ;
   21311          26 :   PyObject * obj2 = 0 ;
   21312          26 :   char * kwnames[] = {
   21313             :     (char *)"self",  (char *)"datatype",  (char *)"options",  NULL 
   21314             :   };
   21315          26 :   CPLErr result;
   21316             :   
   21317          26 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OO:Dataset_AddBand", kwnames, &obj0, &obj1, &obj2)) SWIG_fail;
   21318          26 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   21319          26 :   if (!SWIG_IsOK(res1)) {
   21320           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_AddBand" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   21321             :   }
   21322          26 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   21323          26 :   if (obj1) {
   21324          20 :     {
   21325             :       // %typemap(in) GDALDataType
   21326          20 :       int val = 0;
   21327          20 :       int ecode = SWIG_AsVal_int(obj1, &val);
   21328          20 :       if (!SWIG_IsOK(ecode)) {
   21329           0 :         SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   21330             :       }
   21331          20 :       if( val < GDT_Unknown || val >= GDT_TypeCount )
   21332             :       {
   21333           0 :         SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   21334             :       }
   21335             :       arg2 = static_cast<GDALDataType>(val);
   21336             :     }
   21337             :   }
   21338          26 :   if (obj2) {
   21339          13 :     {
   21340             :       /* %typemap(in) char **dict */
   21341          13 :       arg3 = NULL;
   21342          13 :       if ( PySequence_Check( obj2 ) ) {
   21343          13 :         int bErr = FALSE;
   21344          13 :         arg3 = CSLFromPySequence(obj2, &bErr);
   21345          13 :         if ( bErr )
   21346             :         {
   21347           0 :           SWIG_fail;
   21348             :         }
   21349             :       }
   21350           0 :       else if ( PyMapping_Check( obj2 ) ) {
   21351           0 :         int bErr = FALSE;
   21352           0 :         arg3 = CSLFromPyMapping(obj2, &bErr);
   21353           0 :         if ( bErr )
   21354             :         {
   21355           0 :           SWIG_fail;
   21356             :         }
   21357             :       }
   21358             :       else {
   21359           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   21360           0 :         SWIG_fail;
   21361             :       }
   21362             :     }
   21363             :   }
   21364          26 :   {
   21365          26 :     const int bLocalUseExceptions = GetUseExceptions();
   21366          26 :     if ( bLocalUseExceptions ) {
   21367          16 :       pushErrorHandler();
   21368             :     }
   21369          26 :     {
   21370          26 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   21371          26 :       CPL_IGNORE_RET_VAL(result = (CPLErr)GDALDatasetShadow_AddBand(arg1,arg2,arg3));
   21372          26 :       SWIG_PYTHON_THREAD_END_ALLOW;
   21373             :     }
   21374          26 :     if ( bLocalUseExceptions ) {
   21375          16 :       popErrorHandler();
   21376             :     }
   21377             : #ifndef SED_HACKS
   21378             :     if ( bLocalUseExceptions ) {
   21379             :       CPLErr eclass = CPLGetLastErrorType();
   21380             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21381             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21382             :       }
   21383             :     }
   21384             : #endif
   21385             :   }
   21386          26 :   resultobj = SWIG_From_int(static_cast< int >(result));
   21387          26 :   {
   21388             :     /* %typemap(freearg) char **dict */
   21389          26 :     CSLDestroy( arg3 );
   21390             :   }
   21391          26 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   21392             :   return resultobj;
   21393           0 : fail:
   21394           0 :   {
   21395             :     /* %typemap(freearg) char **dict */
   21396           0 :     CSLDestroy( arg3 );
   21397             :   }
   21398             :   return NULL;
   21399             : }
   21400             : 
   21401             : 
   21402          51 : SWIGINTERN PyObject *_wrap_Dataset_CreateMaskBand(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21403          51 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   21404          51 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   21405          51 :   int arg2 ;
   21406          51 :   void *argp1 = 0 ;
   21407          51 :   int res1 = 0 ;
   21408          51 :   int val2 ;
   21409          51 :   int ecode2 = 0 ;
   21410          51 :   PyObject *swig_obj[2] ;
   21411          51 :   CPLErr result;
   21412             :   
   21413          51 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_CreateMaskBand", 2, 2, swig_obj)) SWIG_fail;
   21414          51 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   21415          51 :   if (!SWIG_IsOK(res1)) {
   21416           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_CreateMaskBand" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   21417             :   }
   21418          51 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   21419          51 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   21420          51 :   if (!SWIG_IsOK(ecode2)) {
   21421           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_CreateMaskBand" "', argument " "2"" of type '" "int""'");
   21422             :   } 
   21423          51 :   arg2 = static_cast< int >(val2);
   21424          51 :   {
   21425          51 :     const int bLocalUseExceptions = GetUseExceptions();
   21426          51 :     if ( bLocalUseExceptions ) {
   21427          15 :       pushErrorHandler();
   21428             :     }
   21429          51 :     {
   21430          51 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   21431          51 :       CPL_IGNORE_RET_VAL(result = (CPLErr)GDALDatasetShadow_CreateMaskBand(arg1,arg2));
   21432          51 :       SWIG_PYTHON_THREAD_END_ALLOW;
   21433             :     }
   21434          51 :     if ( bLocalUseExceptions ) {
   21435          15 :       popErrorHandler();
   21436             :     }
   21437             : #ifndef SED_HACKS
   21438             :     if ( bLocalUseExceptions ) {
   21439             :       CPLErr eclass = CPLGetLastErrorType();
   21440             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21441             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21442             :       }
   21443             :     }
   21444             : #endif
   21445             :   }
   21446          51 :   resultobj = SWIG_From_int(static_cast< int >(result));
   21447          52 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   21448             :   return resultobj;
   21449             : fail:
   21450             :   return NULL;
   21451             : }
   21452             : 
   21453             : 
   21454         435 : SWIGINTERN PyObject *_wrap_Dataset_GetFileList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21455         435 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   21456         435 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   21457         435 :   void *argp1 = 0 ;
   21458         435 :   int res1 = 0 ;
   21459         435 :   PyObject *swig_obj[1] ;
   21460         435 :   char **result = 0 ;
   21461             :   
   21462         435 :   if (!args) SWIG_fail;
   21463         435 :   swig_obj[0] = args;
   21464         435 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   21465         435 :   if (!SWIG_IsOK(res1)) {
   21466           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetFileList" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   21467             :   }
   21468         435 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   21469         435 :   {
   21470         435 :     const int bLocalUseExceptions = GetUseExceptions();
   21471         435 :     if ( bLocalUseExceptions ) {
   21472         289 :       pushErrorHandler();
   21473             :     }
   21474         435 :     {
   21475         435 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   21476         435 :       result = (char **)GDALDatasetShadow_GetFileList(arg1);
   21477         435 :       SWIG_PYTHON_THREAD_END_ALLOW;
   21478             :     }
   21479         435 :     if ( bLocalUseExceptions ) {
   21480         289 :       popErrorHandler();
   21481             :     }
   21482             : #ifndef SED_HACKS
   21483             :     if ( bLocalUseExceptions ) {
   21484             :       CPLErr eclass = CPLGetLastErrorType();
   21485             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21486             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21487             :       }
   21488             :     }
   21489             : #endif
   21490             :   }
   21491         435 :   {
   21492             :     /* %typemap(out) char **CSL -> ( string ) */
   21493         435 :     bool bErr = false;
   21494         435 :     resultobj = CSLToList(result, &bErr);
   21495         435 :     CSLDestroy(result);
   21496         435 :     if( bErr ) {
   21497           0 :       SWIG_fail;
   21498             :     }
   21499             :   }
   21500         436 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   21501             :   return resultobj;
   21502             : fail:
   21503             :   return NULL;
   21504             : }
   21505             : 
   21506             : 
   21507      173446 : SWIGINTERN PyObject *_wrap_Dataset_WriteRaster(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   21508      173446 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   21509      173446 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   21510      173446 :   int arg2 ;
   21511      173446 :   int arg3 ;
   21512      173446 :   int arg4 ;
   21513      173446 :   int arg5 ;
   21514      173446 :   GIntBig arg6 ;
   21515      173446 :   char *arg7 = (char *) 0 ;
   21516      173446 :   int *arg8 = (int *) 0 ;
   21517      173446 :   int *arg9 = (int *) 0 ;
   21518      173446 :   GDALDataType *arg10 = (GDALDataType *) 0 ;
   21519      173446 :   int arg11 = (int) 0 ;
   21520      173446 :   int *arg12 = (int *) 0 ;
   21521      173446 :   GIntBig *arg13 = (GIntBig *) 0 ;
   21522      173446 :   GIntBig *arg14 = (GIntBig *) 0 ;
   21523      173446 :   GIntBig *arg15 = (GIntBig *) 0 ;
   21524      173446 :   void *argp1 = 0 ;
   21525      173446 :   int res1 = 0 ;
   21526      173446 :   int val2 ;
   21527      173446 :   int ecode2 = 0 ;
   21528      173446 :   int val3 ;
   21529      173446 :   int ecode3 = 0 ;
   21530      173446 :   int val4 ;
   21531      173446 :   int ecode4 = 0 ;
   21532      173446 :   int val5 ;
   21533      173446 :   int ecode5 = 0 ;
   21534      173446 :   int alloc6 = 0 ;
   21535      173446 :   bool viewIsValid6 = false ;
   21536      173446 :   Py_buffer view6 ;
   21537      173446 :   int val8 ;
   21538      173446 :   int val9 ;
   21539      173446 :   GDALDataType val10 ;
   21540      173446 :   GIntBig val13 ;
   21541      173446 :   GIntBig val14 ;
   21542      173446 :   GIntBig val15 ;
   21543      173446 :   PyObject * obj0 = 0 ;
   21544      173446 :   PyObject * obj1 = 0 ;
   21545      173446 :   PyObject * obj2 = 0 ;
   21546      173446 :   PyObject * obj3 = 0 ;
   21547      173446 :   PyObject * obj4 = 0 ;
   21548      173446 :   PyObject * obj5 = 0 ;
   21549      173446 :   PyObject * obj6 = 0 ;
   21550      173446 :   PyObject * obj7 = 0 ;
   21551      173446 :   PyObject * obj8 = 0 ;
   21552      173446 :   PyObject * obj9 = 0 ;
   21553      173446 :   PyObject * obj10 = 0 ;
   21554      173446 :   PyObject * obj11 = 0 ;
   21555      173446 :   PyObject * obj12 = 0 ;
   21556      173446 :   char * kwnames[] = {
   21557             :     (char *)"self",  (char *)"xoff",  (char *)"yoff",  (char *)"xsize",  (char *)"ysize",  (char *)"buf_len",  (char *)"buf_xsize",  (char *)"buf_ysize",  (char *)"buf_type",  (char *)"band_list",  (char *)"buf_pixel_space",  (char *)"buf_line_space",  (char *)"buf_band_space",  NULL 
   21558             :   };
   21559      173446 :   CPLErr result;
   21560             :   
   21561      173446 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO|OOOOOOO:Dataset_WriteRaster", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10, &obj11, &obj12)) SWIG_fail;
   21562      173446 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   21563      173446 :   if (!SWIG_IsOK(res1)) {
   21564           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_WriteRaster" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   21565             :   }
   21566      173446 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   21567      173446 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   21568      173446 :   if (!SWIG_IsOK(ecode2)) {
   21569           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_WriteRaster" "', argument " "2"" of type '" "int""'");
   21570             :   } 
   21571      173446 :   arg2 = static_cast< int >(val2);
   21572      173446 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   21573      173446 :   if (!SWIG_IsOK(ecode3)) {
   21574           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Dataset_WriteRaster" "', argument " "3"" of type '" "int""'");
   21575             :   } 
   21576      173446 :   arg3 = static_cast< int >(val3);
   21577      173446 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   21578      173446 :   if (!SWIG_IsOK(ecode4)) {
   21579           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Dataset_WriteRaster" "', argument " "4"" of type '" "int""'");
   21580             :   } 
   21581      173446 :   arg4 = static_cast< int >(val4);
   21582      173446 :   ecode5 = SWIG_AsVal_int(obj4, &val5);
   21583      173446 :   if (!SWIG_IsOK(ecode5)) {
   21584           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Dataset_WriteRaster" "', argument " "5"" of type '" "int""'");
   21585             :   } 
   21586      173446 :   arg5 = static_cast< int >(val5);
   21587      173446 :   {
   21588             :     /* %typemap(in,numinputs=1) (GIntBig nLen, char *pBuf ) */
   21589      173446 :     char* ptr = NULL;
   21590      173446 :     if( !GetBufferAsCharPtrGIntBigSize(obj5, &arg6, &ptr, &alloc6, &viewIsValid6, &view6) ) {
   21591           1 :       SWIG_fail;
   21592             :     }
   21593      173445 :     arg7 = (char *)ptr;
   21594             :   }
   21595      173445 :   if (obj6) {
   21596      173445 :     {
   21597             :       /* %typemap(in) (int *optional_##int) */
   21598      173445 :       if ( obj6 == Py_None ) {
   21599             :         arg8 = 0;
   21600             :       }
   21601      173445 :       else if ( PyArg_Parse( obj6,"i" ,&val8 ) ) {
   21602             :         arg8 = (int *) &val8;
   21603             :       }
   21604             :       else {
   21605           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   21606           0 :         SWIG_fail;
   21607             :       }
   21608             :     }
   21609             :   }
   21610      173445 :   if (obj7) {
   21611      173445 :     {
   21612             :       /* %typemap(in) (int *optional_##int) */
   21613      173445 :       if ( obj7 == Py_None ) {
   21614             :         arg9 = 0;
   21615             :       }
   21616      173445 :       else if ( PyArg_Parse( obj7,"i" ,&val9 ) ) {
   21617             :         arg9 = (int *) &val9;
   21618             :       }
   21619             :       else {
   21620           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   21621           0 :         SWIG_fail;
   21622             :       }
   21623             :     }
   21624             :   }
   21625      173445 :   if (obj8) {
   21626      173445 :     {
   21627             :       /* %typemap(in) (GDALDataType *optional_GDALDataType) */
   21628      173445 :       int intval = 0;
   21629      173445 :       if ( obj8 == Py_None ) {
   21630             :         arg10 = NULL;
   21631             :       }
   21632      346890 :       else if ( SWIG_IsOK(SWIG_AsVal_int(obj8, &intval)) ) {
   21633      173445 :         if( intval < GDT_Unknown || intval >= GDT_TypeCount )
   21634             :         {
   21635           0 :           SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   21636             :         }
   21637      173445 :         val10 = static_cast<GDALDataType>(intval);
   21638      173445 :         arg10 = &val10;
   21639             :       }
   21640             :       else {
   21641           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   21642           0 :         SWIG_fail;
   21643             :       }
   21644             :     }
   21645             :   }
   21646      173445 :   if (obj9) {
   21647      173445 :     {
   21648             :       /* %typemap(in,numinputs=1) (int nList, int* pList)*/
   21649      173445 :       arg12 = CreateCIntListFromSequence(obj9, &arg11);
   21650      173445 :       if( arg11 < 0 ) {
   21651           0 :         SWIG_fail;
   21652             :       }
   21653             :     }
   21654             :   }
   21655      173445 :   if (obj10) {
   21656      173445 :     {
   21657             :       /* %typemap(in) (GIntBig *optional_##GIntBig) */
   21658      173445 :       if ( obj10 == Py_None ) {
   21659             :         arg13 = 0;
   21660             :       }
   21661          24 :       else if ( PyArg_Parse( obj10,"L" ,&val13 ) ) {
   21662             :         arg13 = (GIntBig *) &val13;
   21663             :       }
   21664             :       else {
   21665           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   21666           0 :         SWIG_fail;
   21667             :       }
   21668             :     }
   21669             :   }
   21670      173445 :   if (obj11) {
   21671      173445 :     {
   21672             :       /* %typemap(in) (GIntBig *optional_##GIntBig) */
   21673      173445 :       if ( obj11 == Py_None ) {
   21674             :         arg14 = 0;
   21675             :       }
   21676          12 :       else if ( PyArg_Parse( obj11,"L" ,&val14 ) ) {
   21677             :         arg14 = (GIntBig *) &val14;
   21678             :       }
   21679             :       else {
   21680           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   21681           0 :         SWIG_fail;
   21682             :       }
   21683             :     }
   21684             :   }
   21685      173445 :   if (obj12) {
   21686      173445 :     {
   21687             :       /* %typemap(in) (GIntBig *optional_##GIntBig) */
   21688      173445 :       if ( obj12 == Py_None ) {
   21689             :         arg15 = 0;
   21690             :       }
   21691          24 :       else if ( PyArg_Parse( obj12,"L" ,&val15 ) ) {
   21692             :         arg15 = (GIntBig *) &val15;
   21693             :       }
   21694             :       else {
   21695           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   21696           0 :         SWIG_fail;
   21697             :       }
   21698             :     }
   21699             :   }
   21700      173445 :   {
   21701      173445 :     const int bLocalUseExceptions = GetUseExceptions();
   21702      173445 :     if ( bLocalUseExceptions ) {
   21703        2624 :       pushErrorHandler();
   21704             :     }
   21705      173445 :     {
   21706      173445 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   21707      173445 :       CPL_IGNORE_RET_VAL(result = (CPLErr)GDALDatasetShadow_WriteRaster(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15));
   21708      173445 :       SWIG_PYTHON_THREAD_END_ALLOW;
   21709             :     }
   21710      173445 :     if ( bLocalUseExceptions ) {
   21711        2624 :       popErrorHandler();
   21712             :     }
   21713             : #ifndef SED_HACKS
   21714             :     if ( bLocalUseExceptions ) {
   21715             :       CPLErr eclass = CPLGetLastErrorType();
   21716             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21717             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21718             :       }
   21719             :     }
   21720             : #endif
   21721             :   }
   21722      173445 :   resultobj = SWIG_From_int(static_cast< int >(result));
   21723      173445 :   {
   21724             :     /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
   21725      173445 :     if( viewIsValid6 ) {
   21726      172435 :       PyBuffer_Release(&view6);
   21727             :     }
   21728        1010 :     else if (ReturnSame(alloc6) == SWIG_NEWOBJ ) {
   21729        1010 :       delete[] arg7;
   21730             :     }
   21731             :   }
   21732      173445 :   {
   21733             :     /* %typemap(freearg) (int nList, int* pList) */
   21734      173445 :     free(arg12);
   21735             :   }
   21736      173446 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   21737             :   return resultobj;
   21738           1 : fail:
   21739           1 :   {
   21740             :     /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
   21741           1 :     if( viewIsValid6 ) {
   21742           0 :       PyBuffer_Release(&view6);
   21743             :     }
   21744           1 :     else if (ReturnSame(alloc6) == SWIG_NEWOBJ ) {
   21745           0 :       delete[] arg7;
   21746             :     }
   21747             :   }
   21748           1 :   {
   21749             :     /* %typemap(freearg) (int nList, int* pList) */
   21750           1 :     free(arg12);
   21751             :   }
   21752           1 :   return NULL;
   21753             : }
   21754             : 
   21755             : 
   21756           1 : SWIGINTERN PyObject *_wrap_Dataset_AdviseRead(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21757           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   21758           1 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   21759           1 :   int arg2 ;
   21760           1 :   int arg3 ;
   21761           1 :   int arg4 ;
   21762           1 :   int arg5 ;
   21763           1 :   int *arg6 = (int *) 0 ;
   21764           1 :   int *arg7 = (int *) 0 ;
   21765           1 :   GDALDataType *arg8 = (GDALDataType *) 0 ;
   21766           1 :   int arg9 = (int) 0 ;
   21767           1 :   int *arg10 = (int *) 0 ;
   21768           1 :   char **arg11 = (char **) NULL ;
   21769           1 :   void *argp1 = 0 ;
   21770           1 :   int res1 = 0 ;
   21771           1 :   int val2 ;
   21772           1 :   int ecode2 = 0 ;
   21773           1 :   int val3 ;
   21774           1 :   int ecode3 = 0 ;
   21775           1 :   int val4 ;
   21776           1 :   int ecode4 = 0 ;
   21777           1 :   int val5 ;
   21778           1 :   int ecode5 = 0 ;
   21779           1 :   void *argp6 = 0 ;
   21780           1 :   int res6 = 0 ;
   21781           1 :   void *argp7 = 0 ;
   21782           1 :   int res7 = 0 ;
   21783           1 :   int val8 ;
   21784           1 :   PyObject *swig_obj[10] ;
   21785           1 :   CPLErr result;
   21786             :   
   21787           1 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_AdviseRead", 5, 10, swig_obj)) SWIG_fail;
   21788           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   21789           1 :   if (!SWIG_IsOK(res1)) {
   21790           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_AdviseRead" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   21791             :   }
   21792           1 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   21793           1 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   21794           1 :   if (!SWIG_IsOK(ecode2)) {
   21795           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_AdviseRead" "', argument " "2"" of type '" "int""'");
   21796             :   } 
   21797           1 :   arg2 = static_cast< int >(val2);
   21798           1 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   21799           1 :   if (!SWIG_IsOK(ecode3)) {
   21800           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Dataset_AdviseRead" "', argument " "3"" of type '" "int""'");
   21801             :   } 
   21802           1 :   arg3 = static_cast< int >(val3);
   21803           1 :   ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
   21804           1 :   if (!SWIG_IsOK(ecode4)) {
   21805           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Dataset_AdviseRead" "', argument " "4"" of type '" "int""'");
   21806             :   } 
   21807           1 :   arg4 = static_cast< int >(val4);
   21808           1 :   ecode5 = SWIG_AsVal_int(swig_obj[4], &val5);
   21809           1 :   if (!SWIG_IsOK(ecode5)) {
   21810           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Dataset_AdviseRead" "', argument " "5"" of type '" "int""'");
   21811             :   } 
   21812           1 :   arg5 = static_cast< int >(val5);
   21813           1 :   if (swig_obj[5]) {
   21814           0 :     res6 = SWIG_ConvertPtr(swig_obj[5], &argp6,SWIGTYPE_p_int, 0 |  0 );
   21815           0 :     if (!SWIG_IsOK(res6)) {
   21816           0 :       SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "Dataset_AdviseRead" "', argument " "6"" of type '" "int *""'"); 
   21817             :     }
   21818           0 :     arg6 = reinterpret_cast< int * >(argp6);
   21819             :   }
   21820           1 :   if (swig_obj[6]) {
   21821           0 :     res7 = SWIG_ConvertPtr(swig_obj[6], &argp7,SWIGTYPE_p_int, 0 |  0 );
   21822           0 :     if (!SWIG_IsOK(res7)) {
   21823           0 :       SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "Dataset_AdviseRead" "', argument " "7"" of type '" "int *""'"); 
   21824             :     }
   21825           0 :     arg7 = reinterpret_cast< int * >(argp7);
   21826             :   }
   21827           1 :   if (swig_obj[7]) {
   21828           0 :     {
   21829             :       /* %typemap(in) (int *optional_##int) */
   21830           0 :       if ( swig_obj[7] == Py_None ) {
   21831             :         arg8 = 0;
   21832             :       }
   21833           0 :       else if ( PyArg_Parse( swig_obj[7],"i" ,&val8 ) ) {
   21834             :         arg8 = (GDALDataType *) &val8;
   21835             :       }
   21836             :       else {
   21837           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   21838           0 :         SWIG_fail;
   21839             :       }
   21840             :     }
   21841             :   }
   21842           1 :   if (swig_obj[8]) {
   21843           0 :     {
   21844             :       /* %typemap(in,numinputs=1) (int nList, int* pList)*/
   21845           0 :       arg10 = CreateCIntListFromSequence(swig_obj[8], &arg9);
   21846           0 :       if( arg9 < 0 ) {
   21847           0 :         SWIG_fail;
   21848             :       }
   21849             :     }
   21850             :   }
   21851           1 :   if (swig_obj[9]) {
   21852           0 :     {
   21853             :       /* %typemap(in) char **dict */
   21854           0 :       arg11 = NULL;
   21855           0 :       if ( PySequence_Check( swig_obj[9] ) ) {
   21856           0 :         int bErr = FALSE;
   21857           0 :         arg11 = CSLFromPySequence(swig_obj[9], &bErr);
   21858           0 :         if ( bErr )
   21859             :         {
   21860           0 :           SWIG_fail;
   21861             :         }
   21862             :       }
   21863           0 :       else if ( PyMapping_Check( swig_obj[9] ) ) {
   21864           0 :         int bErr = FALSE;
   21865           0 :         arg11 = CSLFromPyMapping(swig_obj[9], &bErr);
   21866           0 :         if ( bErr )
   21867             :         {
   21868           0 :           SWIG_fail;
   21869             :         }
   21870             :       }
   21871             :       else {
   21872           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   21873           0 :         SWIG_fail;
   21874             :       }
   21875             :     }
   21876             :   }
   21877           1 :   {
   21878           1 :     const int bLocalUseExceptions = GetUseExceptions();
   21879           1 :     if ( bLocalUseExceptions ) {
   21880           0 :       pushErrorHandler();
   21881             :     }
   21882           1 :     {
   21883           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   21884           1 :       CPL_IGNORE_RET_VAL(result = (CPLErr)GDALDatasetShadow_AdviseRead(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11));
   21885           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   21886             :     }
   21887           1 :     if ( bLocalUseExceptions ) {
   21888           0 :       popErrorHandler();
   21889             :     }
   21890             : #ifndef SED_HACKS
   21891             :     if ( bLocalUseExceptions ) {
   21892             :       CPLErr eclass = CPLGetLastErrorType();
   21893             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21894             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21895             :       }
   21896             :     }
   21897             : #endif
   21898             :   }
   21899           1 :   resultobj = SWIG_From_int(static_cast< int >(result));
   21900           1 :   {
   21901             :     /* %typemap(freearg) (int nList, int* pList) */
   21902           1 :     free(arg10);
   21903             :   }
   21904           1 :   {
   21905             :     /* %typemap(freearg) char **dict */
   21906           1 :     CSLDestroy( arg11 );
   21907             :   }
   21908           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   21909             :   return resultobj;
   21910           0 : fail:
   21911           0 :   {
   21912             :     /* %typemap(freearg) (int nList, int* pList) */
   21913           0 :     free(arg10);
   21914             :   }
   21915           0 :   {
   21916             :     /* %typemap(freearg) char **dict */
   21917           0 :     CSLDestroy( arg11 );
   21918             :   }
   21919             :   return NULL;
   21920             : }
   21921             : 
   21922             : 
   21923           1 : SWIGINTERN PyObject *_wrap_Dataset_BeginAsyncReader(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   21924           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   21925           1 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   21926           1 :   int arg2 ;
   21927           1 :   int arg3 ;
   21928           1 :   int arg4 ;
   21929           1 :   int arg5 ;
   21930           1 :   size_t arg6 ;
   21931           1 :   char *arg7 = (char *) 0 ;
   21932           1 :   void *arg8 = (void *) 0 ;
   21933           1 :   int arg9 ;
   21934           1 :   int arg10 ;
   21935           1 :   GDALDataType arg11 = (GDALDataType) (GDALDataType) 0 ;
   21936           1 :   int arg12 = (int) 0 ;
   21937           1 :   int *arg13 = (int *) 0 ;
   21938           1 :   int arg14 = (int) 0 ;
   21939           1 :   int arg15 = (int) 0 ;
   21940           1 :   int arg16 = (int) 0 ;
   21941           1 :   char **arg17 = (char **) 0 ;
   21942           1 :   void *argp1 = 0 ;
   21943           1 :   int res1 = 0 ;
   21944           1 :   int val2 ;
   21945           1 :   int ecode2 = 0 ;
   21946           1 :   int val3 ;
   21947           1 :   int ecode3 = 0 ;
   21948           1 :   int val4 ;
   21949           1 :   int ecode4 = 0 ;
   21950           1 :   int val5 ;
   21951           1 :   int ecode5 = 0 ;
   21952           1 :   int val9 ;
   21953           1 :   int ecode9 = 0 ;
   21954           1 :   int val10 ;
   21955           1 :   int ecode10 = 0 ;
   21956           1 :   int val14 ;
   21957           1 :   int ecode14 = 0 ;
   21958           1 :   int val15 ;
   21959           1 :   int ecode15 = 0 ;
   21960           1 :   int val16 ;
   21961           1 :   int ecode16 = 0 ;
   21962           1 :   PyObject * obj0 = 0 ;
   21963           1 :   PyObject * obj1 = 0 ;
   21964           1 :   PyObject * obj2 = 0 ;
   21965           1 :   PyObject * obj3 = 0 ;
   21966           1 :   PyObject * obj4 = 0 ;
   21967           1 :   PyObject * obj5 = 0 ;
   21968           1 :   PyObject * obj6 = 0 ;
   21969           1 :   PyObject * obj7 = 0 ;
   21970           1 :   PyObject * obj8 = 0 ;
   21971           1 :   PyObject * obj9 = 0 ;
   21972           1 :   PyObject * obj10 = 0 ;
   21973           1 :   PyObject * obj11 = 0 ;
   21974           1 :   PyObject * obj12 = 0 ;
   21975           1 :   PyObject * obj13 = 0 ;
   21976           1 :   char * kwnames[] = {
   21977             :     (char *)"self",  (char *)"xOff",  (char *)"yOff",  (char *)"xSize",  (char *)"ySize",  (char *)"buf_len",  (char *)"buf_xsize",  (char *)"buf_ysize",  (char *)"bufType",  (char *)"band_list",  (char *)"nPixelSpace",  (char *)"nLineSpace",  (char *)"nBandSpace",  (char *)"options",  NULL 
   21978             :   };
   21979           1 :   GDALAsyncReaderShadow *result = 0 ;
   21980             :   
   21981           1 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOOO|OOOOOO:Dataset_BeginAsyncReader", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10, &obj11, &obj12, &obj13)) SWIG_fail;
   21982           1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   21983           1 :   if (!SWIG_IsOK(res1)) {
   21984           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_BeginAsyncReader" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   21985             :   }
   21986           1 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   21987           1 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   21988           1 :   if (!SWIG_IsOK(ecode2)) {
   21989           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_BeginAsyncReader" "', argument " "2"" of type '" "int""'");
   21990             :   } 
   21991           1 :   arg2 = static_cast< int >(val2);
   21992           1 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   21993           1 :   if (!SWIG_IsOK(ecode3)) {
   21994           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Dataset_BeginAsyncReader" "', argument " "3"" of type '" "int""'");
   21995             :   } 
   21996           1 :   arg3 = static_cast< int >(val3);
   21997           1 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   21998           1 :   if (!SWIG_IsOK(ecode4)) {
   21999           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Dataset_BeginAsyncReader" "', argument " "4"" of type '" "int""'");
   22000             :   } 
   22001           1 :   arg4 = static_cast< int >(val4);
   22002           1 :   ecode5 = SWIG_AsVal_int(obj4, &val5);
   22003           1 :   if (!SWIG_IsOK(ecode5)) {
   22004           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Dataset_BeginAsyncReader" "', argument " "5"" of type '" "int""'");
   22005             :   } 
   22006           1 :   arg5 = static_cast< int >(val5);
   22007           1 :   {
   22008             :     /* %typemap(in,numinputs=1) (size_t nLenKeepObject, char *pBufKeepObject, void* pyObject) */
   22009           1 :     if (PyBytes_Check(obj5))
   22010             :     {
   22011           1 :       Py_ssize_t safeLen = 0;
   22012           1 :       PyBytes_AsStringAndSize(obj5, (char**) &arg7, &safeLen);
   22013           1 :       arg6 = safeLen;
   22014           1 :       arg8 = obj5;
   22015             :     }
   22016             :     else
   22017             :     {
   22018           0 :       PyErr_SetString(PyExc_TypeError, "not a bytes");
   22019           0 :       SWIG_fail;
   22020             :     }
   22021             :   }
   22022           1 :   ecode9 = SWIG_AsVal_int(obj6, &val9);
   22023           1 :   if (!SWIG_IsOK(ecode9)) {
   22024           0 :     SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "Dataset_BeginAsyncReader" "', argument " "9"" of type '" "int""'");
   22025             :   } 
   22026           1 :   arg9 = static_cast< int >(val9);
   22027           1 :   ecode10 = SWIG_AsVal_int(obj7, &val10);
   22028           1 :   if (!SWIG_IsOK(ecode10)) {
   22029           0 :     SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "Dataset_BeginAsyncReader" "', argument " "10"" of type '" "int""'");
   22030             :   } 
   22031           1 :   arg10 = static_cast< int >(val10);
   22032           1 :   if (obj8) {
   22033           1 :     {
   22034             :       // %typemap(in) GDALDataType
   22035           1 :       int val = 0;
   22036           1 :       int ecode = SWIG_AsVal_int(obj8, &val);
   22037           1 :       if (!SWIG_IsOK(ecode)) {
   22038           0 :         SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   22039             :       }
   22040           1 :       if( val < GDT_Unknown || val >= GDT_TypeCount )
   22041             :       {
   22042           0 :         SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   22043             :       }
   22044             :       arg11 = static_cast<GDALDataType>(val);
   22045             :     }
   22046             :   }
   22047           1 :   if (obj9) {
   22048           1 :     {
   22049             :       /* %typemap(in,numinputs=1) (int nList, int* pList)*/
   22050           1 :       arg13 = CreateCIntListFromSequence(obj9, &arg12);
   22051           1 :       if( arg12 < 0 ) {
   22052           0 :         SWIG_fail;
   22053             :       }
   22054             :     }
   22055             :   }
   22056           1 :   if (obj10) {
   22057           1 :     ecode14 = SWIG_AsVal_int(obj10, &val14);
   22058           1 :     if (!SWIG_IsOK(ecode14)) {
   22059           0 :       SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "Dataset_BeginAsyncReader" "', argument " "14"" of type '" "int""'");
   22060             :     } 
   22061             :     arg14 = static_cast< int >(val14);
   22062             :   }
   22063           1 :   if (obj11) {
   22064           1 :     ecode15 = SWIG_AsVal_int(obj11, &val15);
   22065           1 :     if (!SWIG_IsOK(ecode15)) {
   22066           0 :       SWIG_exception_fail(SWIG_ArgError(ecode15), "in method '" "Dataset_BeginAsyncReader" "', argument " "15"" of type '" "int""'");
   22067             :     } 
   22068             :     arg15 = static_cast< int >(val15);
   22069             :   }
   22070           1 :   if (obj12) {
   22071           1 :     ecode16 = SWIG_AsVal_int(obj12, &val16);
   22072           1 :     if (!SWIG_IsOK(ecode16)) {
   22073           0 :       SWIG_exception_fail(SWIG_ArgError(ecode16), "in method '" "Dataset_BeginAsyncReader" "', argument " "16"" of type '" "int""'");
   22074             :     } 
   22075             :     arg16 = static_cast< int >(val16);
   22076             :   }
   22077           1 :   if (obj13) {
   22078           1 :     {
   22079             :       /* %typemap(in) char **dict */
   22080           1 :       arg17 = NULL;
   22081           1 :       if ( PySequence_Check( obj13 ) ) {
   22082           1 :         int bErr = FALSE;
   22083           1 :         arg17 = CSLFromPySequence(obj13, &bErr);
   22084           1 :         if ( bErr )
   22085             :         {
   22086           0 :           SWIG_fail;
   22087             :         }
   22088             :       }
   22089           0 :       else if ( PyMapping_Check( obj13 ) ) {
   22090           0 :         int bErr = FALSE;
   22091           0 :         arg17 = CSLFromPyMapping(obj13, &bErr);
   22092           0 :         if ( bErr )
   22093             :         {
   22094           0 :           SWIG_fail;
   22095             :         }
   22096             :       }
   22097             :       else {
   22098           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   22099           0 :         SWIG_fail;
   22100             :       }
   22101             :     }
   22102             :   }
   22103           1 :   {
   22104           1 :     const int bLocalUseExceptions = GetUseExceptions();
   22105           1 :     if ( bLocalUseExceptions ) {
   22106           1 :       pushErrorHandler();
   22107             :     }
   22108           1 :     {
   22109           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22110           1 :       result = (GDALAsyncReaderShadow *)GDALDatasetShadow_BeginAsyncReader(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17);
   22111           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22112             :     }
   22113           1 :     if ( bLocalUseExceptions ) {
   22114           1 :       popErrorHandler();
   22115             :     }
   22116             : #ifndef SED_HACKS
   22117             :     if ( bLocalUseExceptions ) {
   22118             :       CPLErr eclass = CPLGetLastErrorType();
   22119             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22120             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22121             :       }
   22122             :     }
   22123             : #endif
   22124             :   }
   22125           1 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALAsyncReaderShadow, SWIG_POINTER_OWN |  0 );
   22126           1 :   {
   22127             :     /* %typemap(freearg) (int nList, int* pList) */
   22128           1 :     free(arg13);
   22129             :   }
   22130           1 :   {
   22131             :     /* %typemap(freearg) char **dict */
   22132           1 :     CSLDestroy( arg17 );
   22133             :   }
   22134           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   22135             :   return resultobj;
   22136           0 : fail:
   22137           0 :   {
   22138             :     /* %typemap(freearg) (int nList, int* pList) */
   22139           0 :     free(arg13);
   22140             :   }
   22141           0 :   {
   22142             :     /* %typemap(freearg) char **dict */
   22143           0 :     CSLDestroy( arg17 );
   22144             :   }
   22145             :   return NULL;
   22146             : }
   22147             : 
   22148             : 
   22149           1 : SWIGINTERN PyObject *_wrap_Dataset_EndAsyncReader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22150           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22151           1 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   22152           1 :   GDALAsyncReaderShadow *arg2 = (GDALAsyncReaderShadow *) 0 ;
   22153           1 :   void *argp1 = 0 ;
   22154           1 :   int res1 = 0 ;
   22155           1 :   void *argp2 = 0 ;
   22156           1 :   int res2 = 0 ;
   22157           1 :   PyObject *swig_obj[2] ;
   22158             :   
   22159           1 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_EndAsyncReader", 2, 2, swig_obj)) SWIG_fail;
   22160           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   22161           1 :   if (!SWIG_IsOK(res1)) {
   22162           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_EndAsyncReader" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   22163             :   }
   22164           1 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   22165           1 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALAsyncReaderShadow, 0 |  0 );
   22166           1 :   if (!SWIG_IsOK(res2)) {
   22167           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_EndAsyncReader" "', argument " "2"" of type '" "GDALAsyncReaderShadow *""'"); 
   22168             :   }
   22169           1 :   arg2 = reinterpret_cast< GDALAsyncReaderShadow * >(argp2);
   22170           1 :   {
   22171           1 :     const int bLocalUseExceptions = GetUseExceptions();
   22172           1 :     if ( bLocalUseExceptions ) {
   22173           1 :       pushErrorHandler();
   22174             :     }
   22175           1 :     {
   22176           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22177           1 :       GDALDatasetShadow_EndAsyncReader(arg1,arg2);
   22178           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22179             :     }
   22180           1 :     if ( bLocalUseExceptions ) {
   22181           1 :       popErrorHandler();
   22182             :     }
   22183             : #ifndef SED_HACKS
   22184             :     if ( bLocalUseExceptions ) {
   22185             :       CPLErr eclass = CPLGetLastErrorType();
   22186             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22187             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22188             :       }
   22189             :     }
   22190             : #endif
   22191             :   }
   22192           1 :   resultobj = SWIG_Py_Void();
   22193           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   22194             :   return resultobj;
   22195             : fail:
   22196             :   return NULL;
   22197             : }
   22198             : 
   22199             : 
   22200           3 : SWIGINTERN PyObject *_wrap_Dataset_GetVirtualMem(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   22201           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22202           3 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   22203           3 :   GDALRWFlag arg2 ;
   22204           3 :   int arg3 ;
   22205           3 :   int arg4 ;
   22206           3 :   int arg5 ;
   22207           3 :   int arg6 ;
   22208           3 :   int arg7 ;
   22209           3 :   int arg8 ;
   22210           3 :   GDALDataType arg9 ;
   22211           3 :   int arg10 ;
   22212           3 :   int *arg11 = (int *) 0 ;
   22213           3 :   int arg12 ;
   22214           3 :   size_t arg13 ;
   22215           3 :   size_t arg14 ;
   22216           3 :   char **arg15 = (char **) NULL ;
   22217           3 :   void *argp1 = 0 ;
   22218           3 :   int res1 = 0 ;
   22219           3 :   int val2 ;
   22220           3 :   int ecode2 = 0 ;
   22221           3 :   int val3 ;
   22222           3 :   int ecode3 = 0 ;
   22223           3 :   int val4 ;
   22224           3 :   int ecode4 = 0 ;
   22225           3 :   int val5 ;
   22226           3 :   int ecode5 = 0 ;
   22227           3 :   int val6 ;
   22228           3 :   int ecode6 = 0 ;
   22229           3 :   int val7 ;
   22230           3 :   int ecode7 = 0 ;
   22231           3 :   int val8 ;
   22232           3 :   int ecode8 = 0 ;
   22233           3 :   int val12 ;
   22234           3 :   int ecode12 = 0 ;
   22235           3 :   size_t val13 ;
   22236           3 :   int ecode13 = 0 ;
   22237           3 :   size_t val14 ;
   22238           3 :   int ecode14 = 0 ;
   22239           3 :   PyObject * obj0 = 0 ;
   22240           3 :   PyObject * obj1 = 0 ;
   22241           3 :   PyObject * obj2 = 0 ;
   22242           3 :   PyObject * obj3 = 0 ;
   22243           3 :   PyObject * obj4 = 0 ;
   22244           3 :   PyObject * obj5 = 0 ;
   22245           3 :   PyObject * obj6 = 0 ;
   22246           3 :   PyObject * obj7 = 0 ;
   22247           3 :   PyObject * obj8 = 0 ;
   22248           3 :   PyObject * obj9 = 0 ;
   22249           3 :   PyObject * obj10 = 0 ;
   22250           3 :   PyObject * obj11 = 0 ;
   22251           3 :   PyObject * obj12 = 0 ;
   22252           3 :   PyObject * obj13 = 0 ;
   22253           3 :   char * kwnames[] = {
   22254             :     (char *)"self",  (char *)"eRWFlag",  (char *)"nXOff",  (char *)"nYOff",  (char *)"nXSize",  (char *)"nYSize",  (char *)"nBufXSize",  (char *)"nBufYSize",  (char *)"eBufType",  (char *)"band_list",  (char *)"bIsBandSequential",  (char *)"nCacheSize",  (char *)"nPageSizeHint",  (char *)"options",  NULL 
   22255             :   };
   22256           3 :   CPLVirtualMemShadow *result = 0 ;
   22257             :   
   22258           3 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOOOOOOOO|O:Dataset_GetVirtualMem", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10, &obj11, &obj12, &obj13)) SWIG_fail;
   22259           3 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   22260           3 :   if (!SWIG_IsOK(res1)) {
   22261           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetVirtualMem" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   22262             :   }
   22263           3 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   22264           3 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   22265           3 :   if (!SWIG_IsOK(ecode2)) {
   22266           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_GetVirtualMem" "', argument " "2"" of type '" "GDALRWFlag""'");
   22267             :   } 
   22268           3 :   arg2 = static_cast< GDALRWFlag >(val2);
   22269           3 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   22270           3 :   if (!SWIG_IsOK(ecode3)) {
   22271           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Dataset_GetVirtualMem" "', argument " "3"" of type '" "int""'");
   22272             :   } 
   22273           3 :   arg3 = static_cast< int >(val3);
   22274           3 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   22275           3 :   if (!SWIG_IsOK(ecode4)) {
   22276           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Dataset_GetVirtualMem" "', argument " "4"" of type '" "int""'");
   22277             :   } 
   22278           3 :   arg4 = static_cast< int >(val4);
   22279           3 :   ecode5 = SWIG_AsVal_int(obj4, &val5);
   22280           3 :   if (!SWIG_IsOK(ecode5)) {
   22281           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Dataset_GetVirtualMem" "', argument " "5"" of type '" "int""'");
   22282             :   } 
   22283           3 :   arg5 = static_cast< int >(val5);
   22284           3 :   ecode6 = SWIG_AsVal_int(obj5, &val6);
   22285           3 :   if (!SWIG_IsOK(ecode6)) {
   22286           0 :     SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Dataset_GetVirtualMem" "', argument " "6"" of type '" "int""'");
   22287             :   } 
   22288           3 :   arg6 = static_cast< int >(val6);
   22289           3 :   ecode7 = SWIG_AsVal_int(obj6, &val7);
   22290           3 :   if (!SWIG_IsOK(ecode7)) {
   22291           0 :     SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "Dataset_GetVirtualMem" "', argument " "7"" of type '" "int""'");
   22292             :   } 
   22293           3 :   arg7 = static_cast< int >(val7);
   22294           3 :   ecode8 = SWIG_AsVal_int(obj7, &val8);
   22295           3 :   if (!SWIG_IsOK(ecode8)) {
   22296           0 :     SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "Dataset_GetVirtualMem" "', argument " "8"" of type '" "int""'");
   22297             :   } 
   22298           3 :   arg8 = static_cast< int >(val8);
   22299           3 :   {
   22300             :     // %typemap(in) GDALDataType
   22301           3 :     int val = 0;
   22302           3 :     int ecode = SWIG_AsVal_int(obj8, &val);
   22303           3 :     if (!SWIG_IsOK(ecode)) {
   22304           0 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   22305             :     }
   22306           3 :     if( val < GDT_Unknown || val >= GDT_TypeCount )
   22307             :     {
   22308           0 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   22309             :     }
   22310           3 :     arg9 = static_cast<GDALDataType>(val);
   22311             :   }
   22312           3 :   {
   22313             :     /* %typemap(in,numinputs=1) (int nList, int* pList)*/
   22314           3 :     arg11 = CreateCIntListFromSequence(obj9, &arg10);
   22315           3 :     if( arg10 < 0 ) {
   22316           0 :       SWIG_fail;
   22317             :     }
   22318             :   }
   22319           3 :   ecode12 = SWIG_AsVal_int(obj10, &val12);
   22320           3 :   if (!SWIG_IsOK(ecode12)) {
   22321           0 :     SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "Dataset_GetVirtualMem" "', argument " "12"" of type '" "int""'");
   22322             :   } 
   22323           3 :   arg12 = static_cast< int >(val12);
   22324           3 :   ecode13 = SWIG_AsVal_size_t(obj11, &val13);
   22325           3 :   if (!SWIG_IsOK(ecode13)) {
   22326           0 :     SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "Dataset_GetVirtualMem" "', argument " "13"" of type '" "size_t""'");
   22327             :   } 
   22328           3 :   arg13 = static_cast< size_t >(val13);
   22329           3 :   ecode14 = SWIG_AsVal_size_t(obj12, &val14);
   22330           3 :   if (!SWIG_IsOK(ecode14)) {
   22331           0 :     SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "Dataset_GetVirtualMem" "', argument " "14"" of type '" "size_t""'");
   22332             :   } 
   22333           3 :   arg14 = static_cast< size_t >(val14);
   22334           3 :   if (obj13) {
   22335           0 :     {
   22336             :       /* %typemap(in) char **dict */
   22337           0 :       arg15 = NULL;
   22338           0 :       if ( PySequence_Check( obj13 ) ) {
   22339           0 :         int bErr = FALSE;
   22340           0 :         arg15 = CSLFromPySequence(obj13, &bErr);
   22341           0 :         if ( bErr )
   22342             :         {
   22343           0 :           SWIG_fail;
   22344             :         }
   22345             :       }
   22346           0 :       else if ( PyMapping_Check( obj13 ) ) {
   22347           0 :         int bErr = FALSE;
   22348           0 :         arg15 = CSLFromPyMapping(obj13, &bErr);
   22349           0 :         if ( bErr )
   22350             :         {
   22351           0 :           SWIG_fail;
   22352             :         }
   22353             :       }
   22354             :       else {
   22355           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   22356           0 :         SWIG_fail;
   22357             :       }
   22358             :     }
   22359             :   }
   22360           3 :   {
   22361           3 :     const int bLocalUseExceptions = GetUseExceptions();
   22362           3 :     if ( bLocalUseExceptions ) {
   22363           3 :       pushErrorHandler();
   22364             :     }
   22365           3 :     {
   22366           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22367           3 :       result = (CPLVirtualMemShadow *)GDALDatasetShadow_GetVirtualMem(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15);
   22368           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22369             :     }
   22370           3 :     if ( bLocalUseExceptions ) {
   22371           3 :       popErrorHandler();
   22372             :     }
   22373             : #ifndef SED_HACKS
   22374             :     if ( bLocalUseExceptions ) {
   22375             :       CPLErr eclass = CPLGetLastErrorType();
   22376             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22377             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22378             :       }
   22379             :     }
   22380             : #endif
   22381             :   }
   22382           3 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CPLVirtualMemShadow, SWIG_POINTER_OWN |  0 );
   22383           3 :   {
   22384             :     /* %typemap(freearg) (int nList, int* pList) */
   22385           3 :     free(arg11);
   22386             :   }
   22387           3 :   {
   22388             :     /* %typemap(freearg) char **dict */
   22389           3 :     CSLDestroy( arg15 );
   22390             :   }
   22391           3 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   22392             :   return resultobj;
   22393           0 : fail:
   22394           0 :   {
   22395             :     /* %typemap(freearg) (int nList, int* pList) */
   22396           0 :     free(arg11);
   22397             :   }
   22398           0 :   {
   22399             :     /* %typemap(freearg) char **dict */
   22400           0 :     CSLDestroy( arg15 );
   22401             :   }
   22402             :   return NULL;
   22403             : }
   22404             : 
   22405             : 
   22406           3 : SWIGINTERN PyObject *_wrap_Dataset_GetTiledVirtualMem(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   22407           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22408           3 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   22409           3 :   GDALRWFlag arg2 ;
   22410           3 :   int arg3 ;
   22411           3 :   int arg4 ;
   22412           3 :   int arg5 ;
   22413           3 :   int arg6 ;
   22414           3 :   int arg7 ;
   22415           3 :   int arg8 ;
   22416           3 :   GDALDataType arg9 ;
   22417           3 :   int arg10 ;
   22418           3 :   int *arg11 = (int *) 0 ;
   22419           3 :   GDALTileOrganization arg12 ;
   22420           3 :   size_t arg13 ;
   22421           3 :   char **arg14 = (char **) NULL ;
   22422           3 :   void *argp1 = 0 ;
   22423           3 :   int res1 = 0 ;
   22424           3 :   int val2 ;
   22425           3 :   int ecode2 = 0 ;
   22426           3 :   int val3 ;
   22427           3 :   int ecode3 = 0 ;
   22428           3 :   int val4 ;
   22429           3 :   int ecode4 = 0 ;
   22430           3 :   int val5 ;
   22431           3 :   int ecode5 = 0 ;
   22432           3 :   int val6 ;
   22433           3 :   int ecode6 = 0 ;
   22434           3 :   int val7 ;
   22435           3 :   int ecode7 = 0 ;
   22436           3 :   int val8 ;
   22437           3 :   int ecode8 = 0 ;
   22438           3 :   int val12 ;
   22439           3 :   int ecode12 = 0 ;
   22440           3 :   size_t val13 ;
   22441           3 :   int ecode13 = 0 ;
   22442           3 :   PyObject * obj0 = 0 ;
   22443           3 :   PyObject * obj1 = 0 ;
   22444           3 :   PyObject * obj2 = 0 ;
   22445           3 :   PyObject * obj3 = 0 ;
   22446           3 :   PyObject * obj4 = 0 ;
   22447           3 :   PyObject * obj5 = 0 ;
   22448           3 :   PyObject * obj6 = 0 ;
   22449           3 :   PyObject * obj7 = 0 ;
   22450           3 :   PyObject * obj8 = 0 ;
   22451           3 :   PyObject * obj9 = 0 ;
   22452           3 :   PyObject * obj10 = 0 ;
   22453           3 :   PyObject * obj11 = 0 ;
   22454           3 :   PyObject * obj12 = 0 ;
   22455           3 :   char * kwnames[] = {
   22456             :     (char *)"self",  (char *)"eRWFlag",  (char *)"nXOff",  (char *)"nYOff",  (char *)"nXSize",  (char *)"nYSize",  (char *)"nTileXSize",  (char *)"nTileYSize",  (char *)"eBufType",  (char *)"band_list",  (char *)"eTileOrganization",  (char *)"nCacheSize",  (char *)"options",  NULL 
   22457             :   };
   22458           3 :   CPLVirtualMemShadow *result = 0 ;
   22459             :   
   22460           3 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOOOOOOO|O:Dataset_GetTiledVirtualMem", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10, &obj11, &obj12)) SWIG_fail;
   22461           3 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   22462           3 :   if (!SWIG_IsOK(res1)) {
   22463           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetTiledVirtualMem" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   22464             :   }
   22465           3 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   22466           3 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   22467           3 :   if (!SWIG_IsOK(ecode2)) {
   22468           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_GetTiledVirtualMem" "', argument " "2"" of type '" "GDALRWFlag""'");
   22469             :   } 
   22470           3 :   arg2 = static_cast< GDALRWFlag >(val2);
   22471           3 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   22472           3 :   if (!SWIG_IsOK(ecode3)) {
   22473           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Dataset_GetTiledVirtualMem" "', argument " "3"" of type '" "int""'");
   22474             :   } 
   22475           3 :   arg3 = static_cast< int >(val3);
   22476           3 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   22477           3 :   if (!SWIG_IsOK(ecode4)) {
   22478           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Dataset_GetTiledVirtualMem" "', argument " "4"" of type '" "int""'");
   22479             :   } 
   22480           3 :   arg4 = static_cast< int >(val4);
   22481           3 :   ecode5 = SWIG_AsVal_int(obj4, &val5);
   22482           3 :   if (!SWIG_IsOK(ecode5)) {
   22483           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Dataset_GetTiledVirtualMem" "', argument " "5"" of type '" "int""'");
   22484             :   } 
   22485           3 :   arg5 = static_cast< int >(val5);
   22486           3 :   ecode6 = SWIG_AsVal_int(obj5, &val6);
   22487           3 :   if (!SWIG_IsOK(ecode6)) {
   22488           0 :     SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Dataset_GetTiledVirtualMem" "', argument " "6"" of type '" "int""'");
   22489             :   } 
   22490           3 :   arg6 = static_cast< int >(val6);
   22491           3 :   ecode7 = SWIG_AsVal_int(obj6, &val7);
   22492           3 :   if (!SWIG_IsOK(ecode7)) {
   22493           0 :     SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "Dataset_GetTiledVirtualMem" "', argument " "7"" of type '" "int""'");
   22494             :   } 
   22495           3 :   arg7 = static_cast< int >(val7);
   22496           3 :   ecode8 = SWIG_AsVal_int(obj7, &val8);
   22497           3 :   if (!SWIG_IsOK(ecode8)) {
   22498           0 :     SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "Dataset_GetTiledVirtualMem" "', argument " "8"" of type '" "int""'");
   22499             :   } 
   22500           3 :   arg8 = static_cast< int >(val8);
   22501           3 :   {
   22502             :     // %typemap(in) GDALDataType
   22503           3 :     int val = 0;
   22504           3 :     int ecode = SWIG_AsVal_int(obj8, &val);
   22505           3 :     if (!SWIG_IsOK(ecode)) {
   22506           0 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   22507             :     }
   22508           3 :     if( val < GDT_Unknown || val >= GDT_TypeCount )
   22509             :     {
   22510           0 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   22511             :     }
   22512           3 :     arg9 = static_cast<GDALDataType>(val);
   22513             :   }
   22514           3 :   {
   22515             :     /* %typemap(in,numinputs=1) (int nList, int* pList)*/
   22516           3 :     arg11 = CreateCIntListFromSequence(obj9, &arg10);
   22517           3 :     if( arg10 < 0 ) {
   22518           0 :       SWIG_fail;
   22519             :     }
   22520             :   }
   22521           3 :   ecode12 = SWIG_AsVal_int(obj10, &val12);
   22522           3 :   if (!SWIG_IsOK(ecode12)) {
   22523           0 :     SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "Dataset_GetTiledVirtualMem" "', argument " "12"" of type '" "GDALTileOrganization""'");
   22524             :   } 
   22525           3 :   arg12 = static_cast< GDALTileOrganization >(val12);
   22526           3 :   ecode13 = SWIG_AsVal_size_t(obj11, &val13);
   22527           3 :   if (!SWIG_IsOK(ecode13)) {
   22528           0 :     SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "Dataset_GetTiledVirtualMem" "', argument " "13"" of type '" "size_t""'");
   22529             :   } 
   22530           3 :   arg13 = static_cast< size_t >(val13);
   22531           3 :   if (obj12) {
   22532           0 :     {
   22533             :       /* %typemap(in) char **dict */
   22534           0 :       arg14 = NULL;
   22535           0 :       if ( PySequence_Check( obj12 ) ) {
   22536           0 :         int bErr = FALSE;
   22537           0 :         arg14 = CSLFromPySequence(obj12, &bErr);
   22538           0 :         if ( bErr )
   22539             :         {
   22540           0 :           SWIG_fail;
   22541             :         }
   22542             :       }
   22543           0 :       else if ( PyMapping_Check( obj12 ) ) {
   22544           0 :         int bErr = FALSE;
   22545           0 :         arg14 = CSLFromPyMapping(obj12, &bErr);
   22546           0 :         if ( bErr )
   22547             :         {
   22548           0 :           SWIG_fail;
   22549             :         }
   22550             :       }
   22551             :       else {
   22552           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   22553           0 :         SWIG_fail;
   22554             :       }
   22555             :     }
   22556             :   }
   22557           3 :   {
   22558           3 :     const int bLocalUseExceptions = GetUseExceptions();
   22559           3 :     if ( bLocalUseExceptions ) {
   22560           3 :       pushErrorHandler();
   22561             :     }
   22562           3 :     {
   22563           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22564           3 :       result = (CPLVirtualMemShadow *)GDALDatasetShadow_GetTiledVirtualMem(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14);
   22565           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22566             :     }
   22567           3 :     if ( bLocalUseExceptions ) {
   22568           3 :       popErrorHandler();
   22569             :     }
   22570             : #ifndef SED_HACKS
   22571             :     if ( bLocalUseExceptions ) {
   22572             :       CPLErr eclass = CPLGetLastErrorType();
   22573             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22574             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22575             :       }
   22576             :     }
   22577             : #endif
   22578             :   }
   22579           3 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CPLVirtualMemShadow, SWIG_POINTER_OWN |  0 );
   22580           3 :   {
   22581             :     /* %typemap(freearg) (int nList, int* pList) */
   22582           3 :     free(arg11);
   22583             :   }
   22584           3 :   {
   22585             :     /* %typemap(freearg) char **dict */
   22586           3 :     CSLDestroy( arg14 );
   22587             :   }
   22588           3 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   22589             :   return resultobj;
   22590           0 : fail:
   22591           0 :   {
   22592             :     /* %typemap(freearg) (int nList, int* pList) */
   22593           0 :     free(arg11);
   22594             :   }
   22595           0 :   {
   22596             :     /* %typemap(freearg) char **dict */
   22597           0 :     CSLDestroy( arg14 );
   22598             :   }
   22599             :   return NULL;
   22600             : }
   22601             : 
   22602             : 
   22603        5330 : SWIGINTERN PyObject *_wrap_Dataset_CreateLayer(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   22604        5330 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22605        5330 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   22606        5330 :   char *arg2 = (char *) 0 ;
   22607        5330 :   OSRSpatialReferenceShadow *arg3 = (OSRSpatialReferenceShadow *) NULL ;
   22608        5330 :   OGRwkbGeometryType arg4 = (OGRwkbGeometryType) wkbUnknown ;
   22609        5330 :   char **arg5 = (char **) 0 ;
   22610        5330 :   void *argp1 = 0 ;
   22611        5330 :   int res1 = 0 ;
   22612        5330 :   int res2 ;
   22613        5330 :   char *buf2 = 0 ;
   22614        5330 :   int alloc2 = 0 ;
   22615        5330 :   void *argp3 = 0 ;
   22616        5330 :   int res3 = 0 ;
   22617        5330 :   int val4 ;
   22618        5330 :   int ecode4 = 0 ;
   22619        5330 :   PyObject * obj0 = 0 ;
   22620        5330 :   PyObject * obj1 = 0 ;
   22621        5330 :   PyObject * obj2 = 0 ;
   22622        5330 :   PyObject * obj3 = 0 ;
   22623        5330 :   PyObject * obj4 = 0 ;
   22624        5330 :   char * kwnames[] = {
   22625             :     (char *)"self",  (char *)"name",  (char *)"srs",  (char *)"geom_type",  (char *)"options",  NULL 
   22626             :   };
   22627        5330 :   OGRLayerShadow *result = 0 ;
   22628             :   
   22629        5330 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OOO:Dataset_CreateLayer", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
   22630        5330 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   22631        5330 :   if (!SWIG_IsOK(res1)) {
   22632           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_CreateLayer" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   22633             :   }
   22634        5330 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   22635        5330 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   22636        5330 :   if (!SWIG_IsOK(res2)) {
   22637           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_CreateLayer" "', argument " "2"" of type '" "char const *""'");
   22638             :   }
   22639        5330 :   arg2 = reinterpret_cast< char * >(buf2);
   22640        5330 :   if (obj2) {
   22641        1154 :     res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
   22642        1154 :     if (!SWIG_IsOK(res3)) {
   22643           0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Dataset_CreateLayer" "', argument " "3"" of type '" "OSRSpatialReferenceShadow *""'"); 
   22644             :     }
   22645        1154 :     arg3 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp3);
   22646             :   }
   22647        5330 :   if (obj3) {
   22648        1612 :     ecode4 = SWIG_AsVal_int(obj3, &val4);
   22649        1612 :     if (!SWIG_IsOK(ecode4)) {
   22650           0 :       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Dataset_CreateLayer" "', argument " "4"" of type '" "OGRwkbGeometryType""'");
   22651             :     } 
   22652        1612 :     arg4 = static_cast< OGRwkbGeometryType >(val4);
   22653             :   }
   22654        5330 :   if (obj4) {
   22655        1085 :     {
   22656             :       /* %typemap(in) char **dict */
   22657        1085 :       arg5 = NULL;
   22658        1085 :       if ( PySequence_Check( obj4 ) ) {
   22659        1053 :         int bErr = FALSE;
   22660        1053 :         arg5 = CSLFromPySequence(obj4, &bErr);
   22661        1053 :         if ( bErr )
   22662             :         {
   22663           0 :           SWIG_fail;
   22664             :         }
   22665             :       }
   22666          32 :       else if ( PyMapping_Check( obj4 ) ) {
   22667          32 :         int bErr = FALSE;
   22668          32 :         arg5 = CSLFromPyMapping(obj4, &bErr);
   22669          32 :         if ( bErr )
   22670             :         {
   22671           0 :           SWIG_fail;
   22672             :         }
   22673             :       }
   22674             :       else {
   22675           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   22676           0 :         SWIG_fail;
   22677             :       }
   22678             :     }
   22679             :   }
   22680        5330 :   {
   22681        5330 :     const int bLocalUseExceptions = GetUseExceptions();
   22682        5330 :     if ( bLocalUseExceptions ) {
   22683        1152 :       pushErrorHandler();
   22684             :     }
   22685        5330 :     {
   22686        5330 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22687        5330 :       result = (OGRLayerShadow *)GDALDatasetShadow_CreateLayer(arg1,(char const *)arg2,arg3,arg4,arg5);
   22688        5330 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22689             :     }
   22690        5330 :     if ( bLocalUseExceptions ) {
   22691        1152 :       popErrorHandler();
   22692             :     }
   22693             : #ifndef SED_HACKS
   22694             :     if ( bLocalUseExceptions ) {
   22695             :       CPLErr eclass = CPLGetLastErrorType();
   22696             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22697             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22698             :       }
   22699             :     }
   22700             : #endif
   22701             :   }
   22702        5330 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
   22703        5330 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   22704        5330 :   {
   22705             :     /* %typemap(freearg) char **dict */
   22706        5330 :     CSLDestroy( arg5 );
   22707             :   }
   22708        5353 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   22709             :   return resultobj;
   22710           0 : fail:
   22711           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   22712           0 :   {
   22713             :     /* %typemap(freearg) char **dict */
   22714           0 :     CSLDestroy( arg5 );
   22715             :   }
   22716             :   return NULL;
   22717             : }
   22718             : 
   22719             : 
   22720          15 : SWIGINTERN PyObject *_wrap_Dataset_CreateLayerFromGeomFieldDefn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22721          15 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22722          15 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   22723          15 :   char *arg2 = (char *) 0 ;
   22724          15 :   OGRGeomFieldDefnShadow *arg3 = (OGRGeomFieldDefnShadow *) 0 ;
   22725          15 :   char **arg4 = (char **) 0 ;
   22726          15 :   void *argp1 = 0 ;
   22727          15 :   int res1 = 0 ;
   22728          15 :   int res2 ;
   22729          15 :   char *buf2 = 0 ;
   22730          15 :   int alloc2 = 0 ;
   22731          15 :   void *argp3 = 0 ;
   22732          15 :   int res3 = 0 ;
   22733          15 :   PyObject *swig_obj[4] ;
   22734          15 :   OGRLayerShadow *result = 0 ;
   22735             :   
   22736          15 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_CreateLayerFromGeomFieldDefn", 3, 4, swig_obj)) SWIG_fail;
   22737          15 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   22738          15 :   if (!SWIG_IsOK(res1)) {
   22739           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_CreateLayerFromGeomFieldDefn" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   22740             :   }
   22741          15 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   22742          15 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   22743          15 :   if (!SWIG_IsOK(res2)) {
   22744           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_CreateLayerFromGeomFieldDefn" "', argument " "2"" of type '" "char const *""'");
   22745             :   }
   22746          15 :   arg2 = reinterpret_cast< char * >(buf2);
   22747          15 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_OGRGeomFieldDefnShadow, 0 |  0 );
   22748          15 :   if (!SWIG_IsOK(res3)) {
   22749           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Dataset_CreateLayerFromGeomFieldDefn" "', argument " "3"" of type '" "OGRGeomFieldDefnShadow *""'"); 
   22750             :   }
   22751          15 :   arg3 = reinterpret_cast< OGRGeomFieldDefnShadow * >(argp3);
   22752          15 :   if (swig_obj[3]) {
   22753           7 :     {
   22754             :       /* %typemap(in) char **dict */
   22755           7 :       arg4 = NULL;
   22756           7 :       if ( PySequence_Check( swig_obj[3] ) ) {
   22757           7 :         int bErr = FALSE;
   22758           7 :         arg4 = CSLFromPySequence(swig_obj[3], &bErr);
   22759           7 :         if ( bErr )
   22760             :         {
   22761           0 :           SWIG_fail;
   22762             :         }
   22763             :       }
   22764           0 :       else if ( PyMapping_Check( swig_obj[3] ) ) {
   22765           0 :         int bErr = FALSE;
   22766           0 :         arg4 = CSLFromPyMapping(swig_obj[3], &bErr);
   22767           0 :         if ( bErr )
   22768             :         {
   22769           0 :           SWIG_fail;
   22770             :         }
   22771             :       }
   22772             :       else {
   22773           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   22774           0 :         SWIG_fail;
   22775             :       }
   22776             :     }
   22777             :   }
   22778          15 :   {
   22779          15 :     const int bLocalUseExceptions = GetUseExceptions();
   22780          15 :     if ( bLocalUseExceptions ) {
   22781           9 :       pushErrorHandler();
   22782             :     }
   22783          15 :     {
   22784          15 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22785          15 :       result = (OGRLayerShadow *)GDALDatasetShadow_CreateLayerFromGeomFieldDefn(arg1,(char const *)arg2,arg3,arg4);
   22786          15 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22787             :     }
   22788          15 :     if ( bLocalUseExceptions ) {
   22789           9 :       popErrorHandler();
   22790             :     }
   22791             : #ifndef SED_HACKS
   22792             :     if ( bLocalUseExceptions ) {
   22793             :       CPLErr eclass = CPLGetLastErrorType();
   22794             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22795             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22796             :       }
   22797             :     }
   22798             : #endif
   22799             :   }
   22800          15 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
   22801          15 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   22802          15 :   {
   22803             :     /* %typemap(freearg) char **dict */
   22804          15 :     CSLDestroy( arg4 );
   22805             :   }
   22806          15 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   22807             :   return resultobj;
   22808           0 : fail:
   22809           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   22810           0 :   {
   22811             :     /* %typemap(freearg) char **dict */
   22812           0 :     CSLDestroy( arg4 );
   22813             :   }
   22814             :   return NULL;
   22815             : }
   22816             : 
   22817             : 
   22818          10 : SWIGINTERN PyObject *_wrap_Dataset_CopyLayer(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   22819          10 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22820          10 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   22821          10 :   OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
   22822          10 :   char *arg3 = (char *) 0 ;
   22823          10 :   char **arg4 = (char **) 0 ;
   22824          10 :   void *argp1 = 0 ;
   22825          10 :   int res1 = 0 ;
   22826          10 :   void *argp2 = 0 ;
   22827          10 :   int res2 = 0 ;
   22828          10 :   int res3 ;
   22829          10 :   char *buf3 = 0 ;
   22830          10 :   int alloc3 = 0 ;
   22831          10 :   PyObject * obj0 = 0 ;
   22832          10 :   PyObject * obj1 = 0 ;
   22833          10 :   PyObject * obj2 = 0 ;
   22834          10 :   PyObject * obj3 = 0 ;
   22835          10 :   char * kwnames[] = {
   22836             :     (char *)"self",  (char *)"src_layer",  (char *)"new_name",  (char *)"options",  NULL 
   22837             :   };
   22838          10 :   OGRLayerShadow *result = 0 ;
   22839             :   
   22840          10 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO|O:Dataset_CopyLayer", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
   22841          10 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   22842          10 :   if (!SWIG_IsOK(res1)) {
   22843           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_CopyLayer" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   22844             :   }
   22845          10 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   22846          10 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
   22847          10 :   if (!SWIG_IsOK(res2)) {
   22848           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_CopyLayer" "', argument " "2"" of type '" "OGRLayerShadow *""'"); 
   22849             :   }
   22850          10 :   arg2 = reinterpret_cast< OGRLayerShadow * >(argp2);
   22851          10 :   res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
   22852          10 :   if (!SWIG_IsOK(res3)) {
   22853           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Dataset_CopyLayer" "', argument " "3"" of type '" "char const *""'");
   22854             :   }
   22855          10 :   arg3 = reinterpret_cast< char * >(buf3);
   22856          10 :   if (obj3) {
   22857           2 :     {
   22858             :       /* %typemap(in) char **dict */
   22859           2 :       arg4 = NULL;
   22860           2 :       if ( PySequence_Check( obj3 ) ) {
   22861           2 :         int bErr = FALSE;
   22862           2 :         arg4 = CSLFromPySequence(obj3, &bErr);
   22863           2 :         if ( bErr )
   22864             :         {
   22865           0 :           SWIG_fail;
   22866             :         }
   22867             :       }
   22868           0 :       else if ( PyMapping_Check( obj3 ) ) {
   22869           0 :         int bErr = FALSE;
   22870           0 :         arg4 = CSLFromPyMapping(obj3, &bErr);
   22871           0 :         if ( bErr )
   22872             :         {
   22873           0 :           SWIG_fail;
   22874             :         }
   22875             :       }
   22876             :       else {
   22877           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   22878           0 :         SWIG_fail;
   22879             :       }
   22880             :     }
   22881             :   }
   22882          10 :   {
   22883          10 :     if (!arg2) {
   22884           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   22885             :     }
   22886             :   }
   22887          10 :   {
   22888          10 :     const int bLocalUseExceptions = GetUseExceptions();
   22889          10 :     if ( bLocalUseExceptions ) {
   22890           6 :       pushErrorHandler();
   22891             :     }
   22892          10 :     {
   22893          10 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22894          10 :       result = (OGRLayerShadow *)GDALDatasetShadow_CopyLayer(arg1,arg2,(char const *)arg3,arg4);
   22895          10 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22896             :     }
   22897          10 :     if ( bLocalUseExceptions ) {
   22898           6 :       popErrorHandler();
   22899             :     }
   22900             : #ifndef SED_HACKS
   22901             :     if ( bLocalUseExceptions ) {
   22902             :       CPLErr eclass = CPLGetLastErrorType();
   22903             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22904             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22905             :       }
   22906             :     }
   22907             : #endif
   22908             :   }
   22909          10 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
   22910          10 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   22911          10 :   {
   22912             :     /* %typemap(freearg) char **dict */
   22913          10 :     CSLDestroy( arg4 );
   22914             :   }
   22915          10 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   22916             :   return resultobj;
   22917           0 : fail:
   22918           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   22919           0 :   {
   22920             :     /* %typemap(freearg) char **dict */
   22921           0 :     CSLDestroy( arg4 );
   22922             :   }
   22923             :   return NULL;
   22924             : }
   22925             : 
   22926             : 
   22927          42 : SWIGINTERN PyObject *_wrap_Dataset_DeleteLayer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22928          42 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22929          42 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   22930          42 :   int arg2 ;
   22931          42 :   void *argp1 = 0 ;
   22932          42 :   int res1 = 0 ;
   22933          42 :   int val2 ;
   22934          42 :   int ecode2 = 0 ;
   22935          42 :   PyObject *swig_obj[2] ;
   22936          42 :   OGRErr result;
   22937             :   
   22938          42 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_DeleteLayer", 2, 2, swig_obj)) SWIG_fail;
   22939          42 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   22940          42 :   if (!SWIG_IsOK(res1)) {
   22941           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_DeleteLayer" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   22942             :   }
   22943          42 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   22944          42 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   22945          42 :   if (!SWIG_IsOK(ecode2)) {
   22946           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_DeleteLayer" "', argument " "2"" of type '" "int""'");
   22947             :   } 
   22948          42 :   arg2 = static_cast< int >(val2);
   22949          42 :   {
   22950          42 :     const int bLocalUseExceptions = GetUseExceptions();
   22951          42 :     if ( bLocalUseExceptions ) {
   22952           6 :       pushErrorHandler();
   22953             :     }
   22954          42 :     {
   22955          42 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22956          42 :       result = (OGRErr)GDALDatasetShadow_DeleteLayer(arg1,arg2);
   22957          42 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22958             :     }
   22959          42 :     if ( bLocalUseExceptions ) {
   22960           6 :       popErrorHandler();
   22961             :     }
   22962             : #ifndef SED_HACKS
   22963             :     if ( bLocalUseExceptions ) {
   22964             :       CPLErr eclass = CPLGetLastErrorType();
   22965             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22966             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22967             :       }
   22968             :     }
   22969             : #endif
   22970             :   }
   22971          42 :   {
   22972             :     /* %typemap(out) OGRErr */
   22973          60 :     if ( result != 0 && GetUseExceptions()) {
   22974           2 :       const char* pszMessage = CPLGetLastErrorMsg();
   22975           2 :       if( pszMessage[0] != '\0' )
   22976           2 :       PyErr_SetString( PyExc_RuntimeError, pszMessage );
   22977             :       else
   22978           0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
   22979           2 :       SWIG_fail;
   22980             :     }
   22981             :   }
   22982          40 :   {
   22983             :     /* %typemap(ret) OGRErr */
   22984          40 :     if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
   22985          40 :       resultobj = PyInt_FromLong( result );
   22986             :     }
   22987             :   }
   22988          42 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   22989             :   return resultobj;
   22990             : fail:
   22991             :   return NULL;
   22992             : }
   22993             : 
   22994             : 
   22995          91 : SWIGINTERN PyObject *_wrap_Dataset_IsLayerPrivate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22996          91 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22997          91 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   22998          91 :   int arg2 ;
   22999          91 :   void *argp1 = 0 ;
   23000          91 :   int res1 = 0 ;
   23001          91 :   int val2 ;
   23002          91 :   int ecode2 = 0 ;
   23003          91 :   PyObject *swig_obj[2] ;
   23004          91 :   bool result;
   23005             :   
   23006          91 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_IsLayerPrivate", 2, 2, swig_obj)) SWIG_fail;
   23007          91 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   23008          91 :   if (!SWIG_IsOK(res1)) {
   23009           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_IsLayerPrivate" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   23010             :   }
   23011          91 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   23012          91 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   23013          91 :   if (!SWIG_IsOK(ecode2)) {
   23014           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_IsLayerPrivate" "', argument " "2"" of type '" "int""'");
   23015             :   } 
   23016          91 :   arg2 = static_cast< int >(val2);
   23017          91 :   {
   23018          91 :     const int bLocalUseExceptions = GetUseExceptions();
   23019          91 :     if ( bLocalUseExceptions ) {
   23020          85 :       pushErrorHandler();
   23021             :     }
   23022          91 :     {
   23023          91 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   23024          91 :       result = (bool)GDALDatasetShadow_IsLayerPrivate(arg1,arg2);
   23025          91 :       SWIG_PYTHON_THREAD_END_ALLOW;
   23026             :     }
   23027          91 :     if ( bLocalUseExceptions ) {
   23028          85 :       popErrorHandler();
   23029             :     }
   23030             : #ifndef SED_HACKS
   23031             :     if ( bLocalUseExceptions ) {
   23032             :       CPLErr eclass = CPLGetLastErrorType();
   23033             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   23034             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   23035             :       }
   23036             :     }
   23037             : #endif
   23038             :   }
   23039          91 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   23040          91 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   23041             :   return resultobj;
   23042             : fail:
   23043             :   return NULL;
   23044             : }
   23045             : 
   23046             : 
   23047        1833 : SWIGINTERN PyObject *_wrap_Dataset_GetNextFeature(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   23048        1833 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   23049        1833 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   23050        1833 :   bool arg2 = (bool) true ;
   23051        1833 :   bool arg3 = (bool) false ;
   23052        1833 :   OGRLayerShadow **arg4 = (OGRLayerShadow **) NULL ;
   23053        1833 :   double *arg5 = (double *) NULL ;
   23054        1833 :   GDALProgressFunc arg6 = (GDALProgressFunc) NULL ;
   23055        1833 :   void *arg7 = (void *) NULL ;
   23056        1833 :   void *argp1 = 0 ;
   23057        1833 :   int res1 = 0 ;
   23058        1833 :   bool val2 ;
   23059        1833 :   int ecode2 = 0 ;
   23060        1833 :   bool val3 ;
   23061        1833 :   int ecode3 = 0 ;
   23062        1833 :   OGRLayerShadow *poBelongingLayer4 = NULL ;
   23063        1833 :   double dfProgressPct4 = 0 ;
   23064        1833 :   PyObject * obj0 = 0 ;
   23065        1833 :   PyObject * obj1 = 0 ;
   23066        1833 :   PyObject * obj2 = 0 ;
   23067        1833 :   PyObject * obj3 = 0 ;
   23068        1833 :   PyObject * obj4 = 0 ;
   23069        1833 :   char * kwnames[] = {
   23070             :     (char *)"self",  (char *)"include_layer",  (char *)"include_pct",  (char *)"callback",  (char *)"callback_data",  NULL 
   23071             :   };
   23072        1833 :   OGRFeatureShadow *result = 0 ;
   23073             :   
   23074             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   23075        1833 :   PyProgressData *psProgressInfo;
   23076        1833 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   23077        1833 :   psProgressInfo->nLastReported = -1;
   23078        1833 :   psProgressInfo->psPyCallback = NULL;
   23079        1833 :   psProgressInfo->psPyCallbackData = NULL;
   23080        1833 :   arg7 = psProgressInfo;
   23081        1833 :   {
   23082             :     /* %typemap(in) (OGRLayerShadow** ppoBelongingLayer, double* pdfProgressPct)  */
   23083        1833 :     arg4 = &poBelongingLayer4;
   23084        1833 :     arg5 = &dfProgressPct4;
   23085             :   }
   23086        1833 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OOOO:Dataset_GetNextFeature", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
   23087        1833 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   23088        1833 :   if (!SWIG_IsOK(res1)) {
   23089           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetNextFeature" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   23090             :   }
   23091        1833 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   23092        1833 :   if (obj1) {
   23093           6 :     ecode2 = SWIG_AsVal_bool(obj1, &val2);
   23094           6 :     if (!SWIG_IsOK(ecode2)) {
   23095           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_GetNextFeature" "', argument " "2"" of type '" "bool""'");
   23096             :     } 
   23097             :     arg2 = static_cast< bool >(val2);
   23098             :   }
   23099        1833 :   if (obj2) {
   23100          76 :     ecode3 = SWIG_AsVal_bool(obj2, &val3);
   23101          76 :     if (!SWIG_IsOK(ecode3)) {
   23102           0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Dataset_GetNextFeature" "', argument " "3"" of type '" "bool""'");
   23103             :     } 
   23104             :     arg3 = static_cast< bool >(val3);
   23105             :   }
   23106        1833 :   if (obj3) {
   23107           2 :     {
   23108             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   23109             :       /* callback_func typemap */
   23110             :       
   23111             :       /* In some cases 0 is passed instead of None. */
   23112             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   23113           2 :       if ( PyLong_Check(obj3) || PyInt_Check(obj3) )
   23114             :       {
   23115           0 :         if( PyLong_AsLong(obj3) == 0 )
   23116             :         {
   23117           0 :           obj3 = Py_None;
   23118             :         }
   23119             :       }
   23120             :       
   23121           2 :       if (obj3 && obj3 != Py_None ) {
   23122           2 :         void* cbfunction = NULL;
   23123           2 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj3,
   23124             :             (void**)&cbfunction,
   23125             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   23126             :             SWIG_POINTER_EXCEPTION | 0 ));
   23127             :         
   23128           2 :         if ( cbfunction == GDALTermProgress ) {
   23129             :           arg6 = GDALTermProgress;
   23130             :         } else {
   23131           2 :           if (!PyCallable_Check(obj3)) {
   23132           0 :             PyErr_SetString( PyExc_RuntimeError,
   23133             :               "Object given is not a Python function" );
   23134           0 :             SWIG_fail;
   23135             :           }
   23136           2 :           psProgressInfo->psPyCallback = obj3;
   23137           2 :           arg6 = PyProgressProxy;
   23138             :         }
   23139             :         
   23140             :       }
   23141             :       
   23142             :     }
   23143             :   }
   23144        1833 :   if (obj4) {
   23145           1 :     {
   23146             :       /* %typemap(in) ( void* callback_data=NULL)  */
   23147           1 :       psProgressInfo->psPyCallbackData = obj4 ;
   23148             :     }
   23149             :   }
   23150        1833 :   {
   23151             :     /* %typemap(check) (OGRLayerShadow** ppoBelongingLayer, double* pdfProgressPct)  */
   23152        1833 :     if( !arg3 )
   23153        1757 :     arg5 = NULL;
   23154             :   }
   23155        1833 :   {
   23156        1833 :     const int bLocalUseExceptions = GetUseExceptions();
   23157        1833 :     if ( bLocalUseExceptions ) {
   23158          20 :       pushErrorHandler();
   23159             :     }
   23160        1833 :     {
   23161        1833 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   23162        1833 :       result = (OGRFeatureShadow *)GDALDatasetShadow_GetNextFeature(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   23163        1833 :       SWIG_PYTHON_THREAD_END_ALLOW;
   23164             :     }
   23165        1833 :     if ( bLocalUseExceptions ) {
   23166          20 :       popErrorHandler();
   23167             :     }
   23168             : #ifndef SED_HACKS
   23169             :     if ( bLocalUseExceptions ) {
   23170             :       CPLErr eclass = CPLGetLastErrorType();
   23171             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   23172             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   23173             :       }
   23174             :     }
   23175             : #endif
   23176             :   }
   23177        1833 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFeatureShadow, SWIG_POINTER_OWN |  0 );
   23178        1833 :   {
   23179             :     /* %typemap(argout) (OGRLayerShadow** ppoBelongingLayer, double* pdfProgressPct)  */
   23180             :     
   23181        1833 :     if( arg2 )
   23182             :     {
   23183        1827 :       if( resultobj == Py_None )
   23184             :       {
   23185          25 :         resultobj = PyList_New(1);
   23186          25 :         PyList_SetItem(resultobj, 0, Py_None);
   23187             :       }
   23188             :       
   23189        1827 :       if ( !*arg4 ) {
   23190          25 :         Py_INCREF(Py_None);
   23191          25 :         resultobj = SWIG_Python_AppendOutput(resultobj, Py_None);
   23192             :       }
   23193             :       else {
   23194        1802 :         resultobj = SWIG_Python_AppendOutput(resultobj,
   23195             :           SWIG_NewPointerObj(SWIG_as_voidptr( *arg4), SWIGTYPE_p_OGRLayerShadow, 0 ));
   23196             :       }
   23197             :     }
   23198             :     
   23199        1833 :     if( arg3 )
   23200             :     {
   23201          76 :       if( resultobj == Py_None )
   23202             :       {
   23203           2 :         resultobj = PyList_New(1);
   23204           2 :         PyList_SetItem(resultobj, 0, Py_None);
   23205             :       }
   23206          76 :       resultobj = SWIG_Python_AppendOutput(resultobj, PyFloat_FromDouble( *arg5));
   23207             :     }
   23208             :     
   23209             :   }
   23210        1833 :   {
   23211             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   23212             :     
   23213        1833 :     CPLFree(psProgressInfo);
   23214             :     
   23215             :   }
   23216        1833 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   23217             :   return resultobj;
   23218           0 : fail:
   23219           0 :   {
   23220             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   23221             :     
   23222           0 :     CPLFree(psProgressInfo);
   23223             :     
   23224             :   }
   23225             :   return NULL;
   23226             : }
   23227             : 
   23228             : 
   23229         113 : SWIGINTERN PyObject *_wrap_Dataset_TestCapability(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   23230         113 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   23231         113 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   23232         113 :   char *arg2 = (char *) 0 ;
   23233         113 :   void *argp1 = 0 ;
   23234         113 :   int res1 = 0 ;
   23235         113 :   int res2 ;
   23236         113 :   char *buf2 = 0 ;
   23237         113 :   int alloc2 = 0 ;
   23238         113 :   PyObject *swig_obj[2] ;
   23239         113 :   bool result;
   23240             :   
   23241         113 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_TestCapability", 2, 2, swig_obj)) SWIG_fail;
   23242         113 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   23243         113 :   if (!SWIG_IsOK(res1)) {
   23244           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_TestCapability" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   23245             :   }
   23246         113 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   23247         113 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   23248         113 :   if (!SWIG_IsOK(res2)) {
   23249           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_TestCapability" "', argument " "2"" of type '" "char const *""'");
   23250             :   }
   23251         113 :   arg2 = reinterpret_cast< char * >(buf2);
   23252         113 :   {
   23253         113 :     const int bLocalUseExceptions = GetUseExceptions();
   23254         113 :     if ( bLocalUseExceptions ) {
   23255          40 :       pushErrorHandler();
   23256             :     }
   23257         113 :     {
   23258         113 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   23259         113 :       result = (bool)GDALDatasetShadow_TestCapability(arg1,(char const *)arg2);
   23260         113 :       SWIG_PYTHON_THREAD_END_ALLOW;
   23261             :     }
   23262         113 :     if ( bLocalUseExceptions ) {
   23263          40 :       popErrorHandler();
   23264             :     }
   23265             : #ifndef SED_HACKS
   23266             :     if ( bLocalUseExceptions ) {
   23267             :       CPLErr eclass = CPLGetLastErrorType();
   23268             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   23269             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   23270             :       }
   23271             :     }
   23272             : #endif
   23273             :   }
   23274         113 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   23275         113 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   23276         113 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   23277             :   return resultobj;
   23278           0 : fail:
   23279           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   23280             :   return NULL;
   23281             : }
   23282             : 
   23283             : 
   23284        9014 : SWIGINTERN PyObject *_wrap_Dataset_ExecuteSQL(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   23285        9014 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   23286        9014 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   23287        9014 :   char *arg2 = (char *) 0 ;
   23288        9014 :   OGRGeometryShadow *arg3 = (OGRGeometryShadow *) NULL ;
   23289        9014 :   char *arg4 = (char *) "" ;
   23290        9014 :   void *argp1 = 0 ;
   23291        9014 :   int res1 = 0 ;
   23292        9014 :   int res2 ;
   23293        9014 :   char *buf2 = 0 ;
   23294        9014 :   int alloc2 = 0 ;
   23295        9014 :   void *argp3 = 0 ;
   23296        9014 :   int res3 = 0 ;
   23297        9014 :   int res4 ;
   23298        9014 :   char *buf4 = 0 ;
   23299        9014 :   int alloc4 = 0 ;
   23300        9014 :   PyObject * obj0 = 0 ;
   23301        9014 :   PyObject * obj1 = 0 ;
   23302        9014 :   PyObject * obj2 = 0 ;
   23303        9014 :   PyObject * obj3 = 0 ;
   23304        9014 :   char * kwnames[] = {
   23305             :     (char *)"self",  (char *)"statement",  (char *)"spatialFilter",  (char *)"dialect",  NULL 
   23306             :   };
   23307        9014 :   OGRLayerShadow *result = 0 ;
   23308             :   
   23309        9014 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OO:Dataset_ExecuteSQL", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
   23310        9014 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   23311        9014 :   if (!SWIG_IsOK(res1)) {
   23312           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_ExecuteSQL" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   23313             :   }
   23314        9014 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   23315        9014 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   23316        9014 :   if (!SWIG_IsOK(res2)) {
   23317           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_ExecuteSQL" "', argument " "2"" of type '" "char const *""'");
   23318             :   }
   23319        9014 :   arg2 = reinterpret_cast< char * >(buf2);
   23320        9014 :   if (obj2) {
   23321        9014 :     res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   23322        9014 :     if (!SWIG_IsOK(res3)) {
   23323           0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Dataset_ExecuteSQL" "', argument " "3"" of type '" "OGRGeometryShadow *""'"); 
   23324             :     }
   23325        9014 :     arg3 = reinterpret_cast< OGRGeometryShadow * >(argp3);
   23326             :   }
   23327        9014 :   if (obj3) {
   23328        9014 :     res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
   23329        9014 :     if (!SWIG_IsOK(res4)) {
   23330           0 :       SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Dataset_ExecuteSQL" "', argument " "4"" of type '" "char const *""'");
   23331             :     }
   23332        9014 :     arg4 = reinterpret_cast< char * >(buf4);
   23333             :   }
   23334        9014 :   {
   23335        9014 :     if (!arg2) {
   23336           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   23337             :     }
   23338             :   }
   23339        9013 :   {
   23340        9013 :     const int bLocalUseExceptions = GetUseExceptions();
   23341        9013 :     if ( bLocalUseExceptions ) {
   23342         755 :       pushErrorHandler();
   23343             :     }
   23344        9013 :     {
   23345        9013 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   23346        9013 :       result = (OGRLayerShadow *)GDALDatasetShadow_ExecuteSQL(arg1,(char const *)arg2,arg3,(char const *)arg4);
   23347        9013 :       SWIG_PYTHON_THREAD_END_ALLOW;
   23348             :     }
   23349        9013 :     if ( bLocalUseExceptions ) {
   23350         755 :       popErrorHandler();
   23351             :     }
   23352             : #ifndef SED_HACKS
   23353             :     if ( bLocalUseExceptions ) {
   23354             :       CPLErr eclass = CPLGetLastErrorType();
   23355             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   23356             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   23357             :       }
   23358             :     }
   23359             : #endif
   23360             :   }
   23361        9013 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
   23362        9013 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   23363        9013 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   23364        9035 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   23365             :   return resultobj;
   23366           1 : fail:
   23367           1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   23368           1 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   23369             :   return NULL;
   23370             : }
   23371             : 
   23372             : 
   23373        2521 : SWIGINTERN PyObject *_wrap_Dataset_ReleaseResultSet(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   23374        2521 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   23375        2521 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   23376        2521 :   OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
   23377        2521 :   void *argp1 = 0 ;
   23378        2521 :   int res1 = 0 ;
   23379        2521 :   int res2 = 0 ;
   23380        2521 :   PyObject *swig_obj[2] ;
   23381             :   
   23382        2521 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_ReleaseResultSet", 2, 2, swig_obj)) SWIG_fail;
   23383        2521 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   23384        2521 :   if (!SWIG_IsOK(res1)) {
   23385           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_ReleaseResultSet" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   23386             :   }
   23387        2521 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   23388        2521 :   res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&arg2), SWIGTYPE_p_OGRLayerShadow, SWIG_POINTER_DISOWN |  0 );
   23389        2521 :   if (!SWIG_IsOK(res2)) {
   23390           4 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_ReleaseResultSet" "', argument " "2"" of type '" "OGRLayerShadow *""'");
   23391             :   }
   23392        2519 :   {
   23393        2519 :     const int bLocalUseExceptions = GetUseExceptions();
   23394        2519 :     if ( bLocalUseExceptions ) {
   23395         406 :       pushErrorHandler();
   23396             :     }
   23397        2519 :     {
   23398        2519 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   23399        2519 :       GDALDatasetShadow_ReleaseResultSet(arg1,arg2);
   23400        2519 :       SWIG_PYTHON_THREAD_END_ALLOW;
   23401             :     }
   23402        2519 :     if ( bLocalUseExceptions ) {
   23403         406 :       popErrorHandler();
   23404             :     }
   23405             : #ifndef SED_HACKS
   23406             :     if ( bLocalUseExceptions ) {
   23407             :       CPLErr eclass = CPLGetLastErrorType();
   23408             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   23409             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   23410             :       }
   23411             :     }
   23412             : #endif
   23413             :   }
   23414        2519 :   resultobj = SWIG_Py_Void();
   23415        2521 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   23416             :   return resultobj;
   23417             : fail:
   23418             :   return NULL;
   23419             : }
   23420             : 
   23421             : 
   23422           6 : SWIGINTERN PyObject *_wrap_Dataset_GetStyleTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   23423           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   23424           6 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   23425           6 :   void *argp1 = 0 ;
   23426           6 :   int res1 = 0 ;
   23427           6 :   PyObject *swig_obj[1] ;
   23428           6 :   OGRStyleTableShadow *result = 0 ;
   23429             :   
   23430           6 :   if (!args) SWIG_fail;
   23431           6 :   swig_obj[0] = args;
   23432           6 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   23433           6 :   if (!SWIG_IsOK(res1)) {
   23434           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetStyleTable" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   23435             :   }
   23436           6 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   23437           6 :   {
   23438           6 :     const int bLocalUseExceptions = GetUseExceptions();
   23439           6 :     if ( bLocalUseExceptions ) {
   23440           5 :       pushErrorHandler();
   23441             :     }
   23442           6 :     {
   23443           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   23444           6 :       result = (OGRStyleTableShadow *)GDALDatasetShadow_GetStyleTable(arg1);
   23445           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   23446             :     }
   23447           6 :     if ( bLocalUseExceptions ) {
   23448           5 :       popErrorHandler();
   23449             :     }
   23450             : #ifndef SED_HACKS
   23451             :     if ( bLocalUseExceptions ) {
   23452             :       CPLErr eclass = CPLGetLastErrorType();
   23453             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   23454             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   23455             :       }
   23456             :     }
   23457             : #endif
   23458             :   }
   23459           6 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRStyleTableShadow, 0 |  0 );
   23460           6 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   23461             :   return resultobj;
   23462             : fail:
   23463             :   return NULL;
   23464             : }
   23465             : 
   23466             : 
   23467           6 : SWIGINTERN PyObject *_wrap_Dataset_SetStyleTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   23468           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   23469           6 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   23470           6 :   OGRStyleTableShadow *arg2 = (OGRStyleTableShadow *) 0 ;
   23471           6 :   void *argp1 = 0 ;
   23472           6 :   int res1 = 0 ;
   23473           6 :   void *argp2 = 0 ;
   23474           6 :   int res2 = 0 ;
   23475           6 :   PyObject *swig_obj[2] ;
   23476             :   
   23477           6 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_SetStyleTable", 2, 2, swig_obj)) SWIG_fail;
   23478           6 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   23479           6 :   if (!SWIG_IsOK(res1)) {
   23480           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_SetStyleTable" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   23481             :   }
   23482           6 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   23483           6 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRStyleTableShadow, 0 |  0 );
   23484           6 :   if (!SWIG_IsOK(res2)) {
   23485           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_SetStyleTable" "', argument " "2"" of type '" "OGRStyleTableShadow *""'"); 
   23486             :   }
   23487           6 :   arg2 = reinterpret_cast< OGRStyleTableShadow * >(argp2);
   23488           6 :   {
   23489           6 :     const int bLocalUseExceptions = GetUseExceptions();
   23490           6 :     if ( bLocalUseExceptions ) {
   23491           5 :       pushErrorHandler();
   23492             :     }
   23493           6 :     {
   23494           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   23495           6 :       GDALDatasetShadow_SetStyleTable(arg1,arg2);
   23496           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   23497             :     }
   23498           6 :     if ( bLocalUseExceptions ) {
   23499           5 :       popErrorHandler();
   23500             :     }
   23501             : #ifndef SED_HACKS
   23502             :     if ( bLocalUseExceptions ) {
   23503             :       CPLErr eclass = CPLGetLastErrorType();
   23504             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   23505             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   23506             :       }
   23507             :     }
   23508             : #endif
   23509             :   }
   23510           6 :   resultobj = SWIG_Py_Void();
   23511           6 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   23512             :   return resultobj;
   23513             : fail:
   23514             :   return NULL;
   23515             : }
   23516             : 
   23517             : 
   23518        8197 : SWIGINTERN PyObject *_wrap_Dataset_GetLayerByIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   23519        8197 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   23520        8197 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   23521        8197 :   int arg2 = (int) 0 ;
   23522        8197 :   void *argp1 = 0 ;
   23523        8197 :   int res1 = 0 ;
   23524        8197 :   int val2 ;
   23525        8197 :   int ecode2 = 0 ;
   23526        8197 :   PyObject *swig_obj[2] ;
   23527        8197 :   OGRLayerShadow *result = 0 ;
   23528             :   
   23529        8197 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_GetLayerByIndex", 1, 2, swig_obj)) SWIG_fail;
   23530        8197 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   23531        8197 :   if (!SWIG_IsOK(res1)) {
   23532          14 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetLayerByIndex" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   23533             :   }
   23534        8190 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   23535        8190 :   if (swig_obj[1]) {
   23536        8190 :     ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   23537        8190 :     if (!SWIG_IsOK(ecode2)) {
   23538           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_GetLayerByIndex" "', argument " "2"" of type '" "int""'");
   23539             :     } 
   23540             :     arg2 = static_cast< int >(val2);
   23541             :   }
   23542        8190 :   {
   23543        8190 :     const int bLocalUseExceptions = GetUseExceptions();
   23544        8190 :     if ( bLocalUseExceptions ) {
   23545        4046 :       pushErrorHandler();
   23546             :     }
   23547        8190 :     {
   23548        8190 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   23549        8190 :       result = (OGRLayerShadow *)GDALDatasetShadow_GetLayerByIndex(arg1,arg2);
   23550        8190 :       SWIG_PYTHON_THREAD_END_ALLOW;
   23551             :     }
   23552        8190 :     if ( bLocalUseExceptions ) {
   23553        4046 :       popErrorHandler();
   23554             :     }
   23555             : #ifndef SED_HACKS
   23556             :     if ( bLocalUseExceptions ) {
   23557             :       CPLErr eclass = CPLGetLastErrorType();
   23558             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   23559             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   23560             :       }
   23561             :     }
   23562             : #endif
   23563             :   }
   23564        8190 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
   23565        8197 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   23566             :   return resultobj;
   23567             : fail:
   23568             :   return NULL;
   23569             : }
   23570             : 
   23571             : 
   23572        2540 : SWIGINTERN PyObject *_wrap_Dataset_GetLayerByName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   23573        2540 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   23574        2540 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   23575        2540 :   char *arg2 = (char *) 0 ;
   23576        2540 :   void *argp1 = 0 ;
   23577        2540 :   int res1 = 0 ;
   23578        2540 :   int res2 ;
   23579        2540 :   char *buf2 = 0 ;
   23580        2540 :   int alloc2 = 0 ;
   23581        2540 :   PyObject *swig_obj[2] ;
   23582        2540 :   OGRLayerShadow *result = 0 ;
   23583             :   
   23584        2540 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_GetLayerByName", 2, 2, swig_obj)) SWIG_fail;
   23585        2540 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   23586        2540 :   if (!SWIG_IsOK(res1)) {
   23587           2 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetLayerByName" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   23588             :   }
   23589        2539 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   23590        2539 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   23591        2539 :   if (!SWIG_IsOK(res2)) {
   23592           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_GetLayerByName" "', argument " "2"" of type '" "char const *""'");
   23593             :   }
   23594        2539 :   arg2 = reinterpret_cast< char * >(buf2);
   23595        2539 :   {
   23596        2539 :     const int bLocalUseExceptions = GetUseExceptions();
   23597        2539 :     if ( bLocalUseExceptions ) {
   23598         322 :       pushErrorHandler();
   23599             :     }
   23600        2539 :     {
   23601        2539 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   23602        2539 :       result = (OGRLayerShadow *)GDALDatasetShadow_GetLayerByName(arg1,(char const *)arg2);
   23603        2539 :       SWIG_PYTHON_THREAD_END_ALLOW;
   23604             :     }
   23605        2539 :     if ( bLocalUseExceptions ) {
   23606         322 :       popErrorHandler();
   23607             :     }
   23608             : #ifndef SED_HACKS
   23609             :     if ( bLocalUseExceptions ) {
   23610             :       CPLErr eclass = CPLGetLastErrorType();
   23611             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   23612             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   23613             :       }
   23614             :     }
   23615             : #endif
   23616             :   }
   23617        2539 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
   23618        2539 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   23619        2540 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   23620             :   return resultobj;
   23621           1 : fail:
   23622           1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   23623             :   return NULL;
   23624             : }
   23625             : 
   23626             : 
   23627           8 : SWIGINTERN PyObject *_wrap_Dataset_ResetReading(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   23628           8 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   23629           8 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   23630           8 :   void *argp1 = 0 ;
   23631           8 :   int res1 = 0 ;
   23632           8 :   PyObject *swig_obj[1] ;
   23633             :   
   23634           8 :   if (!args) SWIG_fail;
   23635           8 :   swig_obj[0] = args;
   23636           8 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   23637           8 :   if (!SWIG_IsOK(res1)) {
   23638           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_ResetReading" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   23639             :   }
   23640           8 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   23641           8 :   {
   23642           8 :     const int bLocalUseExceptions = GetUseExceptions();
   23643           8 :     if ( bLocalUseExceptions ) {
   23644           3 :       pushErrorHandler();
   23645             :     }
   23646           8 :     {
   23647           8 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   23648           8 :       GDALDatasetShadow_ResetReading(arg1);
   23649           8 :       SWIG_PYTHON_THREAD_END_ALLOW;
   23650             :     }
   23651           8 :     if ( bLocalUseExceptions ) {
   23652           3 :       popErrorHandler();
   23653             :     }
   23654             : #ifndef SED_HACKS
   23655             :     if ( bLocalUseExceptions ) {
   23656             :       CPLErr eclass = CPLGetLastErrorType();
   23657             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   23658             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   23659             :       }
   23660             :     }
   23661             : #endif
   23662             :   }
   23663           8 :   resultobj = SWIG_Py_Void();
   23664           8 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   23665             :   return resultobj;
   23666             : fail:
   23667             :   return NULL;
   23668             : }
   23669             : 
   23670             : 
   23671        1273 : SWIGINTERN PyObject *_wrap_Dataset_GetLayerCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   23672        1273 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   23673        1273 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   23674        1273 :   void *argp1 = 0 ;
   23675        1273 :   int res1 = 0 ;
   23676        1273 :   PyObject *swig_obj[1] ;
   23677        1273 :   int result;
   23678             :   
   23679        1273 :   if (!args) SWIG_fail;
   23680        1273 :   swig_obj[0] = args;
   23681        1273 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   23682        1273 :   if (!SWIG_IsOK(res1)) {
   23683           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetLayerCount" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   23684             :   }
   23685        1273 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   23686        1273 :   {
   23687        1273 :     const int bLocalUseExceptions = GetUseExceptions();
   23688        1273 :     if ( bLocalUseExceptions ) {
   23689         378 :       pushErrorHandler();
   23690             :     }
   23691        1273 :     {
   23692        1273 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   23693        1273 :       result = (int)GDALDatasetShadow_GetLayerCount(arg1);
   23694        1273 :       SWIG_PYTHON_THREAD_END_ALLOW;
   23695             :     }
   23696        1273 :     if ( bLocalUseExceptions ) {
   23697         378 :       popErrorHandler();
   23698             :     }
   23699             : #ifndef SED_HACKS
   23700             :     if ( bLocalUseExceptions ) {
   23701             :       CPLErr eclass = CPLGetLastErrorType();
   23702             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   23703             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   23704             :       }
   23705             :     }
   23706             : #endif
   23707             :   }
   23708        1273 :   resultobj = SWIG_From_int(static_cast< int >(result));
   23709        1273 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   23710             :   return resultobj;
   23711             : fail:
   23712             :   return NULL;
   23713             : }
   23714             : 
   23715             : 
   23716           6 : SWIGINTERN PyObject *_wrap_Dataset_AbortSQL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   23717           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   23718           6 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   23719           6 :   void *argp1 = 0 ;
   23720           6 :   int res1 = 0 ;
   23721           6 :   PyObject *swig_obj[1] ;
   23722           6 :   OGRErr result;
   23723             :   
   23724           6 :   if (!args) SWIG_fail;
   23725           6 :   swig_obj[0] = args;
   23726           6 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   23727           6 :   if (!SWIG_IsOK(res1)) {
   23728           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_AbortSQL" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   23729             :   }
   23730           6 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   23731           6 :   {
   23732           6 :     const int bLocalUseExceptions = GetUseExceptions();
   23733           6 :     if ( bLocalUseExceptions ) {
   23734           6 :       pushErrorHandler();
   23735             :     }
   23736           6 :     {
   23737           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   23738           6 :       result = (OGRErr)GDALDatasetShadow_AbortSQL(arg1);
   23739           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   23740             :     }
   23741           6 :     if ( bLocalUseExceptions ) {
   23742           6 :       popErrorHandler();
   23743             :     }
   23744             : #ifndef SED_HACKS
   23745             :     if ( bLocalUseExceptions ) {
   23746             :       CPLErr eclass = CPLGetLastErrorType();
   23747             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   23748             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   23749             :       }
   23750             :     }
   23751             : #endif
   23752             :   }
   23753           6 :   {
   23754             :     /* %typemap(out) OGRErr */
   23755           6 :     if ( result != 0 && GetUseExceptions()) {
   23756           0 :       const char* pszMessage = CPLGetLastErrorMsg();
   23757           0 :       if( pszMessage[0] != '\0' )
   23758           0 :       PyErr_SetString( PyExc_RuntimeError, pszMessage );
   23759             :       else
   23760           0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
   23761           0 :       SWIG_fail;
   23762             :     }
   23763             :   }
   23764           6 :   {
   23765             :     /* %typemap(ret) OGRErr */
   23766           6 :     if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
   23767           6 :       resultobj = PyInt_FromLong( result );
   23768             :     }
   23769             :   }
   23770           6 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   23771             :   return resultobj;
   23772             : fail:
   23773             :   return NULL;
   23774             : }
   23775             : 
   23776             : 
   23777          74 : SWIGINTERN PyObject *_wrap_Dataset_StartTransaction(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   23778          74 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   23779          74 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   23780          74 :   int arg2 = (int) FALSE ;
   23781          74 :   void *argp1 = 0 ;
   23782          74 :   int res1 = 0 ;
   23783          74 :   int val2 ;
   23784          74 :   int ecode2 = 0 ;
   23785          74 :   PyObject * obj0 = 0 ;
   23786          74 :   PyObject * obj1 = 0 ;
   23787          74 :   char * kwnames[] = {
   23788             :     (char *)"self",  (char *)"force",  NULL 
   23789             :   };
   23790          74 :   OGRErr result;
   23791             :   
   23792          74 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:Dataset_StartTransaction", kwnames, &obj0, &obj1)) SWIG_fail;
   23793          74 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   23794          74 :   if (!SWIG_IsOK(res1)) {
   23795           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_StartTransaction" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   23796             :   }
   23797          74 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   23798          74 :   if (obj1) {
   23799          17 :     ecode2 = SWIG_AsVal_int(obj1, &val2);
   23800          17 :     if (!SWIG_IsOK(ecode2)) {
   23801           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_StartTransaction" "', argument " "2"" of type '" "int""'");
   23802             :     } 
   23803             :     arg2 = static_cast< int >(val2);
   23804             :   }
   23805          74 :   {
   23806          74 :     const int bLocalUseExceptions = GetUseExceptions();
   23807          74 :     if ( bLocalUseExceptions ) {
   23808           0 :       pushErrorHandler();
   23809             :     }
   23810          74 :     {
   23811          74 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   23812          74 :       result = (OGRErr)GDALDatasetShadow_StartTransaction(arg1,arg2);
   23813          74 :       SWIG_PYTHON_THREAD_END_ALLOW;
   23814             :     }
   23815          74 :     if ( bLocalUseExceptions ) {
   23816           0 :       popErrorHandler();
   23817             :     }
   23818             : #ifndef SED_HACKS
   23819             :     if ( bLocalUseExceptions ) {
   23820             :       CPLErr eclass = CPLGetLastErrorType();
   23821             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   23822             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   23823             :       }
   23824             :     }
   23825             : #endif
   23826             :   }
   23827          74 :   {
   23828             :     /* %typemap(out) OGRErr */
   23829          88 :     if ( result != 0 && GetUseExceptions()) {
   23830           0 :       const char* pszMessage = CPLGetLastErrorMsg();
   23831           0 :       if( pszMessage[0] != '\0' )
   23832           0 :       PyErr_SetString( PyExc_RuntimeError, pszMessage );
   23833             :       else
   23834           0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
   23835           0 :       SWIG_fail;
   23836             :     }
   23837             :   }
   23838          74 :   {
   23839             :     /* %typemap(ret) OGRErr */
   23840          74 :     if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
   23841          74 :       resultobj = PyInt_FromLong( result );
   23842             :     }
   23843             :   }
   23844          74 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   23845             :   return resultobj;
   23846             : fail:
   23847             :   return NULL;
   23848             : }
   23849             : 
   23850             : 
   23851          44 : SWIGINTERN PyObject *_wrap_Dataset_CommitTransaction(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   23852          44 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   23853          44 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   23854          44 :   void *argp1 = 0 ;
   23855          44 :   int res1 = 0 ;
   23856          44 :   PyObject *swig_obj[1] ;
   23857          44 :   OGRErr result;
   23858             :   
   23859          44 :   if (!args) SWIG_fail;
   23860          44 :   swig_obj[0] = args;
   23861          44 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   23862          44 :   if (!SWIG_IsOK(res1)) {
   23863           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_CommitTransaction" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   23864             :   }
   23865          44 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   23866          44 :   {
   23867          44 :     const int bLocalUseExceptions = GetUseExceptions();
   23868          44 :     if ( bLocalUseExceptions ) {
   23869           0 :       pushErrorHandler();
   23870             :     }
   23871          44 :     {
   23872          44 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   23873          44 :       result = (OGRErr)GDALDatasetShadow_CommitTransaction(arg1);
   23874          44 :       SWIG_PYTHON_THREAD_END_ALLOW;
   23875             :     }
   23876          44 :     if ( bLocalUseExceptions ) {
   23877           0 :       popErrorHandler();
   23878             :     }
   23879             : #ifndef SED_HACKS
   23880             :     if ( bLocalUseExceptions ) {
   23881             :       CPLErr eclass = CPLGetLastErrorType();
   23882             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   23883             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   23884             :       }
   23885             :     }
   23886             : #endif
   23887             :   }
   23888          44 :   {
   23889             :     /* %typemap(out) OGRErr */
   23890          53 :     if ( result != 0 && GetUseExceptions()) {
   23891           0 :       const char* pszMessage = CPLGetLastErrorMsg();
   23892           0 :       if( pszMessage[0] != '\0' )
   23893           0 :       PyErr_SetString( PyExc_RuntimeError, pszMessage );
   23894             :       else
   23895           0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
   23896           0 :       SWIG_fail;
   23897             :     }
   23898             :   }
   23899          44 :   {
   23900             :     /* %typemap(ret) OGRErr */
   23901          44 :     if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
   23902          44 :       resultobj = PyInt_FromLong( result );
   23903             :     }
   23904             :   }
   23905          44 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   23906             :   return resultobj;
   23907             : fail:
   23908             :   return NULL;
   23909             : }
   23910             : 
   23911             : 
   23912          31 : SWIGINTERN PyObject *_wrap_Dataset_RollbackTransaction(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   23913          31 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   23914          31 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   23915          31 :   void *argp1 = 0 ;
   23916          31 :   int res1 = 0 ;
   23917          31 :   PyObject *swig_obj[1] ;
   23918          31 :   OGRErr result;
   23919             :   
   23920          31 :   if (!args) SWIG_fail;
   23921          31 :   swig_obj[0] = args;
   23922          31 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   23923          31 :   if (!SWIG_IsOK(res1)) {
   23924           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_RollbackTransaction" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   23925             :   }
   23926          31 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   23927          31 :   {
   23928          31 :     const int bLocalUseExceptions = GetUseExceptions();
   23929          31 :     if ( bLocalUseExceptions ) {
   23930           0 :       pushErrorHandler();
   23931             :     }
   23932          31 :     {
   23933          31 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   23934          31 :       result = (OGRErr)GDALDatasetShadow_RollbackTransaction(arg1);
   23935          31 :       SWIG_PYTHON_THREAD_END_ALLOW;
   23936             :     }
   23937          31 :     if ( bLocalUseExceptions ) {
   23938           0 :       popErrorHandler();
   23939             :     }
   23940             : #ifndef SED_HACKS
   23941             :     if ( bLocalUseExceptions ) {
   23942             :       CPLErr eclass = CPLGetLastErrorType();
   23943             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   23944             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   23945             :       }
   23946             :     }
   23947             : #endif
   23948             :   }
   23949          31 :   {
   23950             :     /* %typemap(out) OGRErr */
   23951          41 :     if ( result != 0 && GetUseExceptions()) {
   23952           0 :       const char* pszMessage = CPLGetLastErrorMsg();
   23953           0 :       if( pszMessage[0] != '\0' )
   23954           0 :       PyErr_SetString( PyExc_RuntimeError, pszMessage );
   23955             :       else
   23956           0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
   23957           0 :       SWIG_fail;
   23958             :     }
   23959             :   }
   23960          31 :   {
   23961             :     /* %typemap(ret) OGRErr */
   23962          31 :     if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
   23963          31 :       resultobj = PyInt_FromLong( result );
   23964             :     }
   23965             :   }
   23966          31 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   23967             :   return resultobj;
   23968             : fail:
   23969             :   return NULL;
   23970             : }
   23971             : 
   23972             : 
   23973           2 : SWIGINTERN PyObject *_wrap_Dataset_ClearStatistics(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   23974           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   23975           2 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   23976           2 :   void *argp1 = 0 ;
   23977           2 :   int res1 = 0 ;
   23978           2 :   PyObject *swig_obj[1] ;
   23979             :   
   23980           2 :   if (!args) SWIG_fail;
   23981           2 :   swig_obj[0] = args;
   23982           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   23983           2 :   if (!SWIG_IsOK(res1)) {
   23984           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_ClearStatistics" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   23985             :   }
   23986           2 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   23987           2 :   {
   23988           2 :     const int bLocalUseExceptions = GetUseExceptions();
   23989           2 :     if ( bLocalUseExceptions ) {
   23990           1 :       pushErrorHandler();
   23991             :     }
   23992           2 :     {
   23993           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   23994           2 :       GDALDatasetShadow_ClearStatistics(arg1);
   23995           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   23996             :     }
   23997           2 :     if ( bLocalUseExceptions ) {
   23998           1 :       popErrorHandler();
   23999             :     }
   24000             : #ifndef SED_HACKS
   24001             :     if ( bLocalUseExceptions ) {
   24002             :       CPLErr eclass = CPLGetLastErrorType();
   24003             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   24004             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   24005             :       }
   24006             :     }
   24007             : #endif
   24008             :   }
   24009           2 :   resultobj = SWIG_Py_Void();
   24010           2 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   24011             :   return resultobj;
   24012             : fail:
   24013             :   return NULL;
   24014             : }
   24015             : 
   24016             : 
   24017          33 : SWIGINTERN PyObject *_wrap_Dataset_GetFieldDomainNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   24018          33 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   24019          33 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   24020          33 :   char **arg2 = (char **) 0 ;
   24021          33 :   void *argp1 = 0 ;
   24022          33 :   int res1 = 0 ;
   24023          33 :   PyObject *swig_obj[2] ;
   24024          33 :   char **result = 0 ;
   24025             :   
   24026          33 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_GetFieldDomainNames", 1, 2, swig_obj)) SWIG_fail;
   24027          33 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   24028          33 :   if (!SWIG_IsOK(res1)) {
   24029           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetFieldDomainNames" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   24030             :   }
   24031          33 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   24032          33 :   if (swig_obj[1]) {
   24033           0 :     {
   24034             :       /* %typemap(in) char **dict */
   24035           0 :       arg2 = NULL;
   24036           0 :       if ( PySequence_Check( swig_obj[1] ) ) {
   24037           0 :         int bErr = FALSE;
   24038           0 :         arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   24039           0 :         if ( bErr )
   24040             :         {
   24041           0 :           SWIG_fail;
   24042             :         }
   24043             :       }
   24044           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   24045           0 :         int bErr = FALSE;
   24046           0 :         arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   24047           0 :         if ( bErr )
   24048             :         {
   24049           0 :           SWIG_fail;
   24050             :         }
   24051             :       }
   24052             :       else {
   24053           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   24054           0 :         SWIG_fail;
   24055             :       }
   24056             :     }
   24057             :   }
   24058          33 :   {
   24059          33 :     const int bLocalUseExceptions = GetUseExceptions();
   24060          33 :     if ( bLocalUseExceptions ) {
   24061          24 :       pushErrorHandler();
   24062             :     }
   24063          33 :     {
   24064          33 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   24065          33 :       result = (char **)GDALDatasetShadow_GetFieldDomainNames(arg1,arg2);
   24066          33 :       SWIG_PYTHON_THREAD_END_ALLOW;
   24067             :     }
   24068          33 :     if ( bLocalUseExceptions ) {
   24069          24 :       popErrorHandler();
   24070             :     }
   24071             : #ifndef SED_HACKS
   24072             :     if ( bLocalUseExceptions ) {
   24073             :       CPLErr eclass = CPLGetLastErrorType();
   24074             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   24075             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   24076             :       }
   24077             :     }
   24078             : #endif
   24079             :   }
   24080          33 :   {
   24081             :     /* %typemap(out) char **CSL -> ( string ) */
   24082          33 :     bool bErr = false;
   24083          33 :     resultobj = CSLToList(result, &bErr);
   24084          33 :     CSLDestroy(result);
   24085          33 :     if( bErr ) {
   24086           0 :       SWIG_fail;
   24087             :     }
   24088             :   }
   24089          33 :   {
   24090             :     /* %typemap(freearg) char **dict */
   24091          33 :     CSLDestroy( arg2 );
   24092             :   }
   24093          33 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   24094             :   return resultobj;
   24095           0 : fail:
   24096           0 :   {
   24097             :     /* %typemap(freearg) char **dict */
   24098           0 :     CSLDestroy( arg2 );
   24099             :   }
   24100             :   return NULL;
   24101             : }
   24102             : 
   24103             : 
   24104         118 : SWIGINTERN PyObject *_wrap_Dataset_GetFieldDomain(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   24105         118 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   24106         118 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   24107         118 :   char *arg2 = (char *) 0 ;
   24108         118 :   void *argp1 = 0 ;
   24109         118 :   int res1 = 0 ;
   24110         118 :   int res2 ;
   24111         118 :   char *buf2 = 0 ;
   24112         118 :   int alloc2 = 0 ;
   24113         118 :   PyObject *swig_obj[2] ;
   24114         118 :   OGRFieldDomainShadow *result = 0 ;
   24115             :   
   24116         118 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_GetFieldDomain", 2, 2, swig_obj)) SWIG_fail;
   24117         118 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   24118         118 :   if (!SWIG_IsOK(res1)) {
   24119           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetFieldDomain" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   24120             :   }
   24121         118 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   24122         118 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   24123         118 :   if (!SWIG_IsOK(res2)) {
   24124           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_GetFieldDomain" "', argument " "2"" of type '" "char const *""'");
   24125             :   }
   24126         118 :   arg2 = reinterpret_cast< char * >(buf2);
   24127         118 :   {
   24128         118 :     if (!arg2) {
   24129           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   24130             :     }
   24131             :   }
   24132         117 :   {
   24133         117 :     const int bLocalUseExceptions = GetUseExceptions();
   24134         117 :     if ( bLocalUseExceptions ) {
   24135          79 :       pushErrorHandler();
   24136             :     }
   24137         117 :     {
   24138         117 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   24139         117 :       result = (OGRFieldDomainShadow *)GDALDatasetShadow_GetFieldDomain(arg1,(char const *)arg2);
   24140         117 :       SWIG_PYTHON_THREAD_END_ALLOW;
   24141             :     }
   24142         117 :     if ( bLocalUseExceptions ) {
   24143          79 :       popErrorHandler();
   24144             :     }
   24145             : #ifndef SED_HACKS
   24146             :     if ( bLocalUseExceptions ) {
   24147             :       CPLErr eclass = CPLGetLastErrorType();
   24148             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   24149             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   24150             :       }
   24151             :     }
   24152             : #endif
   24153             :   }
   24154         117 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFieldDomainShadow, 0 |  0 );
   24155         117 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   24156         118 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   24157             :   return resultobj;
   24158           1 : fail:
   24159           1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   24160             :   return NULL;
   24161             : }
   24162             : 
   24163             : 
   24164          36 : SWIGINTERN PyObject *_wrap_Dataset_AddFieldDomain(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   24165          36 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   24166          36 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   24167          36 :   OGRFieldDomainShadow *arg2 = (OGRFieldDomainShadow *) 0 ;
   24168          36 :   void *argp1 = 0 ;
   24169          36 :   int res1 = 0 ;
   24170          36 :   void *argp2 = 0 ;
   24171          36 :   int res2 = 0 ;
   24172          36 :   PyObject *swig_obj[2] ;
   24173          36 :   bool result;
   24174             :   
   24175          36 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_AddFieldDomain", 2, 2, swig_obj)) SWIG_fail;
   24176          36 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   24177          36 :   if (!SWIG_IsOK(res1)) {
   24178           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_AddFieldDomain" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   24179             :   }
   24180          36 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   24181          36 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRFieldDomainShadow, 0 |  0 );
   24182          36 :   if (!SWIG_IsOK(res2)) {
   24183           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_AddFieldDomain" "', argument " "2"" of type '" "OGRFieldDomainShadow *""'"); 
   24184             :   }
   24185          36 :   arg2 = reinterpret_cast< OGRFieldDomainShadow * >(argp2);
   24186          36 :   {
   24187          36 :     if (!arg2) {
   24188           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   24189             :     }
   24190             :   }
   24191          35 :   {
   24192          35 :     const int bLocalUseExceptions = GetUseExceptions();
   24193          35 :     if ( bLocalUseExceptions ) {
   24194          14 :       pushErrorHandler();
   24195             :     }
   24196          35 :     {
   24197          35 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   24198          35 :       result = (bool)GDALDatasetShadow_AddFieldDomain(arg1,arg2);
   24199          35 :       SWIG_PYTHON_THREAD_END_ALLOW;
   24200             :     }
   24201          35 :     if ( bLocalUseExceptions ) {
   24202          14 :       popErrorHandler();
   24203             :     }
   24204             : #ifndef SED_HACKS
   24205             :     if ( bLocalUseExceptions ) {
   24206             :       CPLErr eclass = CPLGetLastErrorType();
   24207             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   24208             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   24209             :       }
   24210             :     }
   24211             : #endif
   24212             :   }
   24213          35 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   24214          36 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   24215             :   return resultobj;
   24216             : fail:
   24217             :   return NULL;
   24218             : }
   24219             : 
   24220             : 
   24221          10 : SWIGINTERN PyObject *_wrap_Dataset_DeleteFieldDomain(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   24222          10 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   24223          10 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   24224          10 :   char *arg2 = (char *) 0 ;
   24225          10 :   void *argp1 = 0 ;
   24226          10 :   int res1 = 0 ;
   24227          10 :   int res2 ;
   24228          10 :   char *buf2 = 0 ;
   24229          10 :   int alloc2 = 0 ;
   24230          10 :   PyObject *swig_obj[2] ;
   24231          10 :   bool result;
   24232             :   
   24233          10 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_DeleteFieldDomain", 2, 2, swig_obj)) SWIG_fail;
   24234          10 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   24235          10 :   if (!SWIG_IsOK(res1)) {
   24236           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_DeleteFieldDomain" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   24237             :   }
   24238          10 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   24239          10 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   24240          10 :   if (!SWIG_IsOK(res2)) {
   24241           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_DeleteFieldDomain" "', argument " "2"" of type '" "char const *""'");
   24242             :   }
   24243          10 :   arg2 = reinterpret_cast< char * >(buf2);
   24244          10 :   {
   24245          10 :     if (!arg2) {
   24246           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   24247             :     }
   24248             :   }
   24249          10 :   {
   24250          10 :     const int bLocalUseExceptions = GetUseExceptions();
   24251          10 :     if ( bLocalUseExceptions ) {
   24252           9 :       pushErrorHandler();
   24253             :     }
   24254          10 :     {
   24255          10 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   24256          10 :       result = (bool)GDALDatasetShadow_DeleteFieldDomain(arg1,(char const *)arg2);
   24257          10 :       SWIG_PYTHON_THREAD_END_ALLOW;
   24258             :     }
   24259          10 :     if ( bLocalUseExceptions ) {
   24260           9 :       popErrorHandler();
   24261             :     }
   24262             : #ifndef SED_HACKS
   24263             :     if ( bLocalUseExceptions ) {
   24264             :       CPLErr eclass = CPLGetLastErrorType();
   24265             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   24266             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   24267             :       }
   24268             :     }
   24269             : #endif
   24270             :   }
   24271          10 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   24272          10 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   24273          11 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   24274             :   return resultobj;
   24275           0 : fail:
   24276           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   24277             :   return NULL;
   24278             : }
   24279             : 
   24280             : 
   24281           5 : SWIGINTERN PyObject *_wrap_Dataset_UpdateFieldDomain(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   24282           5 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   24283           5 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   24284           5 :   OGRFieldDomainShadow *arg2 = (OGRFieldDomainShadow *) 0 ;
   24285           5 :   void *argp1 = 0 ;
   24286           5 :   int res1 = 0 ;
   24287           5 :   void *argp2 = 0 ;
   24288           5 :   int res2 = 0 ;
   24289           5 :   PyObject *swig_obj[2] ;
   24290           5 :   bool result;
   24291             :   
   24292           5 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_UpdateFieldDomain", 2, 2, swig_obj)) SWIG_fail;
   24293           5 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   24294           5 :   if (!SWIG_IsOK(res1)) {
   24295           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_UpdateFieldDomain" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   24296             :   }
   24297           5 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   24298           5 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRFieldDomainShadow, 0 |  0 );
   24299           5 :   if (!SWIG_IsOK(res2)) {
   24300           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_UpdateFieldDomain" "', argument " "2"" of type '" "OGRFieldDomainShadow *""'"); 
   24301             :   }
   24302           5 :   arg2 = reinterpret_cast< OGRFieldDomainShadow * >(argp2);
   24303           5 :   {
   24304           5 :     if (!arg2) {
   24305           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   24306             :     }
   24307             :   }
   24308           5 :   {
   24309           5 :     const int bLocalUseExceptions = GetUseExceptions();
   24310           5 :     if ( bLocalUseExceptions ) {
   24311           4 :       pushErrorHandler();
   24312             :     }
   24313           5 :     {
   24314           5 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   24315           5 :       result = (bool)GDALDatasetShadow_UpdateFieldDomain(arg1,arg2);
   24316           5 :       SWIG_PYTHON_THREAD_END_ALLOW;
   24317             :     }
   24318           5 :     if ( bLocalUseExceptions ) {
   24319           4 :       popErrorHandler();
   24320             :     }
   24321             : #ifndef SED_HACKS
   24322             :     if ( bLocalUseExceptions ) {
   24323             :       CPLErr eclass = CPLGetLastErrorType();
   24324             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   24325             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   24326             :       }
   24327             :     }
   24328             : #endif
   24329             :   }
   24330           5 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   24331           5 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   24332             :   return resultobj;
   24333             : fail:
   24334             :   return NULL;
   24335             : }
   24336             : 
   24337             : 
   24338          41 : SWIGINTERN PyObject *_wrap_Dataset_GetRelationshipNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   24339          41 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   24340          41 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   24341          41 :   char **arg2 = (char **) 0 ;
   24342          41 :   void *argp1 = 0 ;
   24343          41 :   int res1 = 0 ;
   24344          41 :   PyObject *swig_obj[2] ;
   24345          41 :   char **result = 0 ;
   24346             :   
   24347          41 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_GetRelationshipNames", 1, 2, swig_obj)) SWIG_fail;
   24348          41 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   24349          41 :   if (!SWIG_IsOK(res1)) {
   24350           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetRelationshipNames" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   24351             :   }
   24352          41 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   24353          41 :   if (swig_obj[1]) {
   24354           0 :     {
   24355             :       /* %typemap(in) char **dict */
   24356           0 :       arg2 = NULL;
   24357           0 :       if ( PySequence_Check( swig_obj[1] ) ) {
   24358           0 :         int bErr = FALSE;
   24359           0 :         arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   24360           0 :         if ( bErr )
   24361             :         {
   24362           0 :           SWIG_fail;
   24363             :         }
   24364             :       }
   24365           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   24366           0 :         int bErr = FALSE;
   24367           0 :         arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   24368           0 :         if ( bErr )
   24369             :         {
   24370           0 :           SWIG_fail;
   24371             :         }
   24372             :       }
   24373             :       else {
   24374           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   24375           0 :         SWIG_fail;
   24376             :       }
   24377             :     }
   24378             :   }
   24379          41 :   {
   24380          41 :     const int bLocalUseExceptions = GetUseExceptions();
   24381          41 :     if ( bLocalUseExceptions ) {
   24382           2 :       pushErrorHandler();
   24383             :     }
   24384          41 :     {
   24385          41 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   24386          41 :       result = (char **)GDALDatasetShadow_GetRelationshipNames(arg1,arg2);
   24387          41 :       SWIG_PYTHON_THREAD_END_ALLOW;
   24388             :     }
   24389          41 :     if ( bLocalUseExceptions ) {
   24390           2 :       popErrorHandler();
   24391             :     }
   24392             : #ifndef SED_HACKS
   24393             :     if ( bLocalUseExceptions ) {
   24394             :       CPLErr eclass = CPLGetLastErrorType();
   24395             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   24396             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   24397             :       }
   24398             :     }
   24399             : #endif
   24400             :   }
   24401          41 :   {
   24402             :     /* %typemap(out) char **CSL -> ( string ) */
   24403          41 :     bool bErr = false;
   24404          41 :     resultobj = CSLToList(result, &bErr);
   24405          41 :     CSLDestroy(result);
   24406          41 :     if( bErr ) {
   24407           0 :       SWIG_fail;
   24408             :     }
   24409             :   }
   24410          41 :   {
   24411             :     /* %typemap(freearg) char **dict */
   24412          41 :     CSLDestroy( arg2 );
   24413             :   }
   24414          41 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   24415             :   return resultobj;
   24416           0 : fail:
   24417           0 :   {
   24418             :     /* %typemap(freearg) char **dict */
   24419           0 :     CSLDestroy( arg2 );
   24420             :   }
   24421             :   return NULL;
   24422             : }
   24423             : 
   24424             : 
   24425          50 : SWIGINTERN PyObject *_wrap_Dataset_GetRelationship(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   24426          50 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   24427          50 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   24428          50 :   char *arg2 = (char *) 0 ;
   24429          50 :   void *argp1 = 0 ;
   24430          50 :   int res1 = 0 ;
   24431          50 :   int res2 ;
   24432          50 :   char *buf2 = 0 ;
   24433          50 :   int alloc2 = 0 ;
   24434          50 :   PyObject *swig_obj[2] ;
   24435          50 :   GDALRelationshipShadow *result = 0 ;
   24436             :   
   24437          50 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_GetRelationship", 2, 2, swig_obj)) SWIG_fail;
   24438          50 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   24439          50 :   if (!SWIG_IsOK(res1)) {
   24440           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetRelationship" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   24441             :   }
   24442          50 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   24443          50 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   24444          50 :   if (!SWIG_IsOK(res2)) {
   24445           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_GetRelationship" "', argument " "2"" of type '" "char const *""'");
   24446             :   }
   24447          50 :   arg2 = reinterpret_cast< char * >(buf2);
   24448          50 :   {
   24449          50 :     if (!arg2) {
   24450           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   24451             :     }
   24452             :   }
   24453          50 :   {
   24454          50 :     const int bLocalUseExceptions = GetUseExceptions();
   24455          50 :     if ( bLocalUseExceptions ) {
   24456           8 :       pushErrorHandler();
   24457             :     }
   24458          50 :     {
   24459          50 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   24460          50 :       result = (GDALRelationshipShadow *)GDALDatasetShadow_GetRelationship(arg1,(char const *)arg2);
   24461          50 :       SWIG_PYTHON_THREAD_END_ALLOW;
   24462             :     }
   24463          50 :     if ( bLocalUseExceptions ) {
   24464           8 :       popErrorHandler();
   24465             :     }
   24466             : #ifndef SED_HACKS
   24467             :     if ( bLocalUseExceptions ) {
   24468             :       CPLErr eclass = CPLGetLastErrorType();
   24469             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   24470             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   24471             :       }
   24472             :     }
   24473             : #endif
   24474             :   }
   24475          50 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   24476          50 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   24477          50 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   24478             :   return resultobj;
   24479           0 : fail:
   24480           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   24481             :   return NULL;
   24482             : }
   24483             : 
   24484             : 
   24485          42 : SWIGINTERN PyObject *_wrap_Dataset_AddRelationship(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   24486          42 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   24487          42 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   24488          42 :   GDALRelationshipShadow *arg2 = (GDALRelationshipShadow *) 0 ;
   24489          42 :   void *argp1 = 0 ;
   24490          42 :   int res1 = 0 ;
   24491          42 :   void *argp2 = 0 ;
   24492          42 :   int res2 = 0 ;
   24493          42 :   PyObject *swig_obj[2] ;
   24494          42 :   bool result;
   24495             :   
   24496          42 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_AddRelationship", 2, 2, swig_obj)) SWIG_fail;
   24497          42 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   24498          42 :   if (!SWIG_IsOK(res1)) {
   24499           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_AddRelationship" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   24500             :   }
   24501          42 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   24502          42 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   24503          42 :   if (!SWIG_IsOK(res2)) {
   24504           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_AddRelationship" "', argument " "2"" of type '" "GDALRelationshipShadow *""'"); 
   24505             :   }
   24506          42 :   arg2 = reinterpret_cast< GDALRelationshipShadow * >(argp2);
   24507          42 :   {
   24508          42 :     if (!arg2) {
   24509           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   24510             :     }
   24511             :   }
   24512          42 :   {
   24513          42 :     const int bLocalUseExceptions = GetUseExceptions();
   24514          42 :     if ( bLocalUseExceptions ) {
   24515           0 :       pushErrorHandler();
   24516             :     }
   24517          42 :     {
   24518          42 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   24519          42 :       result = (bool)GDALDatasetShadow_AddRelationship(arg1,arg2);
   24520          42 :       SWIG_PYTHON_THREAD_END_ALLOW;
   24521             :     }
   24522          42 :     if ( bLocalUseExceptions ) {
   24523           0 :       popErrorHandler();
   24524             :     }
   24525             : #ifndef SED_HACKS
   24526             :     if ( bLocalUseExceptions ) {
   24527             :       CPLErr eclass = CPLGetLastErrorType();
   24528             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   24529             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   24530             :       }
   24531             :     }
   24532             : #endif
   24533             :   }
   24534          42 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   24535          42 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   24536             :   return resultobj;
   24537             : fail:
   24538             :   return NULL;
   24539             : }
   24540             : 
   24541             : 
   24542           6 : SWIGINTERN PyObject *_wrap_Dataset_DeleteRelationship(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   24543           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   24544           6 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   24545           6 :   char *arg2 = (char *) 0 ;
   24546           6 :   void *argp1 = 0 ;
   24547           6 :   int res1 = 0 ;
   24548           6 :   int res2 ;
   24549           6 :   char *buf2 = 0 ;
   24550           6 :   int alloc2 = 0 ;
   24551           6 :   PyObject *swig_obj[2] ;
   24552           6 :   bool result;
   24553             :   
   24554           6 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_DeleteRelationship", 2, 2, swig_obj)) SWIG_fail;
   24555           6 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   24556           6 :   if (!SWIG_IsOK(res1)) {
   24557           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_DeleteRelationship" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   24558             :   }
   24559           6 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   24560           6 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   24561           6 :   if (!SWIG_IsOK(res2)) {
   24562           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_DeleteRelationship" "', argument " "2"" of type '" "char const *""'");
   24563             :   }
   24564           6 :   arg2 = reinterpret_cast< char * >(buf2);
   24565           6 :   {
   24566           6 :     if (!arg2) {
   24567           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   24568             :     }
   24569             :   }
   24570           6 :   {
   24571           6 :     const int bLocalUseExceptions = GetUseExceptions();
   24572           6 :     if ( bLocalUseExceptions ) {
   24573           0 :       pushErrorHandler();
   24574             :     }
   24575           6 :     {
   24576           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   24577           6 :       result = (bool)GDALDatasetShadow_DeleteRelationship(arg1,(char const *)arg2);
   24578           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   24579             :     }
   24580           6 :     if ( bLocalUseExceptions ) {
   24581           0 :       popErrorHandler();
   24582             :     }
   24583             : #ifndef SED_HACKS
   24584             :     if ( bLocalUseExceptions ) {
   24585             :       CPLErr eclass = CPLGetLastErrorType();
   24586             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   24587             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   24588             :       }
   24589             :     }
   24590             : #endif
   24591             :   }
   24592           6 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   24593           6 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   24594           6 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   24595             :   return resultobj;
   24596           0 : fail:
   24597           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   24598             :   return NULL;
   24599             : }
   24600             : 
   24601             : 
   24602           9 : SWIGINTERN PyObject *_wrap_Dataset_UpdateRelationship(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   24603           9 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   24604           9 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   24605           9 :   GDALRelationshipShadow *arg2 = (GDALRelationshipShadow *) 0 ;
   24606           9 :   void *argp1 = 0 ;
   24607           9 :   int res1 = 0 ;
   24608           9 :   void *argp2 = 0 ;
   24609           9 :   int res2 = 0 ;
   24610           9 :   PyObject *swig_obj[2] ;
   24611           9 :   bool result;
   24612             :   
   24613           9 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_UpdateRelationship", 2, 2, swig_obj)) SWIG_fail;
   24614           9 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   24615           9 :   if (!SWIG_IsOK(res1)) {
   24616           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_UpdateRelationship" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   24617             :   }
   24618           9 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   24619           9 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   24620           9 :   if (!SWIG_IsOK(res2)) {
   24621           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_UpdateRelationship" "', argument " "2"" of type '" "GDALRelationshipShadow *""'"); 
   24622             :   }
   24623           9 :   arg2 = reinterpret_cast< GDALRelationshipShadow * >(argp2);
   24624           9 :   {
   24625           9 :     if (!arg2) {
   24626           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   24627             :     }
   24628             :   }
   24629           9 :   {
   24630           9 :     const int bLocalUseExceptions = GetUseExceptions();
   24631           9 :     if ( bLocalUseExceptions ) {
   24632           0 :       pushErrorHandler();
   24633             :     }
   24634           9 :     {
   24635           9 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   24636           9 :       result = (bool)GDALDatasetShadow_UpdateRelationship(arg1,arg2);
   24637           9 :       SWIG_PYTHON_THREAD_END_ALLOW;
   24638             :     }
   24639           9 :     if ( bLocalUseExceptions ) {
   24640           0 :       popErrorHandler();
   24641             :     }
   24642             : #ifndef SED_HACKS
   24643             :     if ( bLocalUseExceptions ) {
   24644             :       CPLErr eclass = CPLGetLastErrorType();
   24645             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   24646             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   24647             :       }
   24648             :     }
   24649             : #endif
   24650             :   }
   24651           9 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   24652           9 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   24653             :   return resultobj;
   24654             : fail:
   24655             :   return NULL;
   24656             : }
   24657             : 
   24658             : 
   24659      175262 : SWIGINTERN PyObject *_wrap_Dataset_ReadRaster1(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   24660      175262 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   24661      175262 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   24662      175262 :   double arg2 ;
   24663      175262 :   double arg3 ;
   24664      175262 :   double arg4 ;
   24665      175262 :   double arg5 ;
   24666      175262 :   void **arg6 = (void **) 0 ;
   24667      175262 :   int *arg7 = (int *) 0 ;
   24668      175262 :   int *arg8 = (int *) 0 ;
   24669      175262 :   GDALDataType *arg9 = (GDALDataType *) 0 ;
   24670      175262 :   int arg10 = (int) 0 ;
   24671      175262 :   int *arg11 = (int *) 0 ;
   24672      175262 :   GIntBig *arg12 = (GIntBig *) 0 ;
   24673      175262 :   GIntBig *arg13 = (GIntBig *) 0 ;
   24674      175262 :   GIntBig *arg14 = (GIntBig *) 0 ;
   24675      175262 :   GDALRIOResampleAlg arg15 = (GDALRIOResampleAlg) GRIORA_NearestNeighbour ;
   24676      175262 :   GDALProgressFunc arg16 = (GDALProgressFunc) NULL ;
   24677      175262 :   void *arg17 = (void *) NULL ;
   24678      175262 :   void *arg18 = (void *) NULL ;
   24679      175262 :   void *argp1 = 0 ;
   24680      175262 :   int res1 = 0 ;
   24681      175262 :   double val2 ;
   24682      175262 :   int ecode2 = 0 ;
   24683      175262 :   double val3 ;
   24684      175262 :   int ecode3 = 0 ;
   24685      175262 :   double val4 ;
   24686      175262 :   int ecode4 = 0 ;
   24687      175262 :   double val5 ;
   24688      175262 :   int ecode5 = 0 ;
   24689      175262 :   void *pyObject6 = NULL ;
   24690      175262 :   int val7 ;
   24691      175262 :   int val8 ;
   24692      175262 :   GDALDataType val9 ;
   24693      175262 :   GIntBig val12 ;
   24694      175262 :   GIntBig val13 ;
   24695      175262 :   GIntBig val14 ;
   24696      175262 :   PyObject * obj0 = 0 ;
   24697      175262 :   PyObject * obj1 = 0 ;
   24698      175262 :   PyObject * obj2 = 0 ;
   24699      175262 :   PyObject * obj3 = 0 ;
   24700      175262 :   PyObject * obj4 = 0 ;
   24701      175262 :   PyObject * obj5 = 0 ;
   24702      175262 :   PyObject * obj6 = 0 ;
   24703      175262 :   PyObject * obj7 = 0 ;
   24704      175262 :   PyObject * obj8 = 0 ;
   24705      175262 :   PyObject * obj9 = 0 ;
   24706      175262 :   PyObject * obj10 = 0 ;
   24707      175262 :   PyObject * obj11 = 0 ;
   24708      175262 :   PyObject * obj12 = 0 ;
   24709      175262 :   PyObject * obj13 = 0 ;
   24710      175262 :   PyObject * obj14 = 0 ;
   24711      175262 :   PyObject * obj15 = 0 ;
   24712      175262 :   char * kwnames[] = {
   24713             :     (char *)"self",  (char *)"xoff",  (char *)"yoff",  (char *)"xsize",  (char *)"ysize",  (char *)"buf_xsize",  (char *)"buf_ysize",  (char *)"buf_type",  (char *)"band_list",  (char *)"buf_pixel_space",  (char *)"buf_line_space",  (char *)"buf_band_space",  (char *)"resample_alg",  (char *)"callback",  (char *)"callback_data",  (char *)"inputOutputBuf",  NULL 
   24714             :   };
   24715      175262 :   CPLErr result;
   24716             :   
   24717             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   24718      175262 :   PyProgressData *psProgressInfo;
   24719      175262 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   24720      175262 :   psProgressInfo->nLastReported = -1;
   24721      175262 :   psProgressInfo->psPyCallback = NULL;
   24722      175262 :   psProgressInfo->psPyCallbackData = NULL;
   24723      175262 :   arg17 = psProgressInfo;
   24724      175262 :   {
   24725             :     /* %typemap(in,numinputs=0) ( void **outPythonObject ) ( void *pyObject6 = NULL ) */
   24726      175262 :     arg6 = &pyObject6;
   24727             :   }
   24728      175262 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO|OOOOOOOOOOO:Dataset_ReadRaster1", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10, &obj11, &obj12, &obj13, &obj14, &obj15)) SWIG_fail;
   24729      175262 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   24730      175262 :   if (!SWIG_IsOK(res1)) {
   24731           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_ReadRaster1" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   24732             :   }
   24733      175262 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   24734      175262 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   24735      175262 :   if (!SWIG_IsOK(ecode2)) {
   24736           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_ReadRaster1" "', argument " "2"" of type '" "double""'");
   24737             :   } 
   24738      175262 :   arg2 = static_cast< double >(val2);
   24739      175262 :   ecode3 = SWIG_AsVal_double(obj2, &val3);
   24740      175262 :   if (!SWIG_IsOK(ecode3)) {
   24741           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Dataset_ReadRaster1" "', argument " "3"" of type '" "double""'");
   24742             :   } 
   24743      175262 :   arg3 = static_cast< double >(val3);
   24744      175262 :   ecode4 = SWIG_AsVal_double(obj3, &val4);
   24745      175262 :   if (!SWIG_IsOK(ecode4)) {
   24746           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Dataset_ReadRaster1" "', argument " "4"" of type '" "double""'");
   24747             :   } 
   24748      175262 :   arg4 = static_cast< double >(val4);
   24749      175262 :   ecode5 = SWIG_AsVal_double(obj4, &val5);
   24750      175262 :   if (!SWIG_IsOK(ecode5)) {
   24751           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Dataset_ReadRaster1" "', argument " "5"" of type '" "double""'");
   24752             :   } 
   24753      175262 :   arg5 = static_cast< double >(val5);
   24754      175262 :   if (obj5) {
   24755      175262 :     {
   24756             :       /* %typemap(in) (int *optional_##int) */
   24757      175262 :       if ( obj5 == Py_None ) {
   24758             :         arg7 = 0;
   24759             :       }
   24760      175262 :       else if ( PyArg_Parse( obj5,"i" ,&val7 ) ) {
   24761             :         arg7 = (int *) &val7;
   24762             :       }
   24763             :       else {
   24764           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   24765           0 :         SWIG_fail;
   24766             :       }
   24767             :     }
   24768             :   }
   24769      175262 :   if (obj6) {
   24770      175262 :     {
   24771             :       /* %typemap(in) (int *optional_##int) */
   24772      175262 :       if ( obj6 == Py_None ) {
   24773             :         arg8 = 0;
   24774             :       }
   24775      175262 :       else if ( PyArg_Parse( obj6,"i" ,&val8 ) ) {
   24776             :         arg8 = (int *) &val8;
   24777             :       }
   24778             :       else {
   24779           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   24780           0 :         SWIG_fail;
   24781             :       }
   24782             :     }
   24783             :   }
   24784      175262 :   if (obj7) {
   24785      175262 :     {
   24786             :       /* %typemap(in) (GDALDataType *optional_GDALDataType) */
   24787      175262 :       int intval = 0;
   24788      175262 :       if ( obj7 == Py_None ) {
   24789             :         arg9 = NULL;
   24790             :       }
   24791      350524 :       else if ( SWIG_IsOK(SWIG_AsVal_int(obj7, &intval)) ) {
   24792      175262 :         if( intval < GDT_Unknown || intval >= GDT_TypeCount )
   24793             :         {
   24794           0 :           SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   24795             :         }
   24796      175262 :         val9 = static_cast<GDALDataType>(intval);
   24797      175262 :         arg9 = &val9;
   24798             :       }
   24799             :       else {
   24800           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   24801           0 :         SWIG_fail;
   24802             :       }
   24803             :     }
   24804             :   }
   24805      175262 :   if (obj8) {
   24806      175262 :     {
   24807             :       /* %typemap(in,numinputs=1) (int nList, int* pList)*/
   24808      175262 :       arg11 = CreateCIntListFromSequence(obj8, &arg10);
   24809      175262 :       if( arg10 < 0 ) {
   24810           0 :         SWIG_fail;
   24811             :       }
   24812             :     }
   24813             :   }
   24814      175262 :   if (obj9) {
   24815      175262 :     {
   24816             :       /* %typemap(in) (GIntBig *optional_##GIntBig) */
   24817      175262 :       if ( obj9 == Py_None ) {
   24818             :         arg12 = 0;
   24819             :       }
   24820        1069 :       else if ( PyArg_Parse( obj9,"L" ,&val12 ) ) {
   24821             :         arg12 = (GIntBig *) &val12;
   24822             :       }
   24823             :       else {
   24824           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   24825           0 :         SWIG_fail;
   24826             :       }
   24827             :     }
   24828             :   }
   24829      175262 :   if (obj10) {
   24830      175262 :     {
   24831             :       /* %typemap(in) (GIntBig *optional_##GIntBig) */
   24832      175262 :       if ( obj10 == Py_None ) {
   24833             :         arg13 = 0;
   24834             :       }
   24835          21 :       else if ( PyArg_Parse( obj10,"L" ,&val13 ) ) {
   24836             :         arg13 = (GIntBig *) &val13;
   24837             :       }
   24838             :       else {
   24839           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   24840           0 :         SWIG_fail;
   24841             :       }
   24842             :     }
   24843             :   }
   24844      175262 :   if (obj11) {
   24845      175262 :     {
   24846             :       /* %typemap(in) (GIntBig *optional_##GIntBig) */
   24847      175262 :       if ( obj11 == Py_None ) {
   24848             :         arg14 = 0;
   24849             :       }
   24850        1067 :       else if ( PyArg_Parse( obj11,"L" ,&val14 ) ) {
   24851             :         arg14 = (GIntBig *) &val14;
   24852             :       }
   24853             :       else {
   24854           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   24855           0 :         SWIG_fail;
   24856             :       }
   24857             :     }
   24858             :   }
   24859      175262 :   if (obj12) {
   24860      175262 :     {
   24861             :       // %typemap(in) GDALRIOResampleAlg
   24862      175262 :       int val = 0;
   24863      175262 :       int ecode = SWIG_AsVal_int(obj12, &val);
   24864      175262 :       if (!SWIG_IsOK(ecode)) {
   24865           1 :         SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALRIOResampleAlg");
   24866             :       }
   24867      175261 :       if( val < 0 ||
   24868      175260 :         ( val >= static_cast<int>(GRIORA_RESERVED_START) &&
   24869      175259 :           val <= static_cast<int>(GRIORA_RESERVED_END) ) ||
   24870             :         val > static_cast<int>(GRIORA_LAST) )
   24871             :       {
   24872           2 :         SWIG_exception_fail(SWIG_ValueError, "Invalid value for resample_alg");
   24873             :       }
   24874             :       arg15 = static_cast< GDALRIOResampleAlg >(val);
   24875             :     }
   24876             :   }
   24877      175259 :   if (obj13) {
   24878      175259 :     {
   24879             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   24880             :       /* callback_func typemap */
   24881             :       
   24882             :       /* In some cases 0 is passed instead of None. */
   24883             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   24884      175259 :       if ( PyLong_Check(obj13) || PyInt_Check(obj13) )
   24885             :       {
   24886           0 :         if( PyLong_AsLong(obj13) == 0 )
   24887             :         {
   24888           0 :           obj13 = Py_None;
   24889             :         }
   24890             :       }
   24891             :       
   24892      175259 :       if (obj13 && obj13 != Py_None ) {
   24893           7 :         void* cbfunction = NULL;
   24894           7 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj13,
   24895             :             (void**)&cbfunction,
   24896             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   24897             :             SWIG_POINTER_EXCEPTION | 0 ));
   24898             :         
   24899           7 :         if ( cbfunction == GDALTermProgress ) {
   24900             :           arg16 = GDALTermProgress;
   24901             :         } else {
   24902           7 :           if (!PyCallable_Check(obj13)) {
   24903           0 :             PyErr_SetString( PyExc_RuntimeError,
   24904             :               "Object given is not a Python function" );
   24905           0 :             SWIG_fail;
   24906             :           }
   24907           7 :           psProgressInfo->psPyCallback = obj13;
   24908           7 :           arg16 = PyProgressProxy;
   24909             :         }
   24910             :         
   24911             :       }
   24912             :       
   24913             :     }
   24914             :   }
   24915      175259 :   if (obj14) {
   24916      175259 :     {
   24917             :       /* %typemap(in) ( void* callback_data=NULL)  */
   24918      175259 :       psProgressInfo->psPyCallbackData = obj14 ;
   24919             :     }
   24920             :   }
   24921      175259 :   if (obj15) {
   24922      175259 :     {
   24923             :       /* %typemap(in) ( void *inPythonObject ) */
   24924      175259 :       arg18 = obj15;
   24925             :     }
   24926             :   }
   24927      175259 :   {
   24928      175259 :     const int bLocalUseExceptions = GetUseExceptions();
   24929      175259 :     if ( bLocalUseExceptions ) {
   24930         942 :       pushErrorHandler();
   24931             :     }
   24932      175259 :     {
   24933      175259 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   24934      175259 :       CPL_IGNORE_RET_VAL(result = (CPLErr)GDALDatasetShadow_ReadRaster1(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18));
   24935      175259 :       SWIG_PYTHON_THREAD_END_ALLOW;
   24936             :     }
   24937      175259 :     if ( bLocalUseExceptions ) {
   24938         942 :       popErrorHandler();
   24939             :     }
   24940             : #ifndef SED_HACKS
   24941             :     if ( bLocalUseExceptions ) {
   24942             :       CPLErr eclass = CPLGetLastErrorType();
   24943             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   24944             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   24945             :       }
   24946             :     }
   24947             : #endif
   24948             :   }
   24949      175259 :   resultobj = SWIG_From_int(static_cast< int >(result));
   24950      175259 :   {
   24951             :     /* %typemap(argout) ( void **outPythonObject ) */
   24952      175259 :     Py_XDECREF(resultobj);
   24953      175259 :     if (*arg6)
   24954             :     {
   24955             :       resultobj = (PyObject*)*arg6;
   24956             :     }
   24957             :     else
   24958             :     {
   24959        1158 :       resultobj = Py_None;
   24960        1158 :       Py_INCREF(resultobj);
   24961             :     }
   24962             :   }
   24963      175259 :   {
   24964             :     /* %typemap(freearg) (int nList, int* pList) */
   24965      175259 :     free(arg11);
   24966             :   }
   24967      175259 :   {
   24968             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   24969             :     
   24970      175259 :     CPLFree(psProgressInfo);
   24971             :     
   24972             :   }
   24973      175267 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   24974             :   return resultobj;
   24975           3 : fail:
   24976           3 :   {
   24977             :     /* %typemap(freearg) (int nList, int* pList) */
   24978           3 :     free(arg11);
   24979             :   }
   24980           3 :   {
   24981             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   24982             :     
   24983           3 :     CPLFree(psProgressInfo);
   24984             :     
   24985             :   }
   24986             :   return NULL;
   24987             : }
   24988             : 
   24989             : 
   24990         271 : SWIGINTERN PyObject *Dataset_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   24991         271 :   PyObject *obj;
   24992         271 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   24993         271 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALDatasetShadow, SWIG_NewClientData(obj));
   24994         271 :   return SWIG_Py_Void();
   24995             : }
   24996             : 
   24997           9 : SWIGINTERN PyObject *_wrap_new_RasterAttributeTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   24998           9 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   24999           9 :   GDALRasterAttributeTableShadow *result = 0 ;
   25000             :   
   25001           9 :   if (!SWIG_Python_UnpackTuple(args, "new_RasterAttributeTable", 0, 0, 0)) SWIG_fail;
   25002           9 :   {
   25003           9 :     const int bLocalUseExceptions = GetUseExceptions();
   25004           9 :     if ( bLocalUseExceptions ) {
   25005           9 :       pushErrorHandler();
   25006             :     }
   25007           9 :     {
   25008           9 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   25009           9 :       result = (GDALRasterAttributeTableShadow *)new_GDALRasterAttributeTableShadow();
   25010           9 :       SWIG_PYTHON_THREAD_END_ALLOW;
   25011             :     }
   25012           9 :     if ( bLocalUseExceptions ) {
   25013           9 :       popErrorHandler();
   25014             :     }
   25015             : #ifndef SED_HACKS
   25016             :     if ( bLocalUseExceptions ) {
   25017             :       CPLErr eclass = CPLGetLastErrorType();
   25018             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   25019             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   25020             :       }
   25021             :     }
   25022             : #endif
   25023             :   }
   25024           9 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterAttributeTableShadow, SWIG_POINTER_NEW |  0 );
   25025           9 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   25026             :   return resultobj;
   25027           0 : fail:
   25028           0 :   return NULL;
   25029             : }
   25030             : 
   25031             : 
   25032          16 : SWIGINTERN PyObject *_wrap_delete_RasterAttributeTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   25033          16 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   25034          16 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   25035          16 :   void *argp1 = 0 ;
   25036          16 :   int res1 = 0 ;
   25037          16 :   PyObject *swig_obj[1] ;
   25038             :   
   25039          16 :   if (!args) SWIG_fail;
   25040          16 :   swig_obj[0] = args;
   25041          16 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, SWIG_POINTER_DISOWN |  0 );
   25042          16 :   if (!SWIG_IsOK(res1)) {
   25043           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RasterAttributeTable" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   25044             :   }
   25045          16 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   25046          16 :   {
   25047          16 :     const int bLocalUseExceptions = GetUseExceptions();
   25048          16 :     if ( bLocalUseExceptions ) {
   25049          16 :       pushErrorHandler();
   25050             :     }
   25051          16 :     {
   25052          16 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   25053          16 :       delete_GDALRasterAttributeTableShadow(arg1);
   25054          16 :       SWIG_PYTHON_THREAD_END_ALLOW;
   25055             :     }
   25056          16 :     if ( bLocalUseExceptions ) {
   25057          16 :       popErrorHandler();
   25058             :     }
   25059             : #ifndef SED_HACKS
   25060             :     if ( bLocalUseExceptions ) {
   25061             :       CPLErr eclass = CPLGetLastErrorType();
   25062             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   25063             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   25064             :       }
   25065             :     }
   25066             : #endif
   25067             :   }
   25068          16 :   resultobj = SWIG_Py_Void();
   25069          16 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   25070             :   return resultobj;
   25071             : fail:
   25072             :   return NULL;
   25073             : }
   25074             : 
   25075             : 
   25076           5 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_Clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   25077           5 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   25078           5 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   25079           5 :   void *argp1 = 0 ;
   25080           5 :   int res1 = 0 ;
   25081           5 :   PyObject *swig_obj[1] ;
   25082           5 :   GDALRasterAttributeTableShadow *result = 0 ;
   25083             :   
   25084           5 :   if (!args) SWIG_fail;
   25085           5 :   swig_obj[0] = args;
   25086           5 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   25087           5 :   if (!SWIG_IsOK(res1)) {
   25088           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_Clone" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   25089             :   }
   25090           5 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   25091           5 :   {
   25092           5 :     const int bLocalUseExceptions = GetUseExceptions();
   25093           5 :     if ( bLocalUseExceptions ) {
   25094           5 :       pushErrorHandler();
   25095             :     }
   25096           5 :     {
   25097           5 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   25098           5 :       result = (GDALRasterAttributeTableShadow *)GDALRasterAttributeTableShadow_Clone(arg1);
   25099           5 :       SWIG_PYTHON_THREAD_END_ALLOW;
   25100             :     }
   25101           5 :     if ( bLocalUseExceptions ) {
   25102           5 :       popErrorHandler();
   25103             :     }
   25104             : #ifndef SED_HACKS
   25105             :     if ( bLocalUseExceptions ) {
   25106             :       CPLErr eclass = CPLGetLastErrorType();
   25107             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   25108             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   25109             :       }
   25110             :     }
   25111             : #endif
   25112             :   }
   25113           5 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterAttributeTableShadow, SWIG_POINTER_OWN |  0 );
   25114           5 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   25115             :   return resultobj;
   25116             : fail:
   25117             :   return NULL;
   25118             : }
   25119             : 
   25120             : 
   25121          31 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetColumnCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   25122          31 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   25123          31 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   25124          31 :   void *argp1 = 0 ;
   25125          31 :   int res1 = 0 ;
   25126          31 :   PyObject *swig_obj[1] ;
   25127          31 :   int result;
   25128             :   
   25129          31 :   if (!args) SWIG_fail;
   25130          31 :   swig_obj[0] = args;
   25131          31 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   25132          31 :   if (!SWIG_IsOK(res1)) {
   25133           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetColumnCount" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   25134             :   }
   25135          31 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   25136          31 :   {
   25137          31 :     const int bLocalUseExceptions = GetUseExceptions();
   25138          31 :     if ( bLocalUseExceptions ) {
   25139          30 :       pushErrorHandler();
   25140             :     }
   25141          31 :     {
   25142          31 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   25143          31 :       result = (int)GDALRasterAttributeTableShadow_GetColumnCount(arg1);
   25144          31 :       SWIG_PYTHON_THREAD_END_ALLOW;
   25145             :     }
   25146          31 :     if ( bLocalUseExceptions ) {
   25147          30 :       popErrorHandler();
   25148             :     }
   25149             : #ifndef SED_HACKS
   25150             :     if ( bLocalUseExceptions ) {
   25151             :       CPLErr eclass = CPLGetLastErrorType();
   25152             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   25153             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   25154             :       }
   25155             :     }
   25156             : #endif
   25157             :   }
   25158          31 :   resultobj = SWIG_From_int(static_cast< int >(result));
   25159          31 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   25160             :   return resultobj;
   25161             : fail:
   25162             :   return NULL;
   25163             : }
   25164             : 
   25165             : 
   25166          37 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetNameOfCol(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   25167          37 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   25168          37 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   25169          37 :   int arg2 ;
   25170          37 :   void *argp1 = 0 ;
   25171          37 :   int res1 = 0 ;
   25172          37 :   int val2 ;
   25173          37 :   int ecode2 = 0 ;
   25174          37 :   PyObject *swig_obj[2] ;
   25175          37 :   char *result = 0 ;
   25176             :   
   25177          37 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_GetNameOfCol", 2, 2, swig_obj)) SWIG_fail;
   25178          37 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   25179          37 :   if (!SWIG_IsOK(res1)) {
   25180           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetNameOfCol" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   25181             :   }
   25182          37 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   25183          37 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   25184          37 :   if (!SWIG_IsOK(ecode2)) {
   25185           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetNameOfCol" "', argument " "2"" of type '" "int""'");
   25186             :   } 
   25187          37 :   arg2 = static_cast< int >(val2);
   25188          37 :   {
   25189          37 :     const int bLocalUseExceptions = GetUseExceptions();
   25190          37 :     if ( bLocalUseExceptions ) {
   25191          34 :       pushErrorHandler();
   25192             :     }
   25193          37 :     {
   25194          37 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   25195          37 :       result = (char *)GDALRasterAttributeTableShadow_GetNameOfCol(arg1,arg2);
   25196          37 :       SWIG_PYTHON_THREAD_END_ALLOW;
   25197             :     }
   25198          37 :     if ( bLocalUseExceptions ) {
   25199          34 :       popErrorHandler();
   25200             :     }
   25201             : #ifndef SED_HACKS
   25202             :     if ( bLocalUseExceptions ) {
   25203             :       CPLErr eclass = CPLGetLastErrorType();
   25204             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   25205             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   25206             :       }
   25207             :     }
   25208             : #endif
   25209             :   }
   25210          37 :   resultobj = SWIG_FromCharPtr((const char *)result);
   25211          37 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   25212             :   return resultobj;
   25213             : fail:
   25214             :   return NULL;
   25215             : }
   25216             : 
   25217             : 
   25218          40 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetUsageOfCol(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   25219          40 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   25220          40 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   25221          40 :   int arg2 ;
   25222          40 :   void *argp1 = 0 ;
   25223          40 :   int res1 = 0 ;
   25224          40 :   int val2 ;
   25225          40 :   int ecode2 = 0 ;
   25226          40 :   PyObject *swig_obj[2] ;
   25227          40 :   GDALRATFieldUsage result;
   25228             :   
   25229          40 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_GetUsageOfCol", 2, 2, swig_obj)) SWIG_fail;
   25230          40 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   25231          40 :   if (!SWIG_IsOK(res1)) {
   25232           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetUsageOfCol" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   25233             :   }
   25234          40 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   25235          40 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   25236          40 :   if (!SWIG_IsOK(ecode2)) {
   25237           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetUsageOfCol" "', argument " "2"" of type '" "int""'");
   25238             :   } 
   25239          40 :   arg2 = static_cast< int >(val2);
   25240          40 :   {
   25241          40 :     const int bLocalUseExceptions = GetUseExceptions();
   25242          40 :     if ( bLocalUseExceptions ) {
   25243          40 :       pushErrorHandler();
   25244             :     }
   25245          40 :     {
   25246          40 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   25247          40 :       result = (GDALRATFieldUsage)GDALRasterAttributeTableShadow_GetUsageOfCol(arg1,arg2);
   25248          40 :       SWIG_PYTHON_THREAD_END_ALLOW;
   25249             :     }
   25250          40 :     if ( bLocalUseExceptions ) {
   25251          40 :       popErrorHandler();
   25252             :     }
   25253             : #ifndef SED_HACKS
   25254             :     if ( bLocalUseExceptions ) {
   25255             :       CPLErr eclass = CPLGetLastErrorType();
   25256             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   25257             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   25258             :       }
   25259             :     }
   25260             : #endif
   25261             :   }
   25262          40 :   resultobj = SWIG_From_int(static_cast< int >(result));
   25263          40 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   25264             :   return resultobj;
   25265             : fail:
   25266             :   return NULL;
   25267             : }
   25268             : 
   25269             : 
   25270          43 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetTypeOfCol(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   25271          43 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   25272          43 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   25273          43 :   int arg2 ;
   25274          43 :   void *argp1 = 0 ;
   25275          43 :   int res1 = 0 ;
   25276          43 :   int val2 ;
   25277          43 :   int ecode2 = 0 ;
   25278          43 :   PyObject *swig_obj[2] ;
   25279          43 :   GDALRATFieldType result;
   25280             :   
   25281          43 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_GetTypeOfCol", 2, 2, swig_obj)) SWIG_fail;
   25282          43 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   25283          43 :   if (!SWIG_IsOK(res1)) {
   25284           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetTypeOfCol" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   25285             :   }
   25286          43 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   25287          43 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   25288          43 :   if (!SWIG_IsOK(ecode2)) {
   25289           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetTypeOfCol" "', argument " "2"" of type '" "int""'");
   25290             :   } 
   25291          43 :   arg2 = static_cast< int >(val2);
   25292          43 :   {
   25293          43 :     const int bLocalUseExceptions = GetUseExceptions();
   25294          43 :     if ( bLocalUseExceptions ) {
   25295          40 :       pushErrorHandler();
   25296             :     }
   25297          43 :     {
   25298          43 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   25299          43 :       result = (GDALRATFieldType)GDALRasterAttributeTableShadow_GetTypeOfCol(arg1,arg2);
   25300          43 :       SWIG_PYTHON_THREAD_END_ALLOW;
   25301             :     }
   25302          43 :     if ( bLocalUseExceptions ) {
   25303          40 :       popErrorHandler();
   25304             :     }
   25305             : #ifndef SED_HACKS
   25306             :     if ( bLocalUseExceptions ) {
   25307             :       CPLErr eclass = CPLGetLastErrorType();
   25308             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   25309             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   25310             :       }
   25311             :     }
   25312             : #endif
   25313             :   }
   25314          43 :   resultobj = SWIG_From_int(static_cast< int >(result));
   25315          43 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   25316             :   return resultobj;
   25317             : fail:
   25318             :   return NULL;
   25319             : }
   25320             : 
   25321             : 
   25322          13 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetColOfUsage(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   25323          13 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   25324          13 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   25325          13 :   GDALRATFieldUsage arg2 ;
   25326          13 :   void *argp1 = 0 ;
   25327          13 :   int res1 = 0 ;
   25328          13 :   int val2 ;
   25329          13 :   int ecode2 = 0 ;
   25330          13 :   PyObject *swig_obj[2] ;
   25331          13 :   int result;
   25332             :   
   25333          13 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_GetColOfUsage", 2, 2, swig_obj)) SWIG_fail;
   25334          13 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   25335          13 :   if (!SWIG_IsOK(res1)) {
   25336           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetColOfUsage" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   25337             :   }
   25338          13 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   25339          13 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   25340          13 :   if (!SWIG_IsOK(ecode2)) {
   25341           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetColOfUsage" "', argument " "2"" of type '" "GDALRATFieldUsage""'");
   25342             :   } 
   25343          13 :   arg2 = static_cast< GDALRATFieldUsage >(val2);
   25344          13 :   {
   25345          13 :     const int bLocalUseExceptions = GetUseExceptions();
   25346          13 :     if ( bLocalUseExceptions ) {
   25347          13 :       pushErrorHandler();
   25348             :     }
   25349          13 :     {
   25350          13 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   25351          13 :       result = (int)GDALRasterAttributeTableShadow_GetColOfUsage(arg1,arg2);
   25352          13 :       SWIG_PYTHON_THREAD_END_ALLOW;
   25353             :     }
   25354          13 :     if ( bLocalUseExceptions ) {
   25355          13 :       popErrorHandler();
   25356             :     }
   25357             : #ifndef SED_HACKS
   25358             :     if ( bLocalUseExceptions ) {
   25359             :       CPLErr eclass = CPLGetLastErrorType();
   25360             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   25361             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   25362             :       }
   25363             :     }
   25364             : #endif
   25365             :   }
   25366          13 :   resultobj = SWIG_From_int(static_cast< int >(result));
   25367          13 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   25368             :   return resultobj;
   25369             : fail:
   25370             :   return NULL;
   25371             : }
   25372             : 
   25373             : 
   25374          41 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetRowCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   25375          41 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   25376          41 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   25377          41 :   void *argp1 = 0 ;
   25378          41 :   int res1 = 0 ;
   25379          41 :   PyObject *swig_obj[1] ;
   25380          41 :   int result;
   25381             :   
   25382          41 :   if (!args) SWIG_fail;
   25383          41 :   swig_obj[0] = args;
   25384          41 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   25385          41 :   if (!SWIG_IsOK(res1)) {
   25386           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetRowCount" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   25387             :   }
   25388          41 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   25389          41 :   {
   25390          41 :     const int bLocalUseExceptions = GetUseExceptions();
   25391          41 :     if ( bLocalUseExceptions ) {
   25392          40 :       pushErrorHandler();
   25393             :     }
   25394          41 :     {
   25395          41 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   25396          41 :       result = (int)GDALRasterAttributeTableShadow_GetRowCount(arg1);
   25397          41 :       SWIG_PYTHON_THREAD_END_ALLOW;
   25398             :     }
   25399          41 :     if ( bLocalUseExceptions ) {
   25400          40 :       popErrorHandler();
   25401             :     }
   25402             : #ifndef SED_HACKS
   25403             :     if ( bLocalUseExceptions ) {
   25404             :       CPLErr eclass = CPLGetLastErrorType();
   25405             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   25406             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   25407             :       }
   25408             :     }
   25409             : #endif
   25410             :   }
   25411          41 :   resultobj = SWIG_From_int(static_cast< int >(result));
   25412          41 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   25413             :   return resultobj;
   25414             : fail:
   25415             :   return NULL;
   25416             : }
   25417             : 
   25418             : 
   25419          36 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetValueAsString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   25420          36 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   25421          36 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   25422          36 :   int arg2 ;
   25423          36 :   int arg3 ;
   25424          36 :   void *argp1 = 0 ;
   25425          36 :   int res1 = 0 ;
   25426          36 :   int val2 ;
   25427          36 :   int ecode2 = 0 ;
   25428          36 :   int val3 ;
   25429          36 :   int ecode3 = 0 ;
   25430          36 :   PyObject *swig_obj[3] ;
   25431          36 :   char *result = 0 ;
   25432             :   
   25433          36 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_GetValueAsString", 3, 3, swig_obj)) SWIG_fail;
   25434          36 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   25435          36 :   if (!SWIG_IsOK(res1)) {
   25436           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetValueAsString" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   25437             :   }
   25438          36 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   25439          36 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   25440          36 :   if (!SWIG_IsOK(ecode2)) {
   25441           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetValueAsString" "', argument " "2"" of type '" "int""'");
   25442             :   } 
   25443          36 :   arg2 = static_cast< int >(val2);
   25444          36 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   25445          36 :   if (!SWIG_IsOK(ecode3)) {
   25446           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_GetValueAsString" "', argument " "3"" of type '" "int""'");
   25447             :   } 
   25448          36 :   arg3 = static_cast< int >(val3);
   25449          36 :   {
   25450          36 :     const int bLocalUseExceptions = GetUseExceptions();
   25451          36 :     if ( bLocalUseExceptions ) {
   25452          35 :       pushErrorHandler();
   25453             :     }
   25454          36 :     {
   25455          36 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   25456          36 :       result = (char *)GDALRasterAttributeTableShadow_GetValueAsString(arg1,arg2,arg3);
   25457          36 :       SWIG_PYTHON_THREAD_END_ALLOW;
   25458             :     }
   25459          36 :     if ( bLocalUseExceptions ) {
   25460          35 :       popErrorHandler();
   25461             :     }
   25462             : #ifndef SED_HACKS
   25463             :     if ( bLocalUseExceptions ) {
   25464             :       CPLErr eclass = CPLGetLastErrorType();
   25465             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   25466             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   25467             :       }
   25468             :     }
   25469             : #endif
   25470             :   }
   25471          36 :   resultobj = SWIG_FromCharPtr((const char *)result);
   25472          40 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   25473             :   return resultobj;
   25474             : fail:
   25475             :   return NULL;
   25476             : }
   25477             : 
   25478             : 
   25479          52 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetValueAsInt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   25480          52 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   25481          52 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   25482          52 :   int arg2 ;
   25483          52 :   int arg3 ;
   25484          52 :   void *argp1 = 0 ;
   25485          52 :   int res1 = 0 ;
   25486          52 :   int val2 ;
   25487          52 :   int ecode2 = 0 ;
   25488          52 :   int val3 ;
   25489          52 :   int ecode3 = 0 ;
   25490          52 :   PyObject *swig_obj[3] ;
   25491          52 :   int result;
   25492             :   
   25493          52 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_GetValueAsInt", 3, 3, swig_obj)) SWIG_fail;
   25494          52 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   25495          52 :   if (!SWIG_IsOK(res1)) {
   25496           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetValueAsInt" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   25497             :   }
   25498          52 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   25499          52 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   25500          52 :   if (!SWIG_IsOK(ecode2)) {
   25501           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetValueAsInt" "', argument " "2"" of type '" "int""'");
   25502             :   } 
   25503          52 :   arg2 = static_cast< int >(val2);
   25504          52 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   25505          52 :   if (!SWIG_IsOK(ecode3)) {
   25506           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_GetValueAsInt" "', argument " "3"" of type '" "int""'");
   25507             :   } 
   25508          52 :   arg3 = static_cast< int >(val3);
   25509          52 :   {
   25510          52 :     const int bLocalUseExceptions = GetUseExceptions();
   25511          52 :     if ( bLocalUseExceptions ) {
   25512          50 :       pushErrorHandler();
   25513             :     }
   25514          52 :     {
   25515          52 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   25516          52 :       result = (int)GDALRasterAttributeTableShadow_GetValueAsInt(arg1,arg2,arg3);
   25517          52 :       SWIG_PYTHON_THREAD_END_ALLOW;
   25518             :     }
   25519          52 :     if ( bLocalUseExceptions ) {
   25520          50 :       popErrorHandler();
   25521             :     }
   25522             : #ifndef SED_HACKS
   25523             :     if ( bLocalUseExceptions ) {
   25524             :       CPLErr eclass = CPLGetLastErrorType();
   25525             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   25526             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   25527             :       }
   25528             :     }
   25529             : #endif
   25530             :   }
   25531          52 :   resultobj = SWIG_From_int(static_cast< int >(result));
   25532          56 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   25533             :   return resultobj;
   25534             : fail:
   25535             :   return NULL;
   25536             : }
   25537             : 
   25538             : 
   25539          33 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetValueAsDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   25540          33 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   25541          33 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   25542          33 :   int arg2 ;
   25543          33 :   int arg3 ;
   25544          33 :   void *argp1 = 0 ;
   25545          33 :   int res1 = 0 ;
   25546          33 :   int val2 ;
   25547          33 :   int ecode2 = 0 ;
   25548          33 :   int val3 ;
   25549          33 :   int ecode3 = 0 ;
   25550          33 :   PyObject *swig_obj[3] ;
   25551          33 :   double result;
   25552             :   
   25553          33 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_GetValueAsDouble", 3, 3, swig_obj)) SWIG_fail;
   25554          33 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   25555          33 :   if (!SWIG_IsOK(res1)) {
   25556           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetValueAsDouble" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   25557             :   }
   25558          33 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   25559          33 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   25560          33 :   if (!SWIG_IsOK(ecode2)) {
   25561           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetValueAsDouble" "', argument " "2"" of type '" "int""'");
   25562             :   } 
   25563          33 :   arg2 = static_cast< int >(val2);
   25564          33 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   25565          33 :   if (!SWIG_IsOK(ecode3)) {
   25566           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_GetValueAsDouble" "', argument " "3"" of type '" "int""'");
   25567             :   } 
   25568          33 :   arg3 = static_cast< int >(val3);
   25569          33 :   {
   25570          33 :     const int bLocalUseExceptions = GetUseExceptions();
   25571          33 :     if ( bLocalUseExceptions ) {
   25572          32 :       pushErrorHandler();
   25573             :     }
   25574          33 :     {
   25575          33 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   25576          33 :       result = (double)GDALRasterAttributeTableShadow_GetValueAsDouble(arg1,arg2,arg3);
   25577          33 :       SWIG_PYTHON_THREAD_END_ALLOW;
   25578             :     }
   25579          33 :     if ( bLocalUseExceptions ) {
   25580          32 :       popErrorHandler();
   25581             :     }
   25582             : #ifndef SED_HACKS
   25583             :     if ( bLocalUseExceptions ) {
   25584             :       CPLErr eclass = CPLGetLastErrorType();
   25585             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   25586             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   25587             :       }
   25588             :     }
   25589             : #endif
   25590             :   }
   25591          33 :   resultobj = SWIG_From_double(static_cast< double >(result));
   25592          37 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   25593             :   return resultobj;
   25594             : fail:
   25595             :   return NULL;
   25596             : }
   25597             : 
   25598             : 
   25599           6 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_ReadValuesIOAsString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   25600           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   25601           6 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   25602           6 :   int arg2 ;
   25603           6 :   int arg3 ;
   25604           6 :   int arg4 ;
   25605           6 :   char **arg5 = (char **) 0 ;
   25606           6 :   void *argp1 = 0 ;
   25607           6 :   int res1 = 0 ;
   25608           6 :   int val2 ;
   25609           6 :   int ecode2 = 0 ;
   25610           6 :   int val3 ;
   25611           6 :   int ecode3 = 0 ;
   25612           6 :   int iLength4 ;
   25613           6 :   PyObject *swig_obj[4] ;
   25614           6 :   CPLErr result;
   25615             :   
   25616           6 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_ReadValuesIOAsString", 4, 4, swig_obj)) SWIG_fail;
   25617           6 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   25618           6 :   if (!SWIG_IsOK(res1)) {
   25619           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_ReadValuesIOAsString" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   25620             :   }
   25621           6 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   25622           6 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   25623           6 :   if (!SWIG_IsOK(ecode2)) {
   25624           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_ReadValuesIOAsString" "', argument " "2"" of type '" "int""'");
   25625             :   } 
   25626           6 :   arg2 = static_cast< int >(val2);
   25627           6 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   25628           6 :   if (!SWIG_IsOK(ecode3)) {
   25629           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_ReadValuesIOAsString" "', argument " "3"" of type '" "int""'");
   25630             :   } 
   25631           6 :   arg3 = static_cast< int >(val3);
   25632           6 :   {
   25633             :     /* %typemap(in,numinputs=1) (int iLength4, char **ppszData) (int iLength4) */
   25634           6 :     if ( !PyArg_Parse(swig_obj[3],"i",&iLength4) )
   25635             :     {
   25636           0 :       PyErr_SetString(PyExc_TypeError, "not a integer");
   25637           0 :       SWIG_fail;
   25638             :     }
   25639           6 :     if( iLength4 <= 0 || iLength4 > INT_MAX - 1 )
   25640             :     {
   25641           1 :       PyErr_SetString(PyExc_TypeError, "invalid length");
   25642           1 :       SWIG_fail;
   25643             :     }
   25644           5 :     arg4 = iLength4;
   25645           5 :     arg5 = (char**)VSICalloc(iLength4 + 1, sizeof(char*));
   25646           5 :     if( !arg5 )
   25647             :     {
   25648           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   25649           0 :       SWIG_fail;
   25650             :     }
   25651             :   }
   25652           5 :   {
   25653           5 :     const int bLocalUseExceptions = GetUseExceptions();
   25654           5 :     if ( bLocalUseExceptions ) {
   25655           5 :       pushErrorHandler();
   25656             :     }
   25657           5 :     {
   25658           5 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   25659           5 :       CPL_IGNORE_RET_VAL(result = (CPLErr)GDALRasterAttributeTableShadow_ReadValuesIOAsString(arg1,arg2,arg3,arg4,arg5));
   25660           5 :       SWIG_PYTHON_THREAD_END_ALLOW;
   25661             :     }
   25662           5 :     if ( bLocalUseExceptions ) {
   25663           5 :       popErrorHandler();
   25664             :     }
   25665             : #ifndef SED_HACKS
   25666             :     if ( bLocalUseExceptions ) {
   25667             :       CPLErr eclass = CPLGetLastErrorType();
   25668             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   25669             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   25670             :       }
   25671             :     }
   25672             : #endif
   25673             :   }
   25674           5 :   resultobj = SWIG_From_int(static_cast< int >(result));
   25675           5 :   {
   25676             :     /* %typemap(argout) (int iLength, char **ppszData) */
   25677           5 :     Py_DECREF(resultobj);
   25678           5 :     PyObject *out = PyList_New( arg4 );
   25679           5 :     if( !out ) {
   25680           0 :       SWIG_fail;
   25681             :     }
   25682          13 :     for( int i=0; i<arg4; i++ ) {
   25683           8 :       if( arg5[i] )
   25684             :       {
   25685           2 :         PyObject *val = GDALPythonObjectFromCStr( arg5[i] );
   25686           2 :         PyList_SetItem( out, i, val );
   25687             :       }
   25688             :       else
   25689             :       {
   25690           6 :         Py_INCREF(Py_None);
   25691           6 :         PyList_SetItem( out, i, Py_None );
   25692             :       }
   25693             :     }
   25694           5 :     resultobj = out;
   25695             :   }
   25696           5 :   {
   25697             :     /* %typemap(freearg) (int iLength, char **ppszData) */
   25698           5 :     CSLDestroy(arg5);
   25699             :   }
   25700          10 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   25701             :   return resultobj;
   25702           1 : fail:
   25703           1 :   {
   25704             :     /* %typemap(freearg) (int iLength, char **ppszData) */
   25705           1 :     CSLDestroy(arg5);
   25706             :   }
   25707             :   return NULL;
   25708             : }
   25709             : 
   25710             : 
   25711           6 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_ReadValuesIOAsInteger(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   25712           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   25713           6 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   25714           6 :   int arg2 ;
   25715           6 :   int arg3 ;
   25716           6 :   int arg4 ;
   25717           6 :   int *arg5 = (int *) 0 ;
   25718           6 :   void *argp1 = 0 ;
   25719           6 :   int res1 = 0 ;
   25720           6 :   int val2 ;
   25721           6 :   int ecode2 = 0 ;
   25722           6 :   int val3 ;
   25723           6 :   int ecode3 = 0 ;
   25724           6 :   int iLength4 ;
   25725           6 :   PyObject *swig_obj[4] ;
   25726           6 :   CPLErr result;
   25727             :   
   25728           6 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_ReadValuesIOAsInteger", 4, 4, swig_obj)) SWIG_fail;
   25729           6 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   25730           6 :   if (!SWIG_IsOK(res1)) {
   25731           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_ReadValuesIOAsInteger" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   25732             :   }
   25733           6 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   25734           6 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   25735           6 :   if (!SWIG_IsOK(ecode2)) {
   25736           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_ReadValuesIOAsInteger" "', argument " "2"" of type '" "int""'");
   25737             :   } 
   25738           6 :   arg2 = static_cast< int >(val2);
   25739           6 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   25740           6 :   if (!SWIG_IsOK(ecode3)) {
   25741           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_ReadValuesIOAsInteger" "', argument " "3"" of type '" "int""'");
   25742             :   } 
   25743           6 :   arg3 = static_cast< int >(val3);
   25744           6 :   {
   25745             :     /* %typemap(in,numinputs=1) (int iLength4, int *pnData) (int iLength4) */
   25746           6 :     if ( !PyArg_Parse(swig_obj[3],"i",&iLength4) ) {
   25747           0 :       PyErr_SetString(PyExc_TypeError, "not a integer");
   25748           0 :       SWIG_fail;
   25749             :     }
   25750           6 :     if( iLength4 <= 0 )
   25751             :     {
   25752           1 :       PyErr_SetString(PyExc_TypeError, "invalid length");
   25753           1 :       SWIG_fail;
   25754             :     }
   25755           5 :     arg4 = iLength4;
   25756           5 :     arg5 = (int*)VSICalloc(iLength4, sizeof(int));
   25757           5 :     if( !arg5 )
   25758             :     {
   25759           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   25760           0 :       SWIG_fail;
   25761             :     }
   25762             :   }
   25763           5 :   {
   25764           5 :     const int bLocalUseExceptions = GetUseExceptions();
   25765           5 :     if ( bLocalUseExceptions ) {
   25766           5 :       pushErrorHandler();
   25767             :     }
   25768           5 :     {
   25769           5 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   25770           5 :       CPL_IGNORE_RET_VAL(result = (CPLErr)GDALRasterAttributeTableShadow_ReadValuesIOAsInteger(arg1,arg2,arg3,arg4,arg5));
   25771           5 :       SWIG_PYTHON_THREAD_END_ALLOW;
   25772             :     }
   25773           5 :     if ( bLocalUseExceptions ) {
   25774           5 :       popErrorHandler();
   25775             :     }
   25776             : #ifndef SED_HACKS
   25777             :     if ( bLocalUseExceptions ) {
   25778             :       CPLErr eclass = CPLGetLastErrorType();
   25779             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   25780             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   25781             :       }
   25782             :     }
   25783             : #endif
   25784             :   }
   25785           5 :   resultobj = SWIG_From_int(static_cast< int >(result));
   25786           5 :   {
   25787             :     /* %typemap(argout) (int iLength, int *pnData) */
   25788           5 :     Py_DECREF(resultobj);
   25789           5 :     PyObject *out = PyList_New( arg4 );
   25790           5 :     if( !out ) {
   25791           0 :       SWIG_fail;
   25792             :     }
   25793          13 :     for( int i=0; i<arg4; i++ ) {
   25794           8 :       PyObject *val = PyLong_FromLong( (arg5)[i] );
   25795           8 :       PyList_SetItem( out, i, val );
   25796             :     }
   25797           5 :     resultobj = out;
   25798             :   }
   25799           5 :   {
   25800             :     /* %typemap(freearg) (int iLength, int *pnData) */
   25801           5 :     CPLFree(arg5);
   25802             :   }
   25803          10 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   25804             :   return resultobj;
   25805           1 : fail:
   25806           1 :   {
   25807             :     /* %typemap(freearg) (int iLength, int *pnData) */
   25808           1 :     CPLFree(arg5);
   25809             :   }
   25810             :   return NULL;
   25811             : }
   25812             : 
   25813             : 
   25814           6 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_ReadValuesIOAsDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   25815           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   25816           6 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   25817           6 :   int arg2 ;
   25818           6 :   int arg3 ;
   25819           6 :   int arg4 ;
   25820           6 :   double *arg5 = (double *) 0 ;
   25821           6 :   void *argp1 = 0 ;
   25822           6 :   int res1 = 0 ;
   25823           6 :   int val2 ;
   25824           6 :   int ecode2 = 0 ;
   25825           6 :   int val3 ;
   25826           6 :   int ecode3 = 0 ;
   25827           6 :   int iLength4 ;
   25828           6 :   PyObject *swig_obj[4] ;
   25829           6 :   CPLErr result;
   25830             :   
   25831           6 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_ReadValuesIOAsDouble", 4, 4, swig_obj)) SWIG_fail;
   25832           6 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   25833           6 :   if (!SWIG_IsOK(res1)) {
   25834           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_ReadValuesIOAsDouble" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   25835             :   }
   25836           6 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   25837           6 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   25838           6 :   if (!SWIG_IsOK(ecode2)) {
   25839           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_ReadValuesIOAsDouble" "', argument " "2"" of type '" "int""'");
   25840             :   } 
   25841           6 :   arg2 = static_cast< int >(val2);
   25842           6 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   25843           6 :   if (!SWIG_IsOK(ecode3)) {
   25844           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_ReadValuesIOAsDouble" "', argument " "3"" of type '" "int""'");
   25845             :   } 
   25846           6 :   arg3 = static_cast< int >(val3);
   25847           6 :   {
   25848             :     /* %typemap(in,numinputs=1) (int iLength4, double *pdfData) (int iLength4) */
   25849           6 :     if ( !PyArg_Parse(swig_obj[3],"i",&iLength4) ) {
   25850           0 :       PyErr_SetString(PyExc_TypeError, "not a integer");
   25851           0 :       SWIG_fail;
   25852             :     }
   25853           6 :     if( iLength4 <= 0 )
   25854             :     {
   25855           1 :       PyErr_SetString(PyExc_TypeError, "invalid length");
   25856           1 :       SWIG_fail;
   25857             :     }
   25858           5 :     arg4 = iLength4;
   25859           5 :     arg5 = (double*)CPLCalloc(iLength4, sizeof(double));
   25860           5 :     if( !arg5 )
   25861             :     {
   25862           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   25863           0 :       SWIG_fail;
   25864             :     }
   25865             :   }
   25866           5 :   {
   25867           5 :     const int bLocalUseExceptions = GetUseExceptions();
   25868           5 :     if ( bLocalUseExceptions ) {
   25869           5 :       pushErrorHandler();
   25870             :     }
   25871           5 :     {
   25872           5 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   25873           5 :       CPL_IGNORE_RET_VAL(result = (CPLErr)GDALRasterAttributeTableShadow_ReadValuesIOAsDouble(arg1,arg2,arg3,arg4,arg5));
   25874           5 :       SWIG_PYTHON_THREAD_END_ALLOW;
   25875             :     }
   25876           5 :     if ( bLocalUseExceptions ) {
   25877           5 :       popErrorHandler();
   25878             :     }
   25879             : #ifndef SED_HACKS
   25880             :     if ( bLocalUseExceptions ) {
   25881             :       CPLErr eclass = CPLGetLastErrorType();
   25882             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   25883             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   25884             :       }
   25885             :     }
   25886             : #endif
   25887             :   }
   25888           5 :   resultobj = SWIG_From_int(static_cast< int >(result));
   25889           5 :   {
   25890             :     /* %typemap(argout) (int iLength, double *pdfData)  */
   25891           5 :     Py_DECREF(resultobj);
   25892           5 :     PyObject *out = PyList_New( arg4 );
   25893           5 :     if( !out ) {
   25894           0 :       SWIG_fail;
   25895             :     }
   25896          13 :     for( int i=0; i<arg4; i++ ) {
   25897           8 :       PyObject *val = PyFloat_FromDouble( (arg5)[i] );
   25898           8 :       PyList_SetItem( out, i, val );
   25899             :     }
   25900           5 :     resultobj = out;
   25901             :   }
   25902           5 :   {
   25903             :     /* %typemap(freearg) (int iLength, double *pdfData) */
   25904           5 :     CPLFree(arg5);
   25905             :   }
   25906          10 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   25907             :   return resultobj;
   25908           1 : fail:
   25909           1 :   {
   25910             :     /* %typemap(freearg) (int iLength, double *pdfData) */
   25911           1 :     CPLFree(arg5);
   25912             :   }
   25913             :   return NULL;
   25914             : }
   25915             : 
   25916             : 
   25917          27 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_SetValueAsString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   25918          27 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   25919          27 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   25920          27 :   int arg2 ;
   25921          27 :   int arg3 ;
   25922          27 :   char *arg4 = (char *) 0 ;
   25923          27 :   void *argp1 = 0 ;
   25924          27 :   int res1 = 0 ;
   25925          27 :   int val2 ;
   25926          27 :   int ecode2 = 0 ;
   25927          27 :   int val3 ;
   25928          27 :   int ecode3 = 0 ;
   25929          27 :   PyObject *str4 = 0 ;
   25930          27 :   int bToFree4 = 0 ;
   25931          27 :   PyObject *swig_obj[4] ;
   25932             :   
   25933          27 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_SetValueAsString", 4, 4, swig_obj)) SWIG_fail;
   25934          27 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   25935          27 :   if (!SWIG_IsOK(res1)) {
   25936           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_SetValueAsString" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   25937             :   }
   25938          27 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   25939          27 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   25940          27 :   if (!SWIG_IsOK(ecode2)) {
   25941           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_SetValueAsString" "', argument " "2"" of type '" "int""'");
   25942             :   } 
   25943          27 :   arg2 = static_cast< int >(val2);
   25944          27 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   25945          27 :   if (!SWIG_IsOK(ecode3)) {
   25946           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_SetValueAsString" "', argument " "3"" of type '" "int""'");
   25947             :   } 
   25948          27 :   arg3 = static_cast< int >(val3);
   25949          27 :   {
   25950             :     /* %typemap(in) (tostring argin) */
   25951          27 :     str4 = PyObject_Str( swig_obj[3] );
   25952          27 :     if ( str4 == 0 ) {
   25953           0 :       PyErr_SetString( PyExc_RuntimeError, "Unable to format argument as string");
   25954           0 :       SWIG_fail;
   25955             :     }
   25956             :     
   25957          27 :     arg4 = GDALPythonObjectToCStr(str4, &bToFree4);
   25958             :   }
   25959          27 :   {
   25960          27 :     const int bLocalUseExceptions = GetUseExceptions();
   25961          27 :     if ( bLocalUseExceptions ) {
   25962          27 :       pushErrorHandler();
   25963             :     }
   25964          27 :     {
   25965          27 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   25966          27 :       GDALRasterAttributeTableShadow_SetValueAsString(arg1,arg2,arg3,(char const *)arg4);
   25967          27 :       SWIG_PYTHON_THREAD_END_ALLOW;
   25968             :     }
   25969          27 :     if ( bLocalUseExceptions ) {
   25970          27 :       popErrorHandler();
   25971             :     }
   25972             : #ifndef SED_HACKS
   25973             :     if ( bLocalUseExceptions ) {
   25974             :       CPLErr eclass = CPLGetLastErrorType();
   25975             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   25976             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   25977             :       }
   25978             :     }
   25979             : #endif
   25980             :   }
   25981          27 :   resultobj = SWIG_Py_Void();
   25982          27 :   {
   25983             :     /* %typemap(freearg) (tostring argin) */
   25984          27 :     if ( str4 != NULL)
   25985             :     {
   25986          27 :       Py_DECREF(str4);
   25987             :     }
   25988          27 :     GDALPythonFreeCStr(arg4, bToFree4);
   25989             :   }
   25990          27 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   25991             :   return resultobj;
   25992           0 : fail:
   25993           0 :   {
   25994             :     /* %typemap(freearg) (tostring argin) */
   25995           0 :     if ( str4 != NULL)
   25996             :     {
   25997           0 :       Py_DECREF(str4);
   25998             :     }
   25999          27 :     GDALPythonFreeCStr(arg4, bToFree4);
   26000             :   }
   26001             :   return NULL;
   26002             : }
   26003             : 
   26004             : 
   26005          39 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_SetValueAsInt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26006          39 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26007          39 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   26008          39 :   int arg2 ;
   26009          39 :   int arg3 ;
   26010          39 :   int arg4 ;
   26011          39 :   void *argp1 = 0 ;
   26012          39 :   int res1 = 0 ;
   26013          39 :   int val2 ;
   26014          39 :   int ecode2 = 0 ;
   26015          39 :   int val3 ;
   26016          39 :   int ecode3 = 0 ;
   26017          39 :   int val4 ;
   26018          39 :   int ecode4 = 0 ;
   26019          39 :   PyObject *swig_obj[4] ;
   26020             :   
   26021          39 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_SetValueAsInt", 4, 4, swig_obj)) SWIG_fail;
   26022          39 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   26023          39 :   if (!SWIG_IsOK(res1)) {
   26024           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_SetValueAsInt" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   26025             :   }
   26026          39 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   26027          39 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   26028          39 :   if (!SWIG_IsOK(ecode2)) {
   26029           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_SetValueAsInt" "', argument " "2"" of type '" "int""'");
   26030             :   } 
   26031          39 :   arg2 = static_cast< int >(val2);
   26032          39 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   26033          39 :   if (!SWIG_IsOK(ecode3)) {
   26034           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_SetValueAsInt" "', argument " "3"" of type '" "int""'");
   26035             :   } 
   26036          39 :   arg3 = static_cast< int >(val3);
   26037          39 :   ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
   26038          39 :   if (!SWIG_IsOK(ecode4)) {
   26039           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "RasterAttributeTable_SetValueAsInt" "', argument " "4"" of type '" "int""'");
   26040             :   } 
   26041          39 :   arg4 = static_cast< int >(val4);
   26042          39 :   {
   26043          39 :     const int bLocalUseExceptions = GetUseExceptions();
   26044          39 :     if ( bLocalUseExceptions ) {
   26045          39 :       pushErrorHandler();
   26046             :     }
   26047          39 :     {
   26048          39 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26049          39 :       GDALRasterAttributeTableShadow_SetValueAsInt(arg1,arg2,arg3,arg4);
   26050          39 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26051             :     }
   26052          39 :     if ( bLocalUseExceptions ) {
   26053          39 :       popErrorHandler();
   26054             :     }
   26055             : #ifndef SED_HACKS
   26056             :     if ( bLocalUseExceptions ) {
   26057             :       CPLErr eclass = CPLGetLastErrorType();
   26058             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26059             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26060             :       }
   26061             :     }
   26062             : #endif
   26063             :   }
   26064          39 :   resultobj = SWIG_Py_Void();
   26065          39 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   26066             :   return resultobj;
   26067             : fail:
   26068             :   return NULL;
   26069             : }
   26070             : 
   26071             : 
   26072          25 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_SetValueAsDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26073          25 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26074          25 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   26075          25 :   int arg2 ;
   26076          25 :   int arg3 ;
   26077          25 :   double arg4 ;
   26078          25 :   void *argp1 = 0 ;
   26079          25 :   int res1 = 0 ;
   26080          25 :   int val2 ;
   26081          25 :   int ecode2 = 0 ;
   26082          25 :   int val3 ;
   26083          25 :   int ecode3 = 0 ;
   26084          25 :   double val4 ;
   26085          25 :   int ecode4 = 0 ;
   26086          25 :   PyObject *swig_obj[4] ;
   26087             :   
   26088          25 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_SetValueAsDouble", 4, 4, swig_obj)) SWIG_fail;
   26089          25 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   26090          25 :   if (!SWIG_IsOK(res1)) {
   26091           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_SetValueAsDouble" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   26092             :   }
   26093          25 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   26094          25 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   26095          25 :   if (!SWIG_IsOK(ecode2)) {
   26096           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_SetValueAsDouble" "', argument " "2"" of type '" "int""'");
   26097             :   } 
   26098          25 :   arg2 = static_cast< int >(val2);
   26099          25 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   26100          25 :   if (!SWIG_IsOK(ecode3)) {
   26101           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_SetValueAsDouble" "', argument " "3"" of type '" "int""'");
   26102             :   } 
   26103          25 :   arg3 = static_cast< int >(val3);
   26104          25 :   ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
   26105          25 :   if (!SWIG_IsOK(ecode4)) {
   26106           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "RasterAttributeTable_SetValueAsDouble" "', argument " "4"" of type '" "double""'");
   26107             :   } 
   26108          25 :   arg4 = static_cast< double >(val4);
   26109          25 :   {
   26110          25 :     const int bLocalUseExceptions = GetUseExceptions();
   26111          25 :     if ( bLocalUseExceptions ) {
   26112          25 :       pushErrorHandler();
   26113             :     }
   26114          25 :     {
   26115          25 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26116          25 :       GDALRasterAttributeTableShadow_SetValueAsDouble(arg1,arg2,arg3,arg4);
   26117          25 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26118             :     }
   26119          25 :     if ( bLocalUseExceptions ) {
   26120          25 :       popErrorHandler();
   26121             :     }
   26122             : #ifndef SED_HACKS
   26123             :     if ( bLocalUseExceptions ) {
   26124             :       CPLErr eclass = CPLGetLastErrorType();
   26125             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26126             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26127             :       }
   26128             :     }
   26129             : #endif
   26130             :   }
   26131          25 :   resultobj = SWIG_Py_Void();
   26132          25 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   26133             :   return resultobj;
   26134             : fail:
   26135             :   return NULL;
   26136             : }
   26137             : 
   26138             : 
   26139           5 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_SetRowCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26140           5 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26141           5 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   26142           5 :   int arg2 ;
   26143           5 :   void *argp1 = 0 ;
   26144           5 :   int res1 = 0 ;
   26145           5 :   int val2 ;
   26146           5 :   int ecode2 = 0 ;
   26147           5 :   PyObject *swig_obj[2] ;
   26148             :   
   26149           5 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_SetRowCount", 2, 2, swig_obj)) SWIG_fail;
   26150           5 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   26151           5 :   if (!SWIG_IsOK(res1)) {
   26152           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_SetRowCount" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   26153             :   }
   26154           5 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   26155           5 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   26156           5 :   if (!SWIG_IsOK(ecode2)) {
   26157           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_SetRowCount" "', argument " "2"" of type '" "int""'");
   26158             :   } 
   26159           5 :   arg2 = static_cast< int >(val2);
   26160           5 :   {
   26161           5 :     const int bLocalUseExceptions = GetUseExceptions();
   26162           5 :     if ( bLocalUseExceptions ) {
   26163           5 :       pushErrorHandler();
   26164             :     }
   26165           5 :     {
   26166           5 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26167           5 :       GDALRasterAttributeTableShadow_SetRowCount(arg1,arg2);
   26168           5 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26169             :     }
   26170           5 :     if ( bLocalUseExceptions ) {
   26171           5 :       popErrorHandler();
   26172             :     }
   26173             : #ifndef SED_HACKS
   26174             :     if ( bLocalUseExceptions ) {
   26175             :       CPLErr eclass = CPLGetLastErrorType();
   26176             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26177             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26178             :       }
   26179             :     }
   26180             : #endif
   26181             :   }
   26182           5 :   resultobj = SWIG_Py_Void();
   26183           5 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   26184             :   return resultobj;
   26185             : fail:
   26186             :   return NULL;
   26187             : }
   26188             : 
   26189             : 
   26190          25 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_CreateColumn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26191          25 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26192          25 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   26193          25 :   char *arg2 = (char *) 0 ;
   26194          25 :   GDALRATFieldType arg3 ;
   26195          25 :   GDALRATFieldUsage arg4 ;
   26196          25 :   void *argp1 = 0 ;
   26197          25 :   int res1 = 0 ;
   26198          25 :   int res2 ;
   26199          25 :   char *buf2 = 0 ;
   26200          25 :   int alloc2 = 0 ;
   26201          25 :   int val3 ;
   26202          25 :   int ecode3 = 0 ;
   26203          25 :   int val4 ;
   26204          25 :   int ecode4 = 0 ;
   26205          25 :   PyObject *swig_obj[4] ;
   26206          25 :   int result;
   26207             :   
   26208          25 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_CreateColumn", 4, 4, swig_obj)) SWIG_fail;
   26209          25 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   26210          25 :   if (!SWIG_IsOK(res1)) {
   26211           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_CreateColumn" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   26212             :   }
   26213          25 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   26214          25 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   26215          25 :   if (!SWIG_IsOK(res2)) {
   26216           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RasterAttributeTable_CreateColumn" "', argument " "2"" of type '" "char const *""'");
   26217             :   }
   26218          25 :   arg2 = reinterpret_cast< char * >(buf2);
   26219          25 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   26220          25 :   if (!SWIG_IsOK(ecode3)) {
   26221           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_CreateColumn" "', argument " "3"" of type '" "GDALRATFieldType""'");
   26222             :   } 
   26223          25 :   arg3 = static_cast< GDALRATFieldType >(val3);
   26224          25 :   ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
   26225          25 :   if (!SWIG_IsOK(ecode4)) {
   26226           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "RasterAttributeTable_CreateColumn" "', argument " "4"" of type '" "GDALRATFieldUsage""'");
   26227             :   } 
   26228          25 :   arg4 = static_cast< GDALRATFieldUsage >(val4);
   26229          25 :   {
   26230          25 :     const int bLocalUseExceptions = GetUseExceptions();
   26231          25 :     if ( bLocalUseExceptions ) {
   26232          25 :       pushErrorHandler();
   26233             :     }
   26234          25 :     {
   26235          25 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26236          25 :       result = (int)GDALRasterAttributeTableShadow_CreateColumn(arg1,(char const *)arg2,arg3,arg4);
   26237          25 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26238             :     }
   26239          25 :     if ( bLocalUseExceptions ) {
   26240          25 :       popErrorHandler();
   26241             :     }
   26242             : #ifndef SED_HACKS
   26243             :     if ( bLocalUseExceptions ) {
   26244             :       CPLErr eclass = CPLGetLastErrorType();
   26245             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26246             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26247             :       }
   26248             :     }
   26249             : #endif
   26250             :   }
   26251          25 :   resultobj = SWIG_From_int(static_cast< int >(result));
   26252          25 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   26253          25 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   26254             :   return resultobj;
   26255           0 : fail:
   26256           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   26257             :   return NULL;
   26258             : }
   26259             : 
   26260             : 
   26261           1 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetLinearBinning(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26262           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26263           1 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   26264           1 :   double *arg2 = (double *) 0 ;
   26265           1 :   double *arg3 = (double *) 0 ;
   26266           1 :   void *argp1 = 0 ;
   26267           1 :   int res1 = 0 ;
   26268           1 :   double temp2 ;
   26269           1 :   int res2 = SWIG_TMPOBJ ;
   26270           1 :   double temp3 ;
   26271           1 :   int res3 = SWIG_TMPOBJ ;
   26272           1 :   PyObject *swig_obj[1] ;
   26273           1 :   bool result;
   26274             :   
   26275           1 :   arg2 = &temp2;
   26276           1 :   arg3 = &temp3;
   26277           1 :   if (!args) SWIG_fail;
   26278           1 :   swig_obj[0] = args;
   26279           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   26280           1 :   if (!SWIG_IsOK(res1)) {
   26281           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetLinearBinning" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   26282             :   }
   26283           1 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   26284           1 :   {
   26285           1 :     const int bLocalUseExceptions = GetUseExceptions();
   26286           1 :     if ( bLocalUseExceptions ) {
   26287           1 :       pushErrorHandler();
   26288             :     }
   26289           1 :     {
   26290           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26291           1 :       result = (bool)GDALRasterAttributeTableShadow_GetLinearBinning(arg1,arg2,arg3);
   26292           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26293             :     }
   26294           1 :     if ( bLocalUseExceptions ) {
   26295           1 :       popErrorHandler();
   26296             :     }
   26297             : #ifndef SED_HACKS
   26298             :     if ( bLocalUseExceptions ) {
   26299             :       CPLErr eclass = CPLGetLastErrorType();
   26300             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26301             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26302             :       }
   26303             :     }
   26304             : #endif
   26305             :   }
   26306           1 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   26307           1 :   if (ReturnSame(SWIG_IsTmpObj(res2))) {
   26308           1 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2)));
   26309             :   } else {
   26310           0 :     int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   26311           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags));
   26312             :   }
   26313           1 :   if (ReturnSame(SWIG_IsTmpObj(res3))) {
   26314           1 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3)));
   26315             :   } else {
   26316           0 :     int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   26317           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags));
   26318             :   }
   26319           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   26320             :   return resultobj;
   26321             : fail:
   26322             :   return NULL;
   26323             : }
   26324             : 
   26325             : 
   26326           1 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_SetLinearBinning(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26327           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26328           1 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   26329           1 :   double arg2 ;
   26330           1 :   double arg3 ;
   26331           1 :   void *argp1 = 0 ;
   26332           1 :   int res1 = 0 ;
   26333           1 :   double val2 ;
   26334           1 :   int ecode2 = 0 ;
   26335           1 :   double val3 ;
   26336           1 :   int ecode3 = 0 ;
   26337           1 :   PyObject *swig_obj[3] ;
   26338           1 :   int result;
   26339             :   
   26340           1 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_SetLinearBinning", 3, 3, swig_obj)) SWIG_fail;
   26341           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   26342           1 :   if (!SWIG_IsOK(res1)) {
   26343           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_SetLinearBinning" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   26344             :   }
   26345           1 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   26346           1 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   26347           1 :   if (!SWIG_IsOK(ecode2)) {
   26348           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_SetLinearBinning" "', argument " "2"" of type '" "double""'");
   26349             :   } 
   26350           1 :   arg2 = static_cast< double >(val2);
   26351           1 :   ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
   26352           1 :   if (!SWIG_IsOK(ecode3)) {
   26353           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_SetLinearBinning" "', argument " "3"" of type '" "double""'");
   26354             :   } 
   26355           1 :   arg3 = static_cast< double >(val3);
   26356           1 :   {
   26357           1 :     const int bLocalUseExceptions = GetUseExceptions();
   26358           1 :     if ( bLocalUseExceptions ) {
   26359           1 :       pushErrorHandler();
   26360             :     }
   26361           1 :     {
   26362           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26363           1 :       result = (int)GDALRasterAttributeTableShadow_SetLinearBinning(arg1,arg2,arg3);
   26364           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26365             :     }
   26366           1 :     if ( bLocalUseExceptions ) {
   26367           1 :       popErrorHandler();
   26368             :     }
   26369             : #ifndef SED_HACKS
   26370             :     if ( bLocalUseExceptions ) {
   26371             :       CPLErr eclass = CPLGetLastErrorType();
   26372             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26373             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26374             :       }
   26375             :     }
   26376             : #endif
   26377             :   }
   26378           1 :   resultobj = SWIG_From_int(static_cast< int >(result));
   26379           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   26380             :   return resultobj;
   26381             : fail:
   26382             :   return NULL;
   26383             : }
   26384             : 
   26385             : 
   26386           3 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetRowOfValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26387           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26388           3 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   26389           3 :   double arg2 ;
   26390           3 :   void *argp1 = 0 ;
   26391           3 :   int res1 = 0 ;
   26392           3 :   double val2 ;
   26393           3 :   int ecode2 = 0 ;
   26394           3 :   PyObject *swig_obj[2] ;
   26395           3 :   int result;
   26396             :   
   26397           3 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_GetRowOfValue", 2, 2, swig_obj)) SWIG_fail;
   26398           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   26399           3 :   if (!SWIG_IsOK(res1)) {
   26400           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetRowOfValue" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   26401             :   }
   26402           3 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   26403           3 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   26404           3 :   if (!SWIG_IsOK(ecode2)) {
   26405           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetRowOfValue" "', argument " "2"" of type '" "double""'");
   26406             :   } 
   26407           3 :   arg2 = static_cast< double >(val2);
   26408           3 :   {
   26409           3 :     const int bLocalUseExceptions = GetUseExceptions();
   26410           3 :     if ( bLocalUseExceptions ) {
   26411           3 :       pushErrorHandler();
   26412             :     }
   26413           3 :     {
   26414           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26415           3 :       result = (int)GDALRasterAttributeTableShadow_GetRowOfValue(arg1,arg2);
   26416           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26417             :     }
   26418           3 :     if ( bLocalUseExceptions ) {
   26419           3 :       popErrorHandler();
   26420             :     }
   26421             : #ifndef SED_HACKS
   26422             :     if ( bLocalUseExceptions ) {
   26423             :       CPLErr eclass = CPLGetLastErrorType();
   26424             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26425             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26426             :       }
   26427             :     }
   26428             : #endif
   26429             :   }
   26430           3 :   resultobj = SWIG_From_int(static_cast< int >(result));
   26431           3 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   26432             :   return resultobj;
   26433             : fail:
   26434             :   return NULL;
   26435             : }
   26436             : 
   26437             : 
   26438           2 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_ChangesAreWrittenToFile(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26439           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26440           2 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   26441           2 :   void *argp1 = 0 ;
   26442           2 :   int res1 = 0 ;
   26443           2 :   PyObject *swig_obj[1] ;
   26444           2 :   int result;
   26445             :   
   26446           2 :   if (!args) SWIG_fail;
   26447           2 :   swig_obj[0] = args;
   26448           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   26449           2 :   if (!SWIG_IsOK(res1)) {
   26450           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_ChangesAreWrittenToFile" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   26451             :   }
   26452           2 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   26453           2 :   {
   26454           2 :     const int bLocalUseExceptions = GetUseExceptions();
   26455           2 :     if ( bLocalUseExceptions ) {
   26456           2 :       pushErrorHandler();
   26457             :     }
   26458           2 :     {
   26459           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26460           2 :       result = (int)GDALRasterAttributeTableShadow_ChangesAreWrittenToFile(arg1);
   26461           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26462             :     }
   26463           2 :     if ( bLocalUseExceptions ) {
   26464           2 :       popErrorHandler();
   26465             :     }
   26466             : #ifndef SED_HACKS
   26467             :     if ( bLocalUseExceptions ) {
   26468             :       CPLErr eclass = CPLGetLastErrorType();
   26469             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26470             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26471             :       }
   26472             :     }
   26473             : #endif
   26474             :   }
   26475           2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   26476           2 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   26477             :   return resultobj;
   26478             : fail:
   26479             :   return NULL;
   26480             : }
   26481             : 
   26482             : 
   26483           0 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_DumpReadable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26484           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26485           0 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   26486           0 :   void *argp1 = 0 ;
   26487           0 :   int res1 = 0 ;
   26488           0 :   PyObject *swig_obj[1] ;
   26489             :   
   26490           0 :   if (!args) SWIG_fail;
   26491           0 :   swig_obj[0] = args;
   26492           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   26493           0 :   if (!SWIG_IsOK(res1)) {
   26494           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_DumpReadable" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   26495             :   }
   26496           0 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   26497           0 :   {
   26498           0 :     const int bLocalUseExceptions = GetUseExceptions();
   26499           0 :     if ( bLocalUseExceptions ) {
   26500           0 :       pushErrorHandler();
   26501             :     }
   26502           0 :     {
   26503           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26504           0 :       GDALRasterAttributeTableShadow_DumpReadable(arg1);
   26505           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26506             :     }
   26507           0 :     if ( bLocalUseExceptions ) {
   26508           0 :       popErrorHandler();
   26509             :     }
   26510             : #ifndef SED_HACKS
   26511             :     if ( bLocalUseExceptions ) {
   26512             :       CPLErr eclass = CPLGetLastErrorType();
   26513             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26514             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26515             :       }
   26516             :     }
   26517             : #endif
   26518             :   }
   26519           0 :   resultobj = SWIG_Py_Void();
   26520           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   26521             :   return resultobj;
   26522             : fail:
   26523             :   return NULL;
   26524             : }
   26525             : 
   26526             : 
   26527           3 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_SetTableType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26528           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26529           3 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   26530           3 :   GDALRATTableType arg2 ;
   26531           3 :   void *argp1 = 0 ;
   26532           3 :   int res1 = 0 ;
   26533           3 :   int val2 ;
   26534           3 :   int ecode2 = 0 ;
   26535           3 :   PyObject *swig_obj[2] ;
   26536             :   
   26537           3 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_SetTableType", 2, 2, swig_obj)) SWIG_fail;
   26538           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   26539           3 :   if (!SWIG_IsOK(res1)) {
   26540           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_SetTableType" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   26541             :   }
   26542           3 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   26543           3 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   26544           3 :   if (!SWIG_IsOK(ecode2)) {
   26545           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_SetTableType" "', argument " "2"" of type '" "GDALRATTableType""'");
   26546             :   } 
   26547           3 :   arg2 = static_cast< GDALRATTableType >(val2);
   26548           3 :   {
   26549           3 :     const int bLocalUseExceptions = GetUseExceptions();
   26550           3 :     if ( bLocalUseExceptions ) {
   26551           3 :       pushErrorHandler();
   26552             :     }
   26553           3 :     {
   26554           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26555           3 :       GDALRasterAttributeTableShadow_SetTableType(arg1,arg2);
   26556           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26557             :     }
   26558           3 :     if ( bLocalUseExceptions ) {
   26559           3 :       popErrorHandler();
   26560             :     }
   26561             : #ifndef SED_HACKS
   26562             :     if ( bLocalUseExceptions ) {
   26563             :       CPLErr eclass = CPLGetLastErrorType();
   26564             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26565             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26566             :       }
   26567             :     }
   26568             : #endif
   26569             :   }
   26570           3 :   resultobj = SWIG_Py_Void();
   26571           3 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   26572             :   return resultobj;
   26573             : fail:
   26574             :   return NULL;
   26575             : }
   26576             : 
   26577             : 
   26578          10 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetTableType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26579          10 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26580          10 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   26581          10 :   void *argp1 = 0 ;
   26582          10 :   int res1 = 0 ;
   26583          10 :   PyObject *swig_obj[1] ;
   26584          10 :   GDALRATTableType result;
   26585             :   
   26586          10 :   if (!args) SWIG_fail;
   26587          10 :   swig_obj[0] = args;
   26588          10 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   26589          10 :   if (!SWIG_IsOK(res1)) {
   26590           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetTableType" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   26591             :   }
   26592          10 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   26593          10 :   {
   26594          10 :     const int bLocalUseExceptions = GetUseExceptions();
   26595          10 :     if ( bLocalUseExceptions ) {
   26596          10 :       pushErrorHandler();
   26597             :     }
   26598          10 :     {
   26599          10 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26600          10 :       result = (GDALRATTableType)GDALRasterAttributeTableShadow_GetTableType(arg1);
   26601          10 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26602             :     }
   26603          10 :     if ( bLocalUseExceptions ) {
   26604          10 :       popErrorHandler();
   26605             :     }
   26606             : #ifndef SED_HACKS
   26607             :     if ( bLocalUseExceptions ) {
   26608             :       CPLErr eclass = CPLGetLastErrorType();
   26609             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26610             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26611             :       }
   26612             :     }
   26613             : #endif
   26614             :   }
   26615          10 :   resultobj = SWIG_From_int(static_cast< int >(result));
   26616          10 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   26617             :   return resultobj;
   26618             : fail:
   26619             :   return NULL;
   26620             : }
   26621             : 
   26622             : 
   26623           1 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_RemoveStatistics(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26624           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26625           1 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   26626           1 :   void *argp1 = 0 ;
   26627           1 :   int res1 = 0 ;
   26628           1 :   PyObject *swig_obj[1] ;
   26629             :   
   26630           1 :   if (!args) SWIG_fail;
   26631           1 :   swig_obj[0] = args;
   26632           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   26633           1 :   if (!SWIG_IsOK(res1)) {
   26634           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_RemoveStatistics" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   26635             :   }
   26636           1 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   26637           1 :   {
   26638           1 :     const int bLocalUseExceptions = GetUseExceptions();
   26639           1 :     if ( bLocalUseExceptions ) {
   26640           1 :       pushErrorHandler();
   26641             :     }
   26642           1 :     {
   26643           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26644           1 :       GDALRasterAttributeTableShadow_RemoveStatistics(arg1);
   26645           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26646             :     }
   26647           1 :     if ( bLocalUseExceptions ) {
   26648           1 :       popErrorHandler();
   26649             :     }
   26650             : #ifndef SED_HACKS
   26651             :     if ( bLocalUseExceptions ) {
   26652             :       CPLErr eclass = CPLGetLastErrorType();
   26653             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26654             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26655             :       }
   26656             :     }
   26657             : #endif
   26658             :   }
   26659           1 :   resultobj = SWIG_Py_Void();
   26660           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   26661             :   return resultobj;
   26662             : fail:
   26663             :   return NULL;
   26664             : }
   26665             : 
   26666             : 
   26667         271 : SWIGINTERN PyObject *RasterAttributeTable_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26668         271 :   PyObject *obj;
   26669         271 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   26670         271 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALRasterAttributeTableShadow, SWIG_NewClientData(obj));
   26671         271 :   return SWIG_Py_Void();
   26672             : }
   26673             : 
   26674           9 : SWIGINTERN PyObject *RasterAttributeTable_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26675           9 :   return SWIG_Python_InitShadowInstance(args);
   26676             : }
   26677             : 
   26678        1375 : SWIGINTERN PyObject *_wrap_delete_Group(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26679        1375 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26680        1375 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   26681        1375 :   void *argp1 = 0 ;
   26682        1375 :   int res1 = 0 ;
   26683        1375 :   PyObject *swig_obj[1] ;
   26684             :   
   26685        1375 :   if (!args) SWIG_fail;
   26686        1375 :   swig_obj[0] = args;
   26687        1375 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, SWIG_POINTER_DISOWN |  0 );
   26688        1375 :   if (!SWIG_IsOK(res1)) {
   26689           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Group" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   26690             :   }
   26691        1375 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   26692        1375 :   {
   26693        1375 :     const int bLocalUseExceptions = GetUseExceptions();
   26694        1375 :     if ( bLocalUseExceptions ) {
   26695         471 :       pushErrorHandler();
   26696             :     }
   26697        1375 :     {
   26698        1375 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26699        1375 :       delete_GDALGroupHS(arg1);
   26700        1375 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26701             :     }
   26702        1375 :     if ( bLocalUseExceptions ) {
   26703         471 :       popErrorHandler();
   26704             :     }
   26705             : #ifndef SED_HACKS
   26706             :     if ( bLocalUseExceptions ) {
   26707             :       CPLErr eclass = CPLGetLastErrorType();
   26708             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26709             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26710             :       }
   26711             :     }
   26712             : #endif
   26713             :   }
   26714        1375 :   resultobj = SWIG_Py_Void();
   26715        1375 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   26716             :   return resultobj;
   26717             : fail:
   26718             :   return NULL;
   26719             : }
   26720             : 
   26721             : 
   26722          87 : SWIGINTERN PyObject *_wrap_Group_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26723          87 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26724          87 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   26725          87 :   void *argp1 = 0 ;
   26726          87 :   int res1 = 0 ;
   26727          87 :   PyObject *swig_obj[1] ;
   26728          87 :   char *result = 0 ;
   26729             :   
   26730          87 :   if (!args) SWIG_fail;
   26731          87 :   swig_obj[0] = args;
   26732          87 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   26733          87 :   if (!SWIG_IsOK(res1)) {
   26734           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_GetName" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   26735             :   }
   26736          87 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   26737          87 :   {
   26738          87 :     const int bLocalUseExceptions = GetUseExceptions();
   26739          87 :     if ( bLocalUseExceptions ) {
   26740          17 :       pushErrorHandler();
   26741             :     }
   26742          87 :     {
   26743          87 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26744          87 :       result = (char *)GDALGroupHS_GetName(arg1);
   26745          87 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26746             :     }
   26747          87 :     if ( bLocalUseExceptions ) {
   26748          17 :       popErrorHandler();
   26749             :     }
   26750             : #ifndef SED_HACKS
   26751             :     if ( bLocalUseExceptions ) {
   26752             :       CPLErr eclass = CPLGetLastErrorType();
   26753             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26754             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26755             :       }
   26756             :     }
   26757             : #endif
   26758             :   }
   26759          87 :   resultobj = SWIG_FromCharPtr((const char *)result);
   26760          87 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   26761             :   return resultobj;
   26762             : fail:
   26763             :   return NULL;
   26764             : }
   26765             : 
   26766             : 
   26767          41 : SWIGINTERN PyObject *_wrap_Group_GetFullName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26768          41 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26769          41 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   26770          41 :   void *argp1 = 0 ;
   26771          41 :   int res1 = 0 ;
   26772          41 :   PyObject *swig_obj[1] ;
   26773          41 :   char *result = 0 ;
   26774             :   
   26775          41 :   if (!args) SWIG_fail;
   26776          41 :   swig_obj[0] = args;
   26777          41 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   26778          41 :   if (!SWIG_IsOK(res1)) {
   26779           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_GetFullName" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   26780             :   }
   26781          41 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   26782          41 :   {
   26783          41 :     const int bLocalUseExceptions = GetUseExceptions();
   26784          41 :     if ( bLocalUseExceptions ) {
   26785          17 :       pushErrorHandler();
   26786             :     }
   26787          41 :     {
   26788          41 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26789          41 :       result = (char *)GDALGroupHS_GetFullName(arg1);
   26790          41 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26791             :     }
   26792          41 :     if ( bLocalUseExceptions ) {
   26793          17 :       popErrorHandler();
   26794             :     }
   26795             : #ifndef SED_HACKS
   26796             :     if ( bLocalUseExceptions ) {
   26797             :       CPLErr eclass = CPLGetLastErrorType();
   26798             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26799             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26800             :       }
   26801             :     }
   26802             : #endif
   26803             :   }
   26804          41 :   resultobj = SWIG_FromCharPtr((const char *)result);
   26805          41 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   26806             :   return resultobj;
   26807             : fail:
   26808             :   return NULL;
   26809             : }
   26810             : 
   26811             : 
   26812         314 : SWIGINTERN PyObject *_wrap_Group_GetMDArrayNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26813         314 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26814         314 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   26815         314 :   char **arg2 = (char **) 0 ;
   26816         314 :   void *argp1 = 0 ;
   26817         314 :   int res1 = 0 ;
   26818         314 :   PyObject *swig_obj[2] ;
   26819         314 :   char **result = 0 ;
   26820             :   
   26821         314 :   if (!SWIG_Python_UnpackTuple(args, "Group_GetMDArrayNames", 1, 2, swig_obj)) SWIG_fail;
   26822         314 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   26823         314 :   if (!SWIG_IsOK(res1)) {
   26824           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_GetMDArrayNames" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   26825             :   }
   26826         314 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   26827         314 :   if (swig_obj[1]) {
   26828         314 :     {
   26829             :       /* %typemap(in) char **dict */
   26830         314 :       arg2 = NULL;
   26831         314 :       if ( PySequence_Check( swig_obj[1] ) ) {
   26832         314 :         int bErr = FALSE;
   26833         314 :         arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   26834         314 :         if ( bErr )
   26835             :         {
   26836           0 :           SWIG_fail;
   26837             :         }
   26838             :       }
   26839           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   26840           0 :         int bErr = FALSE;
   26841           0 :         arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   26842           0 :         if ( bErr )
   26843             :         {
   26844           0 :           SWIG_fail;
   26845             :         }
   26846             :       }
   26847             :       else {
   26848           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   26849           0 :         SWIG_fail;
   26850             :       }
   26851             :     }
   26852             :   }
   26853         314 :   {
   26854         314 :     const int bLocalUseExceptions = GetUseExceptions();
   26855         314 :     if ( bLocalUseExceptions ) {
   26856          71 :       pushErrorHandler();
   26857             :     }
   26858         314 :     {
   26859         314 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26860         314 :       result = (char **)GDALGroupHS_GetMDArrayNames(arg1,arg2);
   26861         314 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26862             :     }
   26863         314 :     if ( bLocalUseExceptions ) {
   26864          71 :       popErrorHandler();
   26865             :     }
   26866             : #ifndef SED_HACKS
   26867             :     if ( bLocalUseExceptions ) {
   26868             :       CPLErr eclass = CPLGetLastErrorType();
   26869             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26870             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26871             :       }
   26872             :     }
   26873             : #endif
   26874             :   }
   26875         314 :   {
   26876             :     /* %typemap(out) char **CSL -> ( string ) */
   26877         314 :     bool bErr = false;
   26878         314 :     resultobj = CSLToList(result, &bErr);
   26879         314 :     CSLDestroy(result);
   26880         314 :     if( bErr ) {
   26881           0 :       SWIG_fail;
   26882             :     }
   26883             :   }
   26884         314 :   {
   26885             :     /* %typemap(freearg) char **dict */
   26886         314 :     CSLDestroy( arg2 );
   26887             :   }
   26888         316 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   26889             :   return resultobj;
   26890           0 : fail:
   26891           0 :   {
   26892             :     /* %typemap(freearg) char **dict */
   26893           0 :     CSLDestroy( arg2 );
   26894             :   }
   26895             :   return NULL;
   26896             : }
   26897             : 
   26898             : 
   26899         755 : SWIGINTERN PyObject *_wrap_Group_OpenMDArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26900         755 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26901         755 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   26902         755 :   char *arg2 = (char *) 0 ;
   26903         755 :   char **arg3 = (char **) 0 ;
   26904         755 :   void *argp1 = 0 ;
   26905         755 :   int res1 = 0 ;
   26906         755 :   int res2 ;
   26907         755 :   char *buf2 = 0 ;
   26908         755 :   int alloc2 = 0 ;
   26909         755 :   PyObject *swig_obj[3] ;
   26910         755 :   GDALMDArrayHS *result = 0 ;
   26911             :   
   26912         755 :   if (!SWIG_Python_UnpackTuple(args, "Group_OpenMDArray", 2, 3, swig_obj)) SWIG_fail;
   26913         755 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   26914         755 :   if (!SWIG_IsOK(res1)) {
   26915           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_OpenMDArray" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   26916             :   }
   26917         755 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   26918         755 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   26919         755 :   if (!SWIG_IsOK(res2)) {
   26920           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_OpenMDArray" "', argument " "2"" of type '" "char const *""'");
   26921             :   }
   26922         755 :   arg2 = reinterpret_cast< char * >(buf2);
   26923         755 :   if (swig_obj[2]) {
   26924           9 :     {
   26925             :       /* %typemap(in) char **dict */
   26926           9 :       arg3 = NULL;
   26927           9 :       if ( PySequence_Check( swig_obj[2] ) ) {
   26928           9 :         int bErr = FALSE;
   26929           9 :         arg3 = CSLFromPySequence(swig_obj[2], &bErr);
   26930           9 :         if ( bErr )
   26931             :         {
   26932           0 :           SWIG_fail;
   26933             :         }
   26934             :       }
   26935           0 :       else if ( PyMapping_Check( swig_obj[2] ) ) {
   26936           0 :         int bErr = FALSE;
   26937           0 :         arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
   26938           0 :         if ( bErr )
   26939             :         {
   26940           0 :           SWIG_fail;
   26941             :         }
   26942             :       }
   26943             :       else {
   26944           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   26945           0 :         SWIG_fail;
   26946             :       }
   26947             :     }
   26948             :   }
   26949         755 :   {
   26950         755 :     if (!arg2) {
   26951           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   26952             :     }
   26953             :   }
   26954         755 :   {
   26955         755 :     const int bLocalUseExceptions = GetUseExceptions();
   26956         755 :     if ( bLocalUseExceptions ) {
   26957         201 :       pushErrorHandler();
   26958             :     }
   26959         755 :     {
   26960         755 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26961         755 :       result = (GDALMDArrayHS *)GDALGroupHS_OpenMDArray(arg1,(char const *)arg2,arg3);
   26962         755 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26963             :     }
   26964         755 :     if ( bLocalUseExceptions ) {
   26965         201 :       popErrorHandler();
   26966             :     }
   26967             : #ifndef SED_HACKS
   26968             :     if ( bLocalUseExceptions ) {
   26969             :       CPLErr eclass = CPLGetLastErrorType();
   26970             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26971             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26972             :       }
   26973             :     }
   26974             : #endif
   26975             :   }
   26976         755 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_OWN |  0 );
   26977         755 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   26978         755 :   {
   26979             :     /* %typemap(freearg) char **dict */
   26980         755 :     CSLDestroy( arg3 );
   26981             :   }
   26982         772 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   26983             :   return resultobj;
   26984           0 : fail:
   26985           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   26986           0 :   {
   26987             :     /* %typemap(freearg) char **dict */
   26988           0 :     CSLDestroy( arg3 );
   26989             :   }
   26990             :   return NULL;
   26991             : }
   26992             : 
   26993             : 
   26994          16 : SWIGINTERN PyObject *_wrap_Group_OpenMDArrayFromFullname(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26995          16 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26996          16 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   26997          16 :   char *arg2 = (char *) 0 ;
   26998          16 :   char **arg3 = (char **) 0 ;
   26999          16 :   void *argp1 = 0 ;
   27000          16 :   int res1 = 0 ;
   27001          16 :   int res2 ;
   27002          16 :   char *buf2 = 0 ;
   27003          16 :   int alloc2 = 0 ;
   27004          16 :   PyObject *swig_obj[3] ;
   27005          16 :   GDALMDArrayHS *result = 0 ;
   27006             :   
   27007          16 :   if (!SWIG_Python_UnpackTuple(args, "Group_OpenMDArrayFromFullname", 2, 3, swig_obj)) SWIG_fail;
   27008          16 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   27009          16 :   if (!SWIG_IsOK(res1)) {
   27010           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_OpenMDArrayFromFullname" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   27011             :   }
   27012          16 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   27013          16 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   27014          16 :   if (!SWIG_IsOK(res2)) {
   27015           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_OpenMDArrayFromFullname" "', argument " "2"" of type '" "char const *""'");
   27016             :   }
   27017          16 :   arg2 = reinterpret_cast< char * >(buf2);
   27018          16 :   if (swig_obj[2]) {
   27019           0 :     {
   27020             :       /* %typemap(in) char **dict */
   27021           0 :       arg3 = NULL;
   27022           0 :       if ( PySequence_Check( swig_obj[2] ) ) {
   27023           0 :         int bErr = FALSE;
   27024           0 :         arg3 = CSLFromPySequence(swig_obj[2], &bErr);
   27025           0 :         if ( bErr )
   27026             :         {
   27027           0 :           SWIG_fail;
   27028             :         }
   27029             :       }
   27030           0 :       else if ( PyMapping_Check( swig_obj[2] ) ) {
   27031           0 :         int bErr = FALSE;
   27032           0 :         arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
   27033           0 :         if ( bErr )
   27034             :         {
   27035           0 :           SWIG_fail;
   27036             :         }
   27037             :       }
   27038             :       else {
   27039           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   27040           0 :         SWIG_fail;
   27041             :       }
   27042             :     }
   27043             :   }
   27044          16 :   {
   27045          16 :     if (!arg2) {
   27046           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   27047             :     }
   27048             :   }
   27049          16 :   {
   27050          16 :     const int bLocalUseExceptions = GetUseExceptions();
   27051          16 :     if ( bLocalUseExceptions ) {
   27052           8 :       pushErrorHandler();
   27053             :     }
   27054          16 :     {
   27055          16 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   27056          16 :       result = (GDALMDArrayHS *)GDALGroupHS_OpenMDArrayFromFullname(arg1,(char const *)arg2,arg3);
   27057          16 :       SWIG_PYTHON_THREAD_END_ALLOW;
   27058             :     }
   27059          16 :     if ( bLocalUseExceptions ) {
   27060           8 :       popErrorHandler();
   27061             :     }
   27062             : #ifndef SED_HACKS
   27063             :     if ( bLocalUseExceptions ) {
   27064             :       CPLErr eclass = CPLGetLastErrorType();
   27065             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   27066             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   27067             :       }
   27068             :     }
   27069             : #endif
   27070             :   }
   27071          16 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_OWN |  0 );
   27072          16 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   27073          16 :   {
   27074             :     /* %typemap(freearg) char **dict */
   27075          16 :     CSLDestroy( arg3 );
   27076             :   }
   27077          17 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   27078             :   return resultobj;
   27079           0 : fail:
   27080           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   27081           0 :   {
   27082             :     /* %typemap(freearg) char **dict */
   27083           0 :     CSLDestroy( arg3 );
   27084             :   }
   27085             :   return NULL;
   27086             : }
   27087             : 
   27088             : 
   27089          19 : SWIGINTERN PyObject *_wrap_Group_ResolveMDArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   27090          19 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   27091          19 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   27092          19 :   char *arg2 = (char *) 0 ;
   27093          19 :   char *arg3 = (char *) 0 ;
   27094          19 :   char **arg4 = (char **) 0 ;
   27095          19 :   void *argp1 = 0 ;
   27096          19 :   int res1 = 0 ;
   27097          19 :   int res2 ;
   27098          19 :   char *buf2 = 0 ;
   27099          19 :   int alloc2 = 0 ;
   27100          19 :   int res3 ;
   27101          19 :   char *buf3 = 0 ;
   27102          19 :   int alloc3 = 0 ;
   27103          19 :   PyObject *swig_obj[4] ;
   27104          19 :   GDALMDArrayHS *result = 0 ;
   27105             :   
   27106          19 :   if (!SWIG_Python_UnpackTuple(args, "Group_ResolveMDArray", 3, 4, swig_obj)) SWIG_fail;
   27107          19 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   27108          19 :   if (!SWIG_IsOK(res1)) {
   27109           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_ResolveMDArray" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   27110             :   }
   27111          19 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   27112          19 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   27113          19 :   if (!SWIG_IsOK(res2)) {
   27114           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_ResolveMDArray" "', argument " "2"" of type '" "char const *""'");
   27115             :   }
   27116          19 :   arg2 = reinterpret_cast< char * >(buf2);
   27117          19 :   res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   27118          19 :   if (!SWIG_IsOK(res3)) {
   27119           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Group_ResolveMDArray" "', argument " "3"" of type '" "char const *""'");
   27120             :   }
   27121          19 :   arg3 = reinterpret_cast< char * >(buf3);
   27122          19 :   if (swig_obj[3]) {
   27123           0 :     {
   27124             :       /* %typemap(in) char **dict */
   27125           0 :       arg4 = NULL;
   27126           0 :       if ( PySequence_Check( swig_obj[3] ) ) {
   27127           0 :         int bErr = FALSE;
   27128           0 :         arg4 = CSLFromPySequence(swig_obj[3], &bErr);
   27129           0 :         if ( bErr )
   27130             :         {
   27131           0 :           SWIG_fail;
   27132             :         }
   27133             :       }
   27134           0 :       else if ( PyMapping_Check( swig_obj[3] ) ) {
   27135           0 :         int bErr = FALSE;
   27136           0 :         arg4 = CSLFromPyMapping(swig_obj[3], &bErr);
   27137           0 :         if ( bErr )
   27138             :         {
   27139           0 :           SWIG_fail;
   27140             :         }
   27141             :       }
   27142             :       else {
   27143           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   27144           0 :         SWIG_fail;
   27145             :       }
   27146             :     }
   27147             :   }
   27148          19 :   {
   27149          19 :     if (!arg2) {
   27150           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   27151             :     }
   27152             :   }
   27153          19 :   {
   27154          19 :     const int bLocalUseExceptions = GetUseExceptions();
   27155          19 :     if ( bLocalUseExceptions ) {
   27156           1 :       pushErrorHandler();
   27157             :     }
   27158          19 :     {
   27159          19 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   27160          19 :       result = (GDALMDArrayHS *)GDALGroupHS_ResolveMDArray(arg1,(char const *)arg2,(char const *)arg3,arg4);
   27161          19 :       SWIG_PYTHON_THREAD_END_ALLOW;
   27162             :     }
   27163          19 :     if ( bLocalUseExceptions ) {
   27164           1 :       popErrorHandler();
   27165             :     }
   27166             : #ifndef SED_HACKS
   27167             :     if ( bLocalUseExceptions ) {
   27168             :       CPLErr eclass = CPLGetLastErrorType();
   27169             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   27170             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   27171             :       }
   27172             :     }
   27173             : #endif
   27174             :   }
   27175          19 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_OWN |  0 );
   27176          19 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   27177          19 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   27178          19 :   {
   27179             :     /* %typemap(freearg) char **dict */
   27180          19 :     CSLDestroy( arg4 );
   27181             :   }
   27182          20 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   27183             :   return resultobj;
   27184           0 : fail:
   27185           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   27186           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   27187           0 :   {
   27188             :     /* %typemap(freearg) char **dict */
   27189           0 :     CSLDestroy( arg4 );
   27190             :   }
   27191             :   return NULL;
   27192             : }
   27193             : 
   27194             : 
   27195          95 : SWIGINTERN PyObject *_wrap_Group_GetGroupNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   27196          95 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   27197          95 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   27198          95 :   char **arg2 = (char **) 0 ;
   27199          95 :   void *argp1 = 0 ;
   27200          95 :   int res1 = 0 ;
   27201          95 :   PyObject *swig_obj[2] ;
   27202          95 :   char **result = 0 ;
   27203             :   
   27204          95 :   if (!SWIG_Python_UnpackTuple(args, "Group_GetGroupNames", 1, 2, swig_obj)) SWIG_fail;
   27205          95 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   27206          95 :   if (!SWIG_IsOK(res1)) {
   27207           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_GetGroupNames" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   27208             :   }
   27209          95 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   27210          95 :   if (swig_obj[1]) {
   27211          95 :     {
   27212             :       /* %typemap(in) char **dict */
   27213          95 :       arg2 = NULL;
   27214          95 :       if ( PySequence_Check( swig_obj[1] ) ) {
   27215          95 :         int bErr = FALSE;
   27216          95 :         arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   27217          95 :         if ( bErr )
   27218             :         {
   27219           0 :           SWIG_fail;
   27220             :         }
   27221             :       }
   27222           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   27223           0 :         int bErr = FALSE;
   27224           0 :         arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   27225           0 :         if ( bErr )
   27226             :         {
   27227           0 :           SWIG_fail;
   27228             :         }
   27229             :       }
   27230             :       else {
   27231           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   27232           0 :         SWIG_fail;
   27233             :       }
   27234             :     }
   27235             :   }
   27236          95 :   {
   27237          95 :     const int bLocalUseExceptions = GetUseExceptions();
   27238          95 :     if ( bLocalUseExceptions ) {
   27239          51 :       pushErrorHandler();
   27240             :     }
   27241          95 :     {
   27242          95 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   27243          95 :       result = (char **)GDALGroupHS_GetGroupNames(arg1,arg2);
   27244          95 :       SWIG_PYTHON_THREAD_END_ALLOW;
   27245             :     }
   27246          95 :     if ( bLocalUseExceptions ) {
   27247          51 :       popErrorHandler();
   27248             :     }
   27249             : #ifndef SED_HACKS
   27250             :     if ( bLocalUseExceptions ) {
   27251             :       CPLErr eclass = CPLGetLastErrorType();
   27252             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   27253             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   27254             :       }
   27255             :     }
   27256             : #endif
   27257             :   }
   27258          95 :   {
   27259             :     /* %typemap(out) char **CSL -> ( string ) */
   27260          95 :     bool bErr = false;
   27261          95 :     resultobj = CSLToList(result, &bErr);
   27262          95 :     CSLDestroy(result);
   27263          95 :     if( bErr ) {
   27264           0 :       SWIG_fail;
   27265             :     }
   27266             :   }
   27267          95 :   {
   27268             :     /* %typemap(freearg) char **dict */
   27269          95 :     CSLDestroy( arg2 );
   27270             :   }
   27271          95 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   27272             :   return resultobj;
   27273           0 : fail:
   27274           0 :   {
   27275             :     /* %typemap(freearg) char **dict */
   27276           0 :     CSLDestroy( arg2 );
   27277             :   }
   27278             :   return NULL;
   27279             : }
   27280             : 
   27281             : 
   27282         157 : SWIGINTERN PyObject *_wrap_Group_OpenGroup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   27283         157 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   27284         157 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   27285         157 :   char *arg2 = (char *) 0 ;
   27286         157 :   char **arg3 = (char **) 0 ;
   27287         157 :   void *argp1 = 0 ;
   27288         157 :   int res1 = 0 ;
   27289         157 :   int res2 ;
   27290         157 :   char *buf2 = 0 ;
   27291         157 :   int alloc2 = 0 ;
   27292         157 :   PyObject *swig_obj[3] ;
   27293         157 :   GDALGroupHS *result = 0 ;
   27294             :   
   27295         157 :   if (!SWIG_Python_UnpackTuple(args, "Group_OpenGroup", 2, 3, swig_obj)) SWIG_fail;
   27296         157 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   27297         157 :   if (!SWIG_IsOK(res1)) {
   27298           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_OpenGroup" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   27299             :   }
   27300         157 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   27301         157 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   27302         157 :   if (!SWIG_IsOK(res2)) {
   27303           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_OpenGroup" "', argument " "2"" of type '" "char const *""'");
   27304             :   }
   27305         157 :   arg2 = reinterpret_cast< char * >(buf2);
   27306         157 :   if (swig_obj[2]) {
   27307           1 :     {
   27308             :       /* %typemap(in) char **dict */
   27309           1 :       arg3 = NULL;
   27310           1 :       if ( PySequence_Check( swig_obj[2] ) ) {
   27311           1 :         int bErr = FALSE;
   27312           1 :         arg3 = CSLFromPySequence(swig_obj[2], &bErr);
   27313           1 :         if ( bErr )
   27314             :         {
   27315           0 :           SWIG_fail;
   27316             :         }
   27317             :       }
   27318           0 :       else if ( PyMapping_Check( swig_obj[2] ) ) {
   27319           0 :         int bErr = FALSE;
   27320           0 :         arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
   27321           0 :         if ( bErr )
   27322             :         {
   27323           0 :           SWIG_fail;
   27324             :         }
   27325             :       }
   27326             :       else {
   27327           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   27328           0 :         SWIG_fail;
   27329             :       }
   27330             :     }
   27331             :   }
   27332         157 :   {
   27333         157 :     if (!arg2) {
   27334           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   27335             :     }
   27336             :   }
   27337         157 :   {
   27338         157 :     const int bLocalUseExceptions = GetUseExceptions();
   27339         157 :     if ( bLocalUseExceptions ) {
   27340          97 :       pushErrorHandler();
   27341             :     }
   27342         157 :     {
   27343         157 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   27344         157 :       result = (GDALGroupHS *)GDALGroupHS_OpenGroup(arg1,(char const *)arg2,arg3);
   27345         157 :       SWIG_PYTHON_THREAD_END_ALLOW;
   27346             :     }
   27347         157 :     if ( bLocalUseExceptions ) {
   27348          97 :       popErrorHandler();
   27349             :     }
   27350             : #ifndef SED_HACKS
   27351             :     if ( bLocalUseExceptions ) {
   27352             :       CPLErr eclass = CPLGetLastErrorType();
   27353             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   27354             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   27355             :       }
   27356             :     }
   27357             : #endif
   27358             :   }
   27359         157 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALGroupHS, SWIG_POINTER_OWN |  0 );
   27360         157 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   27361         157 :   {
   27362             :     /* %typemap(freearg) char **dict */
   27363         157 :     CSLDestroy( arg3 );
   27364             :   }
   27365         169 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   27366             :   return resultobj;
   27367           0 : fail:
   27368           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   27369           0 :   {
   27370             :     /* %typemap(freearg) char **dict */
   27371           0 :     CSLDestroy( arg3 );
   27372             :   }
   27373             :   return NULL;
   27374             : }
   27375             : 
   27376             : 
   27377           3 : SWIGINTERN PyObject *_wrap_Group_OpenGroupFromFullname(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   27378           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   27379           3 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   27380           3 :   char *arg2 = (char *) 0 ;
   27381           3 :   char **arg3 = (char **) 0 ;
   27382           3 :   void *argp1 = 0 ;
   27383           3 :   int res1 = 0 ;
   27384           3 :   int res2 ;
   27385           3 :   char *buf2 = 0 ;
   27386           3 :   int alloc2 = 0 ;
   27387           3 :   PyObject *swig_obj[3] ;
   27388           3 :   GDALGroupHS *result = 0 ;
   27389             :   
   27390           3 :   if (!SWIG_Python_UnpackTuple(args, "Group_OpenGroupFromFullname", 2, 3, swig_obj)) SWIG_fail;
   27391           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   27392           3 :   if (!SWIG_IsOK(res1)) {
   27393           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_OpenGroupFromFullname" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   27394             :   }
   27395           3 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   27396           3 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   27397           3 :   if (!SWIG_IsOK(res2)) {
   27398           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_OpenGroupFromFullname" "', argument " "2"" of type '" "char const *""'");
   27399             :   }
   27400           3 :   arg2 = reinterpret_cast< char * >(buf2);
   27401           3 :   if (swig_obj[2]) {
   27402           0 :     {
   27403             :       /* %typemap(in) char **dict */
   27404           0 :       arg3 = NULL;
   27405           0 :       if ( PySequence_Check( swig_obj[2] ) ) {
   27406           0 :         int bErr = FALSE;
   27407           0 :         arg3 = CSLFromPySequence(swig_obj[2], &bErr);
   27408           0 :         if ( bErr )
   27409             :         {
   27410           0 :           SWIG_fail;
   27411             :         }
   27412             :       }
   27413           0 :       else if ( PyMapping_Check( swig_obj[2] ) ) {
   27414           0 :         int bErr = FALSE;
   27415           0 :         arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
   27416           0 :         if ( bErr )
   27417             :         {
   27418           0 :           SWIG_fail;
   27419             :         }
   27420             :       }
   27421             :       else {
   27422           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   27423           0 :         SWIG_fail;
   27424             :       }
   27425             :     }
   27426             :   }
   27427           3 :   {
   27428           3 :     if (!arg2) {
   27429           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   27430             :     }
   27431             :   }
   27432           3 :   {
   27433           3 :     const int bLocalUseExceptions = GetUseExceptions();
   27434           3 :     if ( bLocalUseExceptions ) {
   27435           1 :       pushErrorHandler();
   27436             :     }
   27437           3 :     {
   27438           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   27439           3 :       result = (GDALGroupHS *)GDALGroupHS_OpenGroupFromFullname(arg1,(char const *)arg2,arg3);
   27440           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   27441             :     }
   27442           3 :     if ( bLocalUseExceptions ) {
   27443           1 :       popErrorHandler();
   27444             :     }
   27445             : #ifndef SED_HACKS
   27446             :     if ( bLocalUseExceptions ) {
   27447             :       CPLErr eclass = CPLGetLastErrorType();
   27448             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   27449             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   27450             :       }
   27451             :     }
   27452             : #endif
   27453             :   }
   27454           3 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALGroupHS, SWIG_POINTER_OWN |  0 );
   27455           3 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   27456           3 :   {
   27457             :     /* %typemap(freearg) char **dict */
   27458           3 :     CSLDestroy( arg3 );
   27459             :   }
   27460           4 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   27461             :   return resultobj;
   27462           0 : fail:
   27463           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   27464           0 :   {
   27465             :     /* %typemap(freearg) char **dict */
   27466           0 :     CSLDestroy( arg3 );
   27467             :   }
   27468             :   return NULL;
   27469             : }
   27470             : 
   27471             : 
   27472           8 : SWIGINTERN PyObject *_wrap_Group_GetVectorLayerNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   27473           8 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   27474           8 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   27475           8 :   char **arg2 = (char **) 0 ;
   27476           8 :   void *argp1 = 0 ;
   27477           8 :   int res1 = 0 ;
   27478           8 :   PyObject *swig_obj[2] ;
   27479           8 :   char **result = 0 ;
   27480             :   
   27481           8 :   if (!SWIG_Python_UnpackTuple(args, "Group_GetVectorLayerNames", 1, 2, swig_obj)) SWIG_fail;
   27482           8 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   27483           8 :   if (!SWIG_IsOK(res1)) {
   27484           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_GetVectorLayerNames" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   27485             :   }
   27486           8 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   27487           8 :   if (swig_obj[1]) {
   27488           0 :     {
   27489             :       /* %typemap(in) char **dict */
   27490           0 :       arg2 = NULL;
   27491           0 :       if ( PySequence_Check( swig_obj[1] ) ) {
   27492           0 :         int bErr = FALSE;
   27493           0 :         arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   27494           0 :         if ( bErr )
   27495             :         {
   27496           0 :           SWIG_fail;
   27497             :         }
   27498             :       }
   27499           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   27500           0 :         int bErr = FALSE;
   27501           0 :         arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   27502           0 :         if ( bErr )
   27503             :         {
   27504           0 :           SWIG_fail;
   27505             :         }
   27506             :       }
   27507             :       else {
   27508           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   27509           0 :         SWIG_fail;
   27510             :       }
   27511             :     }
   27512             :   }
   27513           8 :   {
   27514           8 :     const int bLocalUseExceptions = GetUseExceptions();
   27515           8 :     if ( bLocalUseExceptions ) {
   27516           0 :       pushErrorHandler();
   27517             :     }
   27518           8 :     {
   27519           8 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   27520           8 :       result = (char **)GDALGroupHS_GetVectorLayerNames(arg1,arg2);
   27521           8 :       SWIG_PYTHON_THREAD_END_ALLOW;
   27522             :     }
   27523           8 :     if ( bLocalUseExceptions ) {
   27524           0 :       popErrorHandler();
   27525             :     }
   27526             : #ifndef SED_HACKS
   27527             :     if ( bLocalUseExceptions ) {
   27528             :       CPLErr eclass = CPLGetLastErrorType();
   27529             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   27530             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   27531             :       }
   27532             :     }
   27533             : #endif
   27534             :   }
   27535           8 :   {
   27536             :     /* %typemap(out) char **CSL -> ( string ) */
   27537           8 :     bool bErr = false;
   27538           8 :     resultobj = CSLToList(result, &bErr);
   27539           8 :     CSLDestroy(result);
   27540           8 :     if( bErr ) {
   27541           0 :       SWIG_fail;
   27542             :     }
   27543             :   }
   27544           8 :   {
   27545             :     /* %typemap(freearg) char **dict */
   27546           8 :     CSLDestroy( arg2 );
   27547             :   }
   27548           8 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   27549             :   return resultobj;
   27550           0 : fail:
   27551           0 :   {
   27552             :     /* %typemap(freearg) char **dict */
   27553           0 :     CSLDestroy( arg2 );
   27554             :   }
   27555             :   return NULL;
   27556             : }
   27557             : 
   27558             : 
   27559          12 : SWIGINTERN PyObject *_wrap_Group_OpenVectorLayer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   27560          12 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   27561          12 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   27562          12 :   char *arg2 = (char *) 0 ;
   27563          12 :   char **arg3 = (char **) 0 ;
   27564          12 :   void *argp1 = 0 ;
   27565          12 :   int res1 = 0 ;
   27566          12 :   int res2 ;
   27567          12 :   char *buf2 = 0 ;
   27568          12 :   int alloc2 = 0 ;
   27569          12 :   PyObject *swig_obj[3] ;
   27570          12 :   OGRLayerShadow *result = 0 ;
   27571             :   
   27572          12 :   if (!SWIG_Python_UnpackTuple(args, "Group_OpenVectorLayer", 2, 3, swig_obj)) SWIG_fail;
   27573          12 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   27574          12 :   if (!SWIG_IsOK(res1)) {
   27575           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_OpenVectorLayer" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   27576             :   }
   27577          12 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   27578          12 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   27579          12 :   if (!SWIG_IsOK(res2)) {
   27580           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_OpenVectorLayer" "', argument " "2"" of type '" "char const *""'");
   27581             :   }
   27582          12 :   arg2 = reinterpret_cast< char * >(buf2);
   27583          12 :   if (swig_obj[2]) {
   27584           0 :     {
   27585             :       /* %typemap(in) char **dict */
   27586           0 :       arg3 = NULL;
   27587           0 :       if ( PySequence_Check( swig_obj[2] ) ) {
   27588           0 :         int bErr = FALSE;
   27589           0 :         arg3 = CSLFromPySequence(swig_obj[2], &bErr);
   27590           0 :         if ( bErr )
   27591             :         {
   27592           0 :           SWIG_fail;
   27593             :         }
   27594             :       }
   27595           0 :       else if ( PyMapping_Check( swig_obj[2] ) ) {
   27596           0 :         int bErr = FALSE;
   27597           0 :         arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
   27598           0 :         if ( bErr )
   27599             :         {
   27600           0 :           SWIG_fail;
   27601             :         }
   27602             :       }
   27603             :       else {
   27604           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   27605           0 :         SWIG_fail;
   27606             :       }
   27607             :     }
   27608             :   }
   27609          12 :   {
   27610          12 :     if (!arg2) {
   27611           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   27612             :     }
   27613             :   }
   27614          12 :   {
   27615          12 :     const int bLocalUseExceptions = GetUseExceptions();
   27616          12 :     if ( bLocalUseExceptions ) {
   27617           1 :       pushErrorHandler();
   27618             :     }
   27619          12 :     {
   27620          12 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   27621          12 :       result = (OGRLayerShadow *)GDALGroupHS_OpenVectorLayer(arg1,(char const *)arg2,arg3);
   27622          12 :       SWIG_PYTHON_THREAD_END_ALLOW;
   27623             :     }
   27624          12 :     if ( bLocalUseExceptions ) {
   27625           1 :       popErrorHandler();
   27626             :     }
   27627             : #ifndef SED_HACKS
   27628             :     if ( bLocalUseExceptions ) {
   27629             :       CPLErr eclass = CPLGetLastErrorType();
   27630             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   27631             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   27632             :       }
   27633             :     }
   27634             : #endif
   27635             :   }
   27636          12 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
   27637          12 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   27638          12 :   {
   27639             :     /* %typemap(freearg) char **dict */
   27640          12 :     CSLDestroy( arg3 );
   27641             :   }
   27642          13 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   27643             :   return resultobj;
   27644           0 : fail:
   27645           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   27646           0 :   {
   27647             :     /* %typemap(freearg) char **dict */
   27648           0 :     CSLDestroy( arg3 );
   27649             :   }
   27650             :   return NULL;
   27651             : }
   27652             : 
   27653             : 
   27654          73 : SWIGINTERN PyObject *_wrap_Group_GetDimensions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   27655          73 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   27656          73 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   27657          73 :   GDALDimensionHS ***arg2 = (GDALDimensionHS ***) 0 ;
   27658          73 :   size_t *arg3 = (size_t *) 0 ;
   27659          73 :   char **arg4 = (char **) 0 ;
   27660          73 :   void *argp1 = 0 ;
   27661          73 :   int res1 = 0 ;
   27662          73 :   GDALDimensionHS **dims2 = 0 ;
   27663          73 :   size_t nCount2 = 0 ;
   27664          73 :   PyObject *swig_obj[2] ;
   27665             :   
   27666          73 :   {
   27667             :     /* %typemap(in,numinputs=0) (GDALDimensionHS*** pdims, size_t* pnCount) */
   27668          73 :     arg2 = &dims2;
   27669          73 :     arg3 = &nCount2;
   27670             :   }
   27671          73 :   if (!SWIG_Python_UnpackTuple(args, "Group_GetDimensions", 1, 2, swig_obj)) SWIG_fail;
   27672          73 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   27673          73 :   if (!SWIG_IsOK(res1)) {
   27674           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_GetDimensions" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   27675             :   }
   27676          73 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   27677          73 :   if (swig_obj[1]) {
   27678           0 :     {
   27679             :       /* %typemap(in) char **dict */
   27680           0 :       arg4 = NULL;
   27681           0 :       if ( PySequence_Check( swig_obj[1] ) ) {
   27682           0 :         int bErr = FALSE;
   27683           0 :         arg4 = CSLFromPySequence(swig_obj[1], &bErr);
   27684           0 :         if ( bErr )
   27685             :         {
   27686           0 :           SWIG_fail;
   27687             :         }
   27688             :       }
   27689           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   27690           0 :         int bErr = FALSE;
   27691           0 :         arg4 = CSLFromPyMapping(swig_obj[1], &bErr);
   27692           0 :         if ( bErr )
   27693             :         {
   27694           0 :           SWIG_fail;
   27695             :         }
   27696             :       }
   27697             :       else {
   27698           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   27699           0 :         SWIG_fail;
   27700             :       }
   27701             :     }
   27702             :   }
   27703          73 :   {
   27704          73 :     const int bLocalUseExceptions = GetUseExceptions();
   27705          73 :     if ( bLocalUseExceptions ) {
   27706          40 :       pushErrorHandler();
   27707             :     }
   27708          73 :     {
   27709          73 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   27710          73 :       GDALGroupHS_GetDimensions(arg1,arg2,arg3,arg4);
   27711          73 :       SWIG_PYTHON_THREAD_END_ALLOW;
   27712             :     }
   27713          73 :     if ( bLocalUseExceptions ) {
   27714          40 :       popErrorHandler();
   27715             :     }
   27716             : #ifndef SED_HACKS
   27717             :     if ( bLocalUseExceptions ) {
   27718             :       CPLErr eclass = CPLGetLastErrorType();
   27719             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   27720             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   27721             :       }
   27722             :     }
   27723             : #endif
   27724             :   }
   27725          73 :   resultobj = SWIG_Py_Void();
   27726          73 :   {
   27727             :     /* %typemap(argout) (GDALDimensionHS*** pdims, size_t* pnCount) */
   27728          73 :     Py_DECREF(resultobj);
   27729          73 :     resultobj = PyList_New( *arg3 );
   27730          73 :     if( !resultobj ) {
   27731           0 :       SWIG_fail;
   27732             :     }
   27733         230 :     for( size_t i = 0; i < *arg3; i++ ) {
   27734         157 :       PyList_SetItem(resultobj, i,
   27735         157 :         SWIG_NewPointerObj((void*)(*arg2)[i],SWIGTYPE_p_GDALDimensionHS,SWIG_POINTER_OWN) );
   27736             :       /* We have borrowed the GDALDimensionHS */
   27737         157 :       (*arg2)[i] = NULL;
   27738             :     }
   27739             :   }
   27740          73 :   {
   27741             :     /* %typemap(freearg) (GDALDimensionHS*** pdims, size_t* pnCount) */
   27742          73 :     GDALReleaseDimensions(*arg2, *arg3);
   27743             :   }
   27744          73 :   {
   27745             :     /* %typemap(freearg) char **dict */
   27746          73 :     CSLDestroy( arg4 );
   27747             :   }
   27748          73 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   27749             :   return resultobj;
   27750           0 : fail:
   27751           0 :   {
   27752             :     /* %typemap(freearg) (GDALDimensionHS*** pdims, size_t* pnCount) */
   27753           0 :     GDALReleaseDimensions(*arg2, *arg3);
   27754             :   }
   27755           0 :   {
   27756             :     /* %typemap(freearg) char **dict */
   27757           0 :     CSLDestroy( arg4 );
   27758             :   }
   27759             :   return NULL;
   27760             : }
   27761             : 
   27762             : 
   27763          63 : SWIGINTERN PyObject *_wrap_Group_GetAttribute(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   27764          63 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   27765          63 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   27766          63 :   char *arg2 = (char *) 0 ;
   27767          63 :   void *argp1 = 0 ;
   27768          63 :   int res1 = 0 ;
   27769          63 :   int res2 ;
   27770          63 :   char *buf2 = 0 ;
   27771          63 :   int alloc2 = 0 ;
   27772          63 :   PyObject *swig_obj[2] ;
   27773          63 :   GDALAttributeHS *result = 0 ;
   27774             :   
   27775          63 :   if (!SWIG_Python_UnpackTuple(args, "Group_GetAttribute", 2, 2, swig_obj)) SWIG_fail;
   27776          63 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   27777          63 :   if (!SWIG_IsOK(res1)) {
   27778           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_GetAttribute" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   27779             :   }
   27780          63 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   27781          63 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   27782          63 :   if (!SWIG_IsOK(res2)) {
   27783           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_GetAttribute" "', argument " "2"" of type '" "char const *""'");
   27784             :   }
   27785          63 :   arg2 = reinterpret_cast< char * >(buf2);
   27786          63 :   {
   27787          63 :     if (!arg2) {
   27788           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   27789             :     }
   27790             :   }
   27791          63 :   {
   27792          63 :     const int bLocalUseExceptions = GetUseExceptions();
   27793          63 :     if ( bLocalUseExceptions ) {
   27794          22 :       pushErrorHandler();
   27795             :     }
   27796          63 :     {
   27797          63 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   27798          63 :       result = (GDALAttributeHS *)GDALGroupHS_GetAttribute(arg1,(char const *)arg2);
   27799          63 :       SWIG_PYTHON_THREAD_END_ALLOW;
   27800             :     }
   27801          63 :     if ( bLocalUseExceptions ) {
   27802          22 :       popErrorHandler();
   27803             :     }
   27804             : #ifndef SED_HACKS
   27805             :     if ( bLocalUseExceptions ) {
   27806             :       CPLErr eclass = CPLGetLastErrorType();
   27807             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   27808             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   27809             :       }
   27810             :     }
   27811             : #endif
   27812             :   }
   27813          63 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALAttributeHS, SWIG_POINTER_OWN |  0 );
   27814          63 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   27815          65 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   27816             :   return resultobj;
   27817           0 : fail:
   27818           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   27819             :   return NULL;
   27820             : }
   27821             : 
   27822             : 
   27823          67 : SWIGINTERN PyObject *_wrap_Group_GetAttributes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   27824          67 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   27825          67 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   27826          67 :   GDALAttributeHS ***arg2 = (GDALAttributeHS ***) 0 ;
   27827          67 :   size_t *arg3 = (size_t *) 0 ;
   27828          67 :   char **arg4 = (char **) 0 ;
   27829          67 :   void *argp1 = 0 ;
   27830          67 :   int res1 = 0 ;
   27831          67 :   GDALAttributeHS **attrs2 = 0 ;
   27832          67 :   size_t nCount2 = 0 ;
   27833          67 :   PyObject *swig_obj[2] ;
   27834             :   
   27835          67 :   {
   27836             :     /* %typemap(in,numinputs=0) (GDALAttributeHS*** pattrs, size_t* pnCount) */
   27837          67 :     arg2 = &attrs2;
   27838          67 :     arg3 = &nCount2;
   27839             :   }
   27840          67 :   if (!SWIG_Python_UnpackTuple(args, "Group_GetAttributes", 1, 2, swig_obj)) SWIG_fail;
   27841          67 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   27842          67 :   if (!SWIG_IsOK(res1)) {
   27843           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_GetAttributes" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   27844             :   }
   27845          67 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   27846          67 :   if (swig_obj[1]) {
   27847           0 :     {
   27848             :       /* %typemap(in) char **dict */
   27849           0 :       arg4 = NULL;
   27850           0 :       if ( PySequence_Check( swig_obj[1] ) ) {
   27851           0 :         int bErr = FALSE;
   27852           0 :         arg4 = CSLFromPySequence(swig_obj[1], &bErr);
   27853           0 :         if ( bErr )
   27854             :         {
   27855           0 :           SWIG_fail;
   27856             :         }
   27857             :       }
   27858           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   27859           0 :         int bErr = FALSE;
   27860           0 :         arg4 = CSLFromPyMapping(swig_obj[1], &bErr);
   27861           0 :         if ( bErr )
   27862             :         {
   27863           0 :           SWIG_fail;
   27864             :         }
   27865             :       }
   27866             :       else {
   27867           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   27868           0 :         SWIG_fail;
   27869             :       }
   27870             :     }
   27871             :   }
   27872          67 :   {
   27873          67 :     const int bLocalUseExceptions = GetUseExceptions();
   27874          67 :     if ( bLocalUseExceptions ) {
   27875          35 :       pushErrorHandler();
   27876             :     }
   27877          67 :     {
   27878          67 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   27879          67 :       GDALGroupHS_GetAttributes(arg1,arg2,arg3,arg4);
   27880          67 :       SWIG_PYTHON_THREAD_END_ALLOW;
   27881             :     }
   27882          67 :     if ( bLocalUseExceptions ) {
   27883          35 :       popErrorHandler();
   27884             :     }
   27885             : #ifndef SED_HACKS
   27886             :     if ( bLocalUseExceptions ) {
   27887             :       CPLErr eclass = CPLGetLastErrorType();
   27888             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   27889             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   27890             :       }
   27891             :     }
   27892             : #endif
   27893             :   }
   27894          67 :   resultobj = SWIG_Py_Void();
   27895          67 :   {
   27896             :     /* %typemap(argout) (GDALAttributeHS*** pattrs, size_t* pnCount) */
   27897          67 :     Py_DECREF(resultobj);
   27898          67 :     resultobj = PyList_New( *arg3 );
   27899          67 :     if( !resultobj ) {
   27900           0 :       SWIG_fail;
   27901             :     }
   27902         221 :     for( size_t i = 0; i < *arg3; i++ ) {
   27903         154 :       PyList_SetItem(resultobj, i,
   27904         154 :         SWIG_NewPointerObj((void*)(*arg2)[i],SWIGTYPE_p_GDALAttributeHS,SWIG_POINTER_OWN) );
   27905             :       /* We have borrowed the GDALAttributeHS */
   27906         154 :       (*arg2)[i] = NULL;
   27907             :     }
   27908             :   }
   27909          67 :   {
   27910             :     /* %typemap(freearg) (GDALAttributeHS*** pattrs, size_t* pnCount) */
   27911          67 :     GDALReleaseAttributes(*arg2, *arg3);
   27912             :   }
   27913          67 :   {
   27914             :     /* %typemap(freearg) char **dict */
   27915          67 :     CSLDestroy( arg4 );
   27916             :   }
   27917          67 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   27918             :   return resultobj;
   27919           0 : fail:
   27920           0 :   {
   27921             :     /* %typemap(freearg) (GDALAttributeHS*** pattrs, size_t* pnCount) */
   27922           0 :     GDALReleaseAttributes(*arg2, *arg3);
   27923             :   }
   27924           0 :   {
   27925             :     /* %typemap(freearg) char **dict */
   27926           0 :     CSLDestroy( arg4 );
   27927             :   }
   27928             :   return NULL;
   27929             : }
   27930             : 
   27931             : 
   27932           4 : SWIGINTERN PyObject *_wrap_Group_GetStructuralInfo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   27933           4 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   27934           4 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   27935           4 :   void *argp1 = 0 ;
   27936           4 :   int res1 = 0 ;
   27937           4 :   PyObject *swig_obj[1] ;
   27938           4 :   char **result = 0 ;
   27939             :   
   27940           4 :   if (!args) SWIG_fail;
   27941           4 :   swig_obj[0] = args;
   27942           4 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   27943           4 :   if (!SWIG_IsOK(res1)) {
   27944           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_GetStructuralInfo" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   27945             :   }
   27946           4 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   27947           4 :   {
   27948           4 :     const int bLocalUseExceptions = GetUseExceptions();
   27949           4 :     if ( bLocalUseExceptions ) {
   27950           0 :       pushErrorHandler();
   27951             :     }
   27952           4 :     {
   27953           4 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   27954           4 :       result = (char **)GDALGroupHS_GetStructuralInfo(arg1);
   27955           4 :       SWIG_PYTHON_THREAD_END_ALLOW;
   27956             :     }
   27957           4 :     if ( bLocalUseExceptions ) {
   27958           0 :       popErrorHandler();
   27959             :     }
   27960             : #ifndef SED_HACKS
   27961             :     if ( bLocalUseExceptions ) {
   27962             :       CPLErr eclass = CPLGetLastErrorType();
   27963             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   27964             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   27965             :       }
   27966             :     }
   27967             : #endif
   27968             :   }
   27969           4 :   {
   27970             :     /* %typemap(out) char **dict */
   27971           4 :     resultobj = GetCSLStringAsPyDict(result, false);
   27972             :   }
   27973           4 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   27974             :   return resultobj;
   27975             : fail:
   27976             :   return NULL;
   27977             : }
   27978             : 
   27979             : 
   27980         174 : SWIGINTERN PyObject *_wrap_Group_CreateGroup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   27981         174 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   27982         174 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   27983         174 :   char *arg2 = (char *) 0 ;
   27984         174 :   char **arg3 = (char **) 0 ;
   27985         174 :   void *argp1 = 0 ;
   27986         174 :   int res1 = 0 ;
   27987         174 :   int res2 ;
   27988         174 :   char *buf2 = 0 ;
   27989         174 :   int alloc2 = 0 ;
   27990         174 :   PyObject *swig_obj[3] ;
   27991         174 :   GDALGroupHS *result = 0 ;
   27992             :   
   27993         174 :   if (!SWIG_Python_UnpackTuple(args, "Group_CreateGroup", 2, 3, swig_obj)) SWIG_fail;
   27994         174 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   27995         174 :   if (!SWIG_IsOK(res1)) {
   27996           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_CreateGroup" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   27997             :   }
   27998         174 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   27999         174 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   28000         174 :   if (!SWIG_IsOK(res2)) {
   28001           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_CreateGroup" "', argument " "2"" of type '" "char const *""'");
   28002             :   }
   28003         174 :   arg2 = reinterpret_cast< char * >(buf2);
   28004         174 :   if (swig_obj[2]) {
   28005           0 :     {
   28006             :       /* %typemap(in) char **dict */
   28007           0 :       arg3 = NULL;
   28008           0 :       if ( PySequence_Check( swig_obj[2] ) ) {
   28009           0 :         int bErr = FALSE;
   28010           0 :         arg3 = CSLFromPySequence(swig_obj[2], &bErr);
   28011           0 :         if ( bErr )
   28012             :         {
   28013           0 :           SWIG_fail;
   28014             :         }
   28015             :       }
   28016           0 :       else if ( PyMapping_Check( swig_obj[2] ) ) {
   28017           0 :         int bErr = FALSE;
   28018           0 :         arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
   28019           0 :         if ( bErr )
   28020             :         {
   28021           0 :           SWIG_fail;
   28022             :         }
   28023             :       }
   28024             :       else {
   28025           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   28026           0 :         SWIG_fail;
   28027             :       }
   28028             :     }
   28029             :   }
   28030         174 :   {
   28031         174 :     if (!arg2) {
   28032           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   28033             :     }
   28034             :   }
   28035         173 :   {
   28036         173 :     const int bLocalUseExceptions = GetUseExceptions();
   28037         173 :     if ( bLocalUseExceptions ) {
   28038          86 :       pushErrorHandler();
   28039             :     }
   28040         173 :     {
   28041         173 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   28042         173 :       result = (GDALGroupHS *)GDALGroupHS_CreateGroup(arg1,(char const *)arg2,arg3);
   28043         173 :       SWIG_PYTHON_THREAD_END_ALLOW;
   28044             :     }
   28045         173 :     if ( bLocalUseExceptions ) {
   28046          86 :       popErrorHandler();
   28047             :     }
   28048             : #ifndef SED_HACKS
   28049             :     if ( bLocalUseExceptions ) {
   28050             :       CPLErr eclass = CPLGetLastErrorType();
   28051             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   28052             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   28053             :       }
   28054             :     }
   28055             : #endif
   28056             :   }
   28057         173 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALGroupHS, SWIG_POINTER_OWN |  0 );
   28058         173 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   28059         173 :   {
   28060             :     /* %typemap(freearg) char **dict */
   28061         173 :     CSLDestroy( arg3 );
   28062             :   }
   28063         177 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   28064             :   return resultobj;
   28065           1 : fail:
   28066           1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   28067           1 :   {
   28068             :     /* %typemap(freearg) char **dict */
   28069           1 :     CSLDestroy( arg3 );
   28070             :   }
   28071             :   return NULL;
   28072             : }
   28073             : 
   28074             : 
   28075          20 : SWIGINTERN PyObject *_wrap_Group_DeleteGroup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   28076          20 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   28077          20 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   28078          20 :   char *arg2 = (char *) 0 ;
   28079          20 :   char **arg3 = (char **) 0 ;
   28080          20 :   void *argp1 = 0 ;
   28081          20 :   int res1 = 0 ;
   28082          20 :   int res2 ;
   28083          20 :   char *buf2 = 0 ;
   28084          20 :   int alloc2 = 0 ;
   28085          20 :   PyObject *swig_obj[3] ;
   28086          20 :   CPLErr result;
   28087             :   
   28088          20 :   if (!SWIG_Python_UnpackTuple(args, "Group_DeleteGroup", 2, 3, swig_obj)) SWIG_fail;
   28089          20 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   28090          20 :   if (!SWIG_IsOK(res1)) {
   28091           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_DeleteGroup" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   28092             :   }
   28093          20 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   28094          20 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   28095          20 :   if (!SWIG_IsOK(res2)) {
   28096           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_DeleteGroup" "', argument " "2"" of type '" "char const *""'");
   28097             :   }
   28098          20 :   arg2 = reinterpret_cast< char * >(buf2);
   28099          20 :   if (swig_obj[2]) {
   28100           0 :     {
   28101             :       /* %typemap(in) char **dict */
   28102           0 :       arg3 = NULL;
   28103           0 :       if ( PySequence_Check( swig_obj[2] ) ) {
   28104           0 :         int bErr = FALSE;
   28105           0 :         arg3 = CSLFromPySequence(swig_obj[2], &bErr);
   28106           0 :         if ( bErr )
   28107             :         {
   28108           0 :           SWIG_fail;
   28109             :         }
   28110             :       }
   28111           0 :       else if ( PyMapping_Check( swig_obj[2] ) ) {
   28112           0 :         int bErr = FALSE;
   28113           0 :         arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
   28114           0 :         if ( bErr )
   28115             :         {
   28116           0 :           SWIG_fail;
   28117             :         }
   28118             :       }
   28119             :       else {
   28120           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   28121           0 :         SWIG_fail;
   28122             :       }
   28123             :     }
   28124             :   }
   28125          20 :   {
   28126          20 :     if (!arg2) {
   28127           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   28128             :     }
   28129             :   }
   28130          20 :   {
   28131          20 :     const int bLocalUseExceptions = GetUseExceptions();
   28132          20 :     if ( bLocalUseExceptions ) {
   28133          20 :       pushErrorHandler();
   28134             :     }
   28135          20 :     {
   28136          20 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   28137          40 :       CPL_IGNORE_RET_VAL(result = (CPLErr)GDALGroupHS_DeleteGroup(arg1,(char const *)arg2,arg3));
   28138          20 :       SWIG_PYTHON_THREAD_END_ALLOW;
   28139             :     }
   28140          20 :     if ( bLocalUseExceptions ) {
   28141          20 :       popErrorHandler();
   28142             :     }
   28143             : #ifndef SED_HACKS
   28144             :     if ( bLocalUseExceptions ) {
   28145             :       CPLErr eclass = CPLGetLastErrorType();
   28146             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   28147             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   28148             :       }
   28149             :     }
   28150             : #endif
   28151             :   }
   28152          20 :   resultobj = SWIG_From_int(static_cast< int >(result));
   28153          20 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   28154          20 :   {
   28155             :     /* %typemap(freearg) char **dict */
   28156          20 :     CSLDestroy( arg3 );
   28157             :   }
   28158          33 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   28159             :   return resultobj;
   28160           0 : fail:
   28161           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   28162           0 :   {
   28163             :     /* %typemap(freearg) char **dict */
   28164           0 :     CSLDestroy( arg3 );
   28165             :   }
   28166             :   return NULL;
   28167             : }
   28168             : 
   28169             : 
   28170         642 : SWIGINTERN PyObject *_wrap_Group_CreateDimension(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   28171         642 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   28172         642 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   28173         642 :   char *arg2 = (char *) 0 ;
   28174         642 :   char *arg3 = (char *) 0 ;
   28175         642 :   char *arg4 = (char *) 0 ;
   28176         642 :   GUIntBig arg5 ;
   28177         642 :   char **arg6 = (char **) 0 ;
   28178         642 :   void *argp1 = 0 ;
   28179         642 :   int res1 = 0 ;
   28180         642 :   int res2 ;
   28181         642 :   char *buf2 = 0 ;
   28182         642 :   int alloc2 = 0 ;
   28183         642 :   int res3 ;
   28184         642 :   char *buf3 = 0 ;
   28185         642 :   int alloc3 = 0 ;
   28186         642 :   int res4 ;
   28187         642 :   char *buf4 = 0 ;
   28188         642 :   int alloc4 = 0 ;
   28189         642 :   PyObject *swig_obj[6] ;
   28190         642 :   GDALDimensionHS *result = 0 ;
   28191             :   
   28192         642 :   if (!SWIG_Python_UnpackTuple(args, "Group_CreateDimension", 5, 6, swig_obj)) SWIG_fail;
   28193         642 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   28194         642 :   if (!SWIG_IsOK(res1)) {
   28195           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_CreateDimension" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   28196             :   }
   28197         642 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   28198         642 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   28199         642 :   if (!SWIG_IsOK(res2)) {
   28200           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_CreateDimension" "', argument " "2"" of type '" "char const *""'");
   28201             :   }
   28202         642 :   arg2 = reinterpret_cast< char * >(buf2);
   28203         642 :   res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   28204         642 :   if (!SWIG_IsOK(res3)) {
   28205           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Group_CreateDimension" "', argument " "3"" of type '" "char const *""'");
   28206             :   }
   28207         642 :   arg3 = reinterpret_cast< char * >(buf3);
   28208         642 :   res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, NULL, &alloc4);
   28209         642 :   if (!SWIG_IsOK(res4)) {
   28210           0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Group_CreateDimension" "', argument " "4"" of type '" "char const *""'");
   28211             :   }
   28212         642 :   arg4 = reinterpret_cast< char * >(buf4);
   28213         642 :   {
   28214         642 :     arg5 = (GIntBig)PyLong_AsUnsignedLongLong(swig_obj[4]);
   28215             :   }
   28216         642 :   if (swig_obj[5]) {
   28217           7 :     {
   28218             :       /* %typemap(in) char **dict */
   28219           7 :       arg6 = NULL;
   28220           7 :       if ( PySequence_Check( swig_obj[5] ) ) {
   28221           7 :         int bErr = FALSE;
   28222           7 :         arg6 = CSLFromPySequence(swig_obj[5], &bErr);
   28223           7 :         if ( bErr )
   28224             :         {
   28225           0 :           SWIG_fail;
   28226             :         }
   28227             :       }
   28228           0 :       else if ( PyMapping_Check( swig_obj[5] ) ) {
   28229           0 :         int bErr = FALSE;
   28230           0 :         arg6 = CSLFromPyMapping(swig_obj[5], &bErr);
   28231           0 :         if ( bErr )
   28232             :         {
   28233           0 :           SWIG_fail;
   28234             :         }
   28235             :       }
   28236             :       else {
   28237           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   28238           0 :         SWIG_fail;
   28239             :       }
   28240             :     }
   28241             :   }
   28242         642 :   {
   28243         642 :     if (!arg2) {
   28244           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   28245             :     }
   28246             :   }
   28247         642 :   {
   28248         642 :     const int bLocalUseExceptions = GetUseExceptions();
   28249         642 :     if ( bLocalUseExceptions ) {
   28250         108 :       pushErrorHandler();
   28251             :     }
   28252         642 :     {
   28253         642 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   28254         642 :       result = (GDALDimensionHS *)GDALGroupHS_CreateDimension(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4,arg5,arg6);
   28255         642 :       SWIG_PYTHON_THREAD_END_ALLOW;
   28256             :     }
   28257         642 :     if ( bLocalUseExceptions ) {
   28258         108 :       popErrorHandler();
   28259             :     }
   28260             : #ifndef SED_HACKS
   28261             :     if ( bLocalUseExceptions ) {
   28262             :       CPLErr eclass = CPLGetLastErrorType();
   28263             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   28264             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   28265             :       }
   28266             :     }
   28267             : #endif
   28268             :   }
   28269         642 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDimensionHS, SWIG_POINTER_OWN |  0 );
   28270         642 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   28271         642 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   28272         642 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   28273         642 :   {
   28274             :     /* %typemap(freearg) char **dict */
   28275         642 :     CSLDestroy( arg6 );
   28276             :   }
   28277         642 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   28278             :   return resultobj;
   28279           0 : fail:
   28280           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   28281           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   28282           0 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   28283           0 :   {
   28284             :     /* %typemap(freearg) char **dict */
   28285           0 :     CSLDestroy( arg6 );
   28286             :   }
   28287             :   return NULL;
   28288             : }
   28289             : 
   28290             : 
   28291         591 : SWIGINTERN PyObject *_wrap_Group_CreateMDArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   28292         591 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   28293         591 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   28294         591 :   char *arg2 = (char *) 0 ;
   28295         591 :   int arg3 ;
   28296         591 :   GDALDimensionHS **arg4 = (GDALDimensionHS **) 0 ;
   28297         591 :   GDALExtendedDataTypeHS *arg5 = (GDALExtendedDataTypeHS *) 0 ;
   28298         591 :   char **arg6 = (char **) 0 ;
   28299         591 :   void *argp1 = 0 ;
   28300         591 :   int res1 = 0 ;
   28301         591 :   int res2 ;
   28302         591 :   char *buf2 = 0 ;
   28303         591 :   int alloc2 = 0 ;
   28304         591 :   void *argp5 = 0 ;
   28305         591 :   int res5 = 0 ;
   28306         591 :   PyObject *swig_obj[5] ;
   28307         591 :   GDALMDArrayHS *result = 0 ;
   28308             :   
   28309         591 :   if (!SWIG_Python_UnpackTuple(args, "Group_CreateMDArray", 4, 5, swig_obj)) SWIG_fail;
   28310         591 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   28311         591 :   if (!SWIG_IsOK(res1)) {
   28312           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_CreateMDArray" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   28313             :   }
   28314         591 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   28315         591 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   28316         591 :   if (!SWIG_IsOK(res2)) {
   28317           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_CreateMDArray" "', argument " "2"" of type '" "char const *""'");
   28318             :   }
   28319         591 :   arg2 = reinterpret_cast< char * >(buf2);
   28320         591 :   {
   28321             :     /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALDimensionHS *optional_##GDALDimensionHS)*/
   28322         591 :     if ( !PySequence_Check(swig_obj[2]) ) {
   28323           1 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   28324           1 :       SWIG_fail;
   28325             :     }
   28326         590 :     Py_ssize_t size = PySequence_Size(swig_obj[2]);
   28327         590 :     if( size > (Py_ssize_t)INT_MAX ) {
   28328           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   28329           0 :       SWIG_fail;
   28330             :     }
   28331         590 :     if( (size_t)size > SIZE_MAX / sizeof(GDALDimensionHS*) ) {
   28332           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   28333           0 :       SWIG_fail;
   28334             :     }
   28335         590 :     arg3 = (int)size;
   28336         590 :     arg4 = (GDALDimensionHS**) VSIMalloc(arg3*sizeof(GDALDimensionHS*));
   28337         590 :     if( !arg4) {
   28338           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   28339           0 :       SWIG_fail;
   28340             :     }
   28341             :     
   28342        1385 :     for( int i = 0; i<arg3; i++ ) {
   28343         797 :       PyObject *o = PySequence_GetItem(swig_obj[2],i);
   28344         797 :       GDALDimensionHS* rawobjectpointer = NULL;
   28345         797 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALDimensionHS, SWIG_POINTER_EXCEPTION | 0 ));
   28346         797 :       if (!rawobjectpointer) {
   28347           2 :         Py_DECREF(o);
   28348           2 :         PyErr_SetString(PyExc_TypeError, "object of wrong GDALDimensionHS");
   28349           2 :         SWIG_fail;
   28350             :       }
   28351         795 :       arg4[i] = rawobjectpointer;
   28352         795 :       Py_DECREF(o);
   28353             :       
   28354             :     }
   28355             :   }
   28356         588 :   res5 = SWIG_ConvertPtr(swig_obj[3], &argp5,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   28357         588 :   if (!SWIG_IsOK(res5)) {
   28358           0 :     SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "Group_CreateMDArray" "', argument " "5"" of type '" "GDALExtendedDataTypeHS *""'"); 
   28359             :   }
   28360         588 :   arg5 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp5);
   28361         588 :   if (swig_obj[4]) {
   28362         132 :     {
   28363             :       /* %typemap(in) char **dict */
   28364         132 :       arg6 = NULL;
   28365         132 :       if ( PySequence_Check( swig_obj[4] ) ) {
   28366         132 :         int bErr = FALSE;
   28367         132 :         arg6 = CSLFromPySequence(swig_obj[4], &bErr);
   28368         132 :         if ( bErr )
   28369             :         {
   28370           0 :           SWIG_fail;
   28371             :         }
   28372             :       }
   28373           0 :       else if ( PyMapping_Check( swig_obj[4] ) ) {
   28374           0 :         int bErr = FALSE;
   28375           0 :         arg6 = CSLFromPyMapping(swig_obj[4], &bErr);
   28376           0 :         if ( bErr )
   28377             :         {
   28378           0 :           SWIG_fail;
   28379             :         }
   28380             :       }
   28381             :       else {
   28382           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   28383           0 :         SWIG_fail;
   28384             :       }
   28385             :     }
   28386             :   }
   28387         588 :   {
   28388         588 :     if (!arg2) {
   28389           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   28390             :     }
   28391             :   }
   28392         587 :   {
   28393         587 :     if (!arg5) {
   28394           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   28395             :     }
   28396             :   }
   28397         586 :   {
   28398         586 :     const int bLocalUseExceptions = GetUseExceptions();
   28399         586 :     if ( bLocalUseExceptions ) {
   28400         146 :       pushErrorHandler();
   28401             :     }
   28402         586 :     {
   28403         586 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   28404         586 :       result = (GDALMDArrayHS *)GDALGroupHS_CreateMDArray(arg1,(char const *)arg2,arg3,arg4,arg5,arg6);
   28405         586 :       SWIG_PYTHON_THREAD_END_ALLOW;
   28406             :     }
   28407         586 :     if ( bLocalUseExceptions ) {
   28408         146 :       popErrorHandler();
   28409             :     }
   28410             : #ifndef SED_HACKS
   28411             :     if ( bLocalUseExceptions ) {
   28412             :       CPLErr eclass = CPLGetLastErrorType();
   28413             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   28414             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   28415             :       }
   28416             :     }
   28417             : #endif
   28418             :   }
   28419         586 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_OWN |  0 );
   28420         586 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   28421         586 :   {
   28422             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDimensionHS **poObjects)*/
   28423         586 :     CPLFree( arg4 );
   28424             :   }
   28425         586 :   {
   28426             :     /* %typemap(freearg) char **dict */
   28427         586 :     CSLDestroy( arg6 );
   28428             :   }
   28429         597 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   28430             :   return resultobj;
   28431           5 : fail:
   28432           5 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   28433           5 :   {
   28434             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDimensionHS **poObjects)*/
   28435           5 :     CPLFree( arg4 );
   28436             :   }
   28437           5 :   {
   28438             :     /* %typemap(freearg) char **dict */
   28439           5 :     CSLDestroy( arg6 );
   28440             :   }
   28441             :   return NULL;
   28442             : }
   28443             : 
   28444             : 
   28445          20 : SWIGINTERN PyObject *_wrap_Group_DeleteMDArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   28446          20 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   28447          20 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   28448          20 :   char *arg2 = (char *) 0 ;
   28449          20 :   char **arg3 = (char **) 0 ;
   28450          20 :   void *argp1 = 0 ;
   28451          20 :   int res1 = 0 ;
   28452          20 :   int res2 ;
   28453          20 :   char *buf2 = 0 ;
   28454          20 :   int alloc2 = 0 ;
   28455          20 :   PyObject *swig_obj[3] ;
   28456          20 :   CPLErr result;
   28457             :   
   28458          20 :   if (!SWIG_Python_UnpackTuple(args, "Group_DeleteMDArray", 2, 3, swig_obj)) SWIG_fail;
   28459          20 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   28460          20 :   if (!SWIG_IsOK(res1)) {
   28461           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_DeleteMDArray" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   28462             :   }
   28463          20 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   28464          20 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   28465          20 :   if (!SWIG_IsOK(res2)) {
   28466           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_DeleteMDArray" "', argument " "2"" of type '" "char const *""'");
   28467             :   }
   28468          20 :   arg2 = reinterpret_cast< char * >(buf2);
   28469          20 :   if (swig_obj[2]) {
   28470           0 :     {
   28471             :       /* %typemap(in) char **dict */
   28472           0 :       arg3 = NULL;
   28473           0 :       if ( PySequence_Check( swig_obj[2] ) ) {
   28474           0 :         int bErr = FALSE;
   28475           0 :         arg3 = CSLFromPySequence(swig_obj[2], &bErr);
   28476           0 :         if ( bErr )
   28477             :         {
   28478           0 :           SWIG_fail;
   28479             :         }
   28480             :       }
   28481           0 :       else if ( PyMapping_Check( swig_obj[2] ) ) {
   28482           0 :         int bErr = FALSE;
   28483           0 :         arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
   28484           0 :         if ( bErr )
   28485             :         {
   28486           0 :           SWIG_fail;
   28487             :         }
   28488             :       }
   28489             :       else {
   28490           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   28491           0 :         SWIG_fail;
   28492             :       }
   28493             :     }
   28494             :   }
   28495          20 :   {
   28496          20 :     if (!arg2) {
   28497           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   28498             :     }
   28499             :   }
   28500          20 :   {
   28501          20 :     const int bLocalUseExceptions = GetUseExceptions();
   28502          20 :     if ( bLocalUseExceptions ) {
   28503          20 :       pushErrorHandler();
   28504             :     }
   28505          20 :     {
   28506          20 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   28507          40 :       CPL_IGNORE_RET_VAL(result = (CPLErr)GDALGroupHS_DeleteMDArray(arg1,(char const *)arg2,arg3));
   28508          20 :       SWIG_PYTHON_THREAD_END_ALLOW;
   28509             :     }
   28510          20 :     if ( bLocalUseExceptions ) {
   28511          20 :       popErrorHandler();
   28512             :     }
   28513             : #ifndef SED_HACKS
   28514             :     if ( bLocalUseExceptions ) {
   28515             :       CPLErr eclass = CPLGetLastErrorType();
   28516             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   28517             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   28518             :       }
   28519             :     }
   28520             : #endif
   28521             :   }
   28522          20 :   resultobj = SWIG_From_int(static_cast< int >(result));
   28523          20 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   28524          20 :   {
   28525             :     /* %typemap(freearg) char **dict */
   28526          20 :     CSLDestroy( arg3 );
   28527             :   }
   28528          33 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   28529             :   return resultobj;
   28530           0 : fail:
   28531           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   28532           0 :   {
   28533             :     /* %typemap(freearg) char **dict */
   28534           0 :     CSLDestroy( arg3 );
   28535             :   }
   28536             :   return NULL;
   28537             : }
   28538             : 
   28539             : 
   28540         106 : SWIGINTERN PyObject *_wrap_Group_CreateAttribute(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   28541         106 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   28542         106 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   28543         106 :   char *arg2 = (char *) 0 ;
   28544         106 :   int arg3 ;
   28545         106 :   GUIntBig *arg4 = (GUIntBig *) 0 ;
   28546         106 :   GDALExtendedDataTypeHS *arg5 = (GDALExtendedDataTypeHS *) 0 ;
   28547         106 :   char **arg6 = (char **) 0 ;
   28548         106 :   void *argp1 = 0 ;
   28549         106 :   int res1 = 0 ;
   28550         106 :   int res2 ;
   28551         106 :   char *buf2 = 0 ;
   28552         106 :   int alloc2 = 0 ;
   28553         106 :   void *argp5 = 0 ;
   28554         106 :   int res5 = 0 ;
   28555         106 :   PyObject *swig_obj[5] ;
   28556         106 :   GDALAttributeHS *result = 0 ;
   28557             :   
   28558         106 :   if (!SWIG_Python_UnpackTuple(args, "Group_CreateAttribute", 4, 5, swig_obj)) SWIG_fail;
   28559         106 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   28560         106 :   if (!SWIG_IsOK(res1)) {
   28561           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_CreateAttribute" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   28562             :   }
   28563         106 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   28564         106 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   28565         106 :   if (!SWIG_IsOK(res2)) {
   28566           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_CreateAttribute" "', argument " "2"" of type '" "char const *""'");
   28567             :   }
   28568         106 :   arg2 = reinterpret_cast< char * >(buf2);
   28569         106 :   {
   28570             :     /* %typemap(in,numinputs=1) (int nList, GUIntBig* pList)*/
   28571         106 :     arg4 = CreateCGUIntBigListFromSequence(swig_obj[2], &arg3);
   28572         106 :     if( arg3 < 0 ) {
   28573           0 :       SWIG_fail;
   28574             :     }
   28575             :   }
   28576         106 :   res5 = SWIG_ConvertPtr(swig_obj[3], &argp5,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   28577         106 :   if (!SWIG_IsOK(res5)) {
   28578           0 :     SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "Group_CreateAttribute" "', argument " "5"" of type '" "GDALExtendedDataTypeHS *""'"); 
   28579             :   }
   28580         106 :   arg5 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp5);
   28581         106 :   if (swig_obj[4]) {
   28582           6 :     {
   28583             :       /* %typemap(in) char **dict */
   28584           6 :       arg6 = NULL;
   28585           6 :       if ( PySequence_Check( swig_obj[4] ) ) {
   28586           6 :         int bErr = FALSE;
   28587           6 :         arg6 = CSLFromPySequence(swig_obj[4], &bErr);
   28588           6 :         if ( bErr )
   28589             :         {
   28590           0 :           SWIG_fail;
   28591             :         }
   28592             :       }
   28593           0 :       else if ( PyMapping_Check( swig_obj[4] ) ) {
   28594           0 :         int bErr = FALSE;
   28595           0 :         arg6 = CSLFromPyMapping(swig_obj[4], &bErr);
   28596           0 :         if ( bErr )
   28597             :         {
   28598           0 :           SWIG_fail;
   28599             :         }
   28600             :       }
   28601             :       else {
   28602           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   28603           0 :         SWIG_fail;
   28604             :       }
   28605             :     }
   28606             :   }
   28607         106 :   {
   28608         106 :     if (!arg2) {
   28609           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   28610             :     }
   28611             :   }
   28612         105 :   {
   28613         105 :     if (!arg5) {
   28614           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   28615             :     }
   28616             :   }
   28617         105 :   {
   28618         105 :     const int bLocalUseExceptions = GetUseExceptions();
   28619         105 :     if ( bLocalUseExceptions ) {
   28620          48 :       pushErrorHandler();
   28621             :     }
   28622         105 :     {
   28623         105 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   28624         105 :       result = (GDALAttributeHS *)GDALGroupHS_CreateAttribute(arg1,(char const *)arg2,arg3,arg4,arg5,arg6);
   28625         105 :       SWIG_PYTHON_THREAD_END_ALLOW;
   28626             :     }
   28627         105 :     if ( bLocalUseExceptions ) {
   28628          48 :       popErrorHandler();
   28629             :     }
   28630             : #ifndef SED_HACKS
   28631             :     if ( bLocalUseExceptions ) {
   28632             :       CPLErr eclass = CPLGetLastErrorType();
   28633             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   28634             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   28635             :       }
   28636             :     }
   28637             : #endif
   28638             :   }
   28639         105 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALAttributeHS, SWIG_POINTER_OWN |  0 );
   28640         105 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   28641         105 :   {
   28642             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   28643         105 :     free(arg4);
   28644             :   }
   28645         105 :   {
   28646             :     /* %typemap(freearg) char **dict */
   28647         105 :     CSLDestroy( arg6 );
   28648             :   }
   28649         107 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   28650             :   return resultobj;
   28651           1 : fail:
   28652           1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   28653           1 :   {
   28654             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   28655           1 :     free(arg4);
   28656             :   }
   28657           1 :   {
   28658             :     /* %typemap(freearg) char **dict */
   28659           1 :     CSLDestroy( arg6 );
   28660             :   }
   28661             :   return NULL;
   28662             : }
   28663             : 
   28664             : 
   28665          25 : SWIGINTERN PyObject *_wrap_Group_DeleteAttribute(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   28666          25 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   28667          25 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   28668          25 :   char *arg2 = (char *) 0 ;
   28669          25 :   char **arg3 = (char **) 0 ;
   28670          25 :   void *argp1 = 0 ;
   28671          25 :   int res1 = 0 ;
   28672          25 :   int res2 ;
   28673          25 :   char *buf2 = 0 ;
   28674          25 :   int alloc2 = 0 ;
   28675          25 :   PyObject *swig_obj[3] ;
   28676          25 :   CPLErr result;
   28677             :   
   28678          25 :   if (!SWIG_Python_UnpackTuple(args, "Group_DeleteAttribute", 2, 3, swig_obj)) SWIG_fail;
   28679          25 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   28680          25 :   if (!SWIG_IsOK(res1)) {
   28681           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_DeleteAttribute" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   28682             :   }
   28683          25 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   28684          25 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   28685          25 :   if (!SWIG_IsOK(res2)) {
   28686           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_DeleteAttribute" "', argument " "2"" of type '" "char const *""'");
   28687             :   }
   28688          25 :   arg2 = reinterpret_cast< char * >(buf2);
   28689          25 :   if (swig_obj[2]) {
   28690           0 :     {
   28691             :       /* %typemap(in) char **dict */
   28692           0 :       arg3 = NULL;
   28693           0 :       if ( PySequence_Check( swig_obj[2] ) ) {
   28694           0 :         int bErr = FALSE;
   28695           0 :         arg3 = CSLFromPySequence(swig_obj[2], &bErr);
   28696           0 :         if ( bErr )
   28697             :         {
   28698           0 :           SWIG_fail;
   28699             :         }
   28700             :       }
   28701           0 :       else if ( PyMapping_Check( swig_obj[2] ) ) {
   28702           0 :         int bErr = FALSE;
   28703           0 :         arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
   28704           0 :         if ( bErr )
   28705             :         {
   28706           0 :           SWIG_fail;
   28707             :         }
   28708             :       }
   28709             :       else {
   28710           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   28711           0 :         SWIG_fail;
   28712             :       }
   28713             :     }
   28714             :   }
   28715          25 :   {
   28716          25 :     if (!arg2) {
   28717           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   28718             :     }
   28719             :   }
   28720          25 :   {
   28721          25 :     const int bLocalUseExceptions = GetUseExceptions();
   28722          25 :     if ( bLocalUseExceptions ) {
   28723          25 :       pushErrorHandler();
   28724             :     }
   28725          25 :     {
   28726          25 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   28727          50 :       CPL_IGNORE_RET_VAL(result = (CPLErr)GDALGroupHS_DeleteAttribute(arg1,(char const *)arg2,arg3));
   28728          25 :       SWIG_PYTHON_THREAD_END_ALLOW;
   28729             :     }
   28730          25 :     if ( bLocalUseExceptions ) {
   28731          25 :       popErrorHandler();
   28732             :     }
   28733             : #ifndef SED_HACKS
   28734             :     if ( bLocalUseExceptions ) {
   28735             :       CPLErr eclass = CPLGetLastErrorType();
   28736             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   28737             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   28738             :       }
   28739             :     }
   28740             : #endif
   28741             :   }
   28742          25 :   resultobj = SWIG_From_int(static_cast< int >(result));
   28743          25 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   28744          25 :   {
   28745             :     /* %typemap(freearg) char **dict */
   28746          25 :     CSLDestroy( arg3 );
   28747             :   }
   28748          40 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   28749             :   return resultobj;
   28750           0 : fail:
   28751           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   28752           0 :   {
   28753             :     /* %typemap(freearg) char **dict */
   28754           0 :     CSLDestroy( arg3 );
   28755             :   }
   28756             :   return NULL;
   28757             : }
   28758             : 
   28759             : 
   28760          45 : SWIGINTERN PyObject *_wrap_Group_Rename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   28761          45 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   28762          45 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   28763          45 :   char *arg2 = (char *) 0 ;
   28764          45 :   void *argp1 = 0 ;
   28765          45 :   int res1 = 0 ;
   28766          45 :   int res2 ;
   28767          45 :   char *buf2 = 0 ;
   28768          45 :   int alloc2 = 0 ;
   28769          45 :   PyObject *swig_obj[2] ;
   28770          45 :   CPLErr result;
   28771             :   
   28772          45 :   if (!SWIG_Python_UnpackTuple(args, "Group_Rename", 2, 2, swig_obj)) SWIG_fail;
   28773          45 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   28774          45 :   if (!SWIG_IsOK(res1)) {
   28775           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_Rename" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   28776             :   }
   28777          45 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   28778          45 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   28779          45 :   if (!SWIG_IsOK(res2)) {
   28780           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_Rename" "', argument " "2"" of type '" "char const *""'");
   28781             :   }
   28782          45 :   arg2 = reinterpret_cast< char * >(buf2);
   28783          45 :   {
   28784          45 :     const int bLocalUseExceptions = GetUseExceptions();
   28785          45 :     if ( bLocalUseExceptions ) {
   28786          45 :       pushErrorHandler();
   28787             :     }
   28788          45 :     {
   28789          45 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   28790          90 :       CPL_IGNORE_RET_VAL(result = (CPLErr)GDALGroupHS_Rename(arg1,(char const *)arg2));
   28791          45 :       SWIG_PYTHON_THREAD_END_ALLOW;
   28792             :     }
   28793          45 :     if ( bLocalUseExceptions ) {
   28794          45 :       popErrorHandler();
   28795             :     }
   28796             : #ifndef SED_HACKS
   28797             :     if ( bLocalUseExceptions ) {
   28798             :       CPLErr eclass = CPLGetLastErrorType();
   28799             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   28800             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   28801             :       }
   28802             :     }
   28803             : #endif
   28804             :   }
   28805          45 :   resultobj = SWIG_From_int(static_cast< int >(result));
   28806          45 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   28807          82 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   28808             :   return resultobj;
   28809           0 : fail:
   28810           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   28811             :   return NULL;
   28812             : }
   28813             : 
   28814             : 
   28815          14 : SWIGINTERN PyObject *_wrap_Group_SubsetDimensionFromSelection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   28816          14 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   28817          14 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   28818          14 :   char *arg2 = (char *) 0 ;
   28819          14 :   char **arg3 = (char **) 0 ;
   28820          14 :   void *argp1 = 0 ;
   28821          14 :   int res1 = 0 ;
   28822          14 :   int res2 ;
   28823          14 :   char *buf2 = 0 ;
   28824          14 :   int alloc2 = 0 ;
   28825          14 :   PyObject *swig_obj[3] ;
   28826          14 :   GDALGroupHS *result = 0 ;
   28827             :   
   28828          14 :   if (!SWIG_Python_UnpackTuple(args, "Group_SubsetDimensionFromSelection", 2, 3, swig_obj)) SWIG_fail;
   28829          14 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   28830          14 :   if (!SWIG_IsOK(res1)) {
   28831           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_SubsetDimensionFromSelection" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   28832             :   }
   28833          14 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   28834          14 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   28835          14 :   if (!SWIG_IsOK(res2)) {
   28836           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_SubsetDimensionFromSelection" "', argument " "2"" of type '" "char const *""'");
   28837             :   }
   28838          14 :   arg2 = reinterpret_cast< char * >(buf2);
   28839          14 :   if (swig_obj[2]) {
   28840           0 :     {
   28841             :       /* %typemap(in) char **dict */
   28842           0 :       arg3 = NULL;
   28843           0 :       if ( PySequence_Check( swig_obj[2] ) ) {
   28844           0 :         int bErr = FALSE;
   28845           0 :         arg3 = CSLFromPySequence(swig_obj[2], &bErr);
   28846           0 :         if ( bErr )
   28847             :         {
   28848           0 :           SWIG_fail;
   28849             :         }
   28850             :       }
   28851           0 :       else if ( PyMapping_Check( swig_obj[2] ) ) {
   28852           0 :         int bErr = FALSE;
   28853           0 :         arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
   28854           0 :         if ( bErr )
   28855             :         {
   28856           0 :           SWIG_fail;
   28857             :         }
   28858             :       }
   28859             :       else {
   28860           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   28861           0 :         SWIG_fail;
   28862             :       }
   28863             :     }
   28864             :   }
   28865          14 :   {
   28866          14 :     const int bLocalUseExceptions = GetUseExceptions();
   28867          14 :     if ( bLocalUseExceptions ) {
   28868          13 :       pushErrorHandler();
   28869             :     }
   28870          14 :     {
   28871          14 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   28872          14 :       result = (GDALGroupHS *)GDALGroupHS_SubsetDimensionFromSelection(arg1,(char const *)arg2,arg3);
   28873          14 :       SWIG_PYTHON_THREAD_END_ALLOW;
   28874             :     }
   28875          14 :     if ( bLocalUseExceptions ) {
   28876          13 :       popErrorHandler();
   28877             :     }
   28878             : #ifndef SED_HACKS
   28879             :     if ( bLocalUseExceptions ) {
   28880             :       CPLErr eclass = CPLGetLastErrorType();
   28881             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   28882             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   28883             :       }
   28884             :     }
   28885             : #endif
   28886             :   }
   28887          14 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALGroupHS, SWIG_POINTER_OWN |  0 );
   28888          14 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   28889          14 :   {
   28890             :     /* %typemap(freearg) char **dict */
   28891          14 :     CSLDestroy( arg3 );
   28892             :   }
   28893          22 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   28894             :   return resultobj;
   28895           0 : fail:
   28896           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   28897           0 :   {
   28898             :     /* %typemap(freearg) char **dict */
   28899           0 :     CSLDestroy( arg3 );
   28900             :   }
   28901             :   return NULL;
   28902             : }
   28903             : 
   28904             : 
   28905         271 : SWIGINTERN PyObject *Group_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   28906         271 :   PyObject *obj;
   28907         271 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   28908         271 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALGroupHS, SWIG_NewClientData(obj));
   28909         271 :   return SWIG_Py_Void();
   28910             : }
   28911             : 
   28912          12 : SWIGINTERN PyObject *_wrap_Statistics_min_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   28913          12 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   28914          12 :   Statistics *arg1 = (Statistics *) 0 ;
   28915          12 :   void *argp1 = 0 ;
   28916          12 :   int res1 = 0 ;
   28917          12 :   PyObject *swig_obj[1] ;
   28918          12 :   double result;
   28919             :   
   28920          12 :   if (!args) SWIG_fail;
   28921          12 :   swig_obj[0] = args;
   28922          12 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Statistics, 0 |  0 );
   28923          12 :   if (!SWIG_IsOK(res1)) {
   28924           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Statistics_min_get" "', argument " "1"" of type '" "Statistics *""'"); 
   28925             :   }
   28926          12 :   arg1 = reinterpret_cast< Statistics * >(argp1);
   28927          12 :   {
   28928          12 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   28929          12 :     result = (double) ((arg1)->min);
   28930          12 :     SWIG_PYTHON_THREAD_END_ALLOW;
   28931             :   }
   28932          12 :   resultobj = SWIG_From_double(static_cast< double >(result));
   28933          12 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   28934             :   return resultobj;
   28935             : fail:
   28936             :   return NULL;
   28937             : }
   28938             : 
   28939             : 
   28940          12 : SWIGINTERN PyObject *_wrap_Statistics_max_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   28941          12 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   28942          12 :   Statistics *arg1 = (Statistics *) 0 ;
   28943          12 :   void *argp1 = 0 ;
   28944          12 :   int res1 = 0 ;
   28945          12 :   PyObject *swig_obj[1] ;
   28946          12 :   double result;
   28947             :   
   28948          12 :   if (!args) SWIG_fail;
   28949          12 :   swig_obj[0] = args;
   28950          12 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Statistics, 0 |  0 );
   28951          12 :   if (!SWIG_IsOK(res1)) {
   28952           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Statistics_max_get" "', argument " "1"" of type '" "Statistics *""'"); 
   28953             :   }
   28954          12 :   arg1 = reinterpret_cast< Statistics * >(argp1);
   28955          12 :   {
   28956          12 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   28957          12 :     result = (double) ((arg1)->max);
   28958          12 :     SWIG_PYTHON_THREAD_END_ALLOW;
   28959             :   }
   28960          12 :   resultobj = SWIG_From_double(static_cast< double >(result));
   28961          12 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   28962             :   return resultobj;
   28963             : fail:
   28964             :   return NULL;
   28965             : }
   28966             : 
   28967             : 
   28968           5 : SWIGINTERN PyObject *_wrap_Statistics_mean_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   28969           5 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   28970           5 :   Statistics *arg1 = (Statistics *) 0 ;
   28971           5 :   void *argp1 = 0 ;
   28972           5 :   int res1 = 0 ;
   28973           5 :   PyObject *swig_obj[1] ;
   28974           5 :   double result;
   28975             :   
   28976           5 :   if (!args) SWIG_fail;
   28977           5 :   swig_obj[0] = args;
   28978           5 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Statistics, 0 |  0 );
   28979           5 :   if (!SWIG_IsOK(res1)) {
   28980           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Statistics_mean_get" "', argument " "1"" of type '" "Statistics *""'"); 
   28981             :   }
   28982           5 :   arg1 = reinterpret_cast< Statistics * >(argp1);
   28983           5 :   {
   28984           5 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   28985           5 :     result = (double) ((arg1)->mean);
   28986           5 :     SWIG_PYTHON_THREAD_END_ALLOW;
   28987             :   }
   28988           5 :   resultobj = SWIG_From_double(static_cast< double >(result));
   28989           5 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   28990             :   return resultobj;
   28991             : fail:
   28992             :   return NULL;
   28993             : }
   28994             : 
   28995             : 
   28996           5 : SWIGINTERN PyObject *_wrap_Statistics_std_dev_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   28997           5 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   28998           5 :   Statistics *arg1 = (Statistics *) 0 ;
   28999           5 :   void *argp1 = 0 ;
   29000           5 :   int res1 = 0 ;
   29001           5 :   PyObject *swig_obj[1] ;
   29002           5 :   double result;
   29003             :   
   29004           5 :   if (!args) SWIG_fail;
   29005           5 :   swig_obj[0] = args;
   29006           5 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Statistics, 0 |  0 );
   29007           5 :   if (!SWIG_IsOK(res1)) {
   29008           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Statistics_std_dev_get" "', argument " "1"" of type '" "Statistics *""'"); 
   29009             :   }
   29010           5 :   arg1 = reinterpret_cast< Statistics * >(argp1);
   29011           5 :   {
   29012           5 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29013           5 :     result = (double) ((arg1)->std_dev);
   29014           5 :     SWIG_PYTHON_THREAD_END_ALLOW;
   29015             :   }
   29016           5 :   resultobj = SWIG_From_double(static_cast< double >(result));
   29017           5 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   29018             :   return resultobj;
   29019             : fail:
   29020             :   return NULL;
   29021             : }
   29022             : 
   29023             : 
   29024           5 : SWIGINTERN PyObject *_wrap_Statistics_valid_count_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29025           5 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29026           5 :   Statistics *arg1 = (Statistics *) 0 ;
   29027           5 :   void *argp1 = 0 ;
   29028           5 :   int res1 = 0 ;
   29029           5 :   PyObject *swig_obj[1] ;
   29030           5 :   GIntBig result;
   29031             :   
   29032           5 :   if (!args) SWIG_fail;
   29033           5 :   swig_obj[0] = args;
   29034           5 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Statistics, 0 |  0 );
   29035           5 :   if (!SWIG_IsOK(res1)) {
   29036           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Statistics_valid_count_get" "', argument " "1"" of type '" "Statistics *""'"); 
   29037             :   }
   29038           5 :   arg1 = reinterpret_cast< Statistics * >(argp1);
   29039           5 :   {
   29040           5 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29041           5 :     result =  ((arg1)->valid_count);
   29042           5 :     SWIG_PYTHON_THREAD_END_ALLOW;
   29043             :   }
   29044           5 :   {
   29045           5 :     resultobj = PyLong_FromLongLong(result);
   29046             :   }
   29047           5 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   29048             :   return resultobj;
   29049             : fail:
   29050             :   return NULL;
   29051             : }
   29052             : 
   29053             : 
   29054           0 : SWIGINTERN PyObject *_wrap_delete_Statistics(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29055           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29056           0 :   Statistics *arg1 = (Statistics *) 0 ;
   29057           0 :   void *argp1 = 0 ;
   29058           0 :   int res1 = 0 ;
   29059           0 :   PyObject *swig_obj[1] ;
   29060             :   
   29061           0 :   if (!args) SWIG_fail;
   29062           0 :   swig_obj[0] = args;
   29063           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Statistics, SWIG_POINTER_DISOWN |  0 );
   29064           0 :   if (!SWIG_IsOK(res1)) {
   29065           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Statistics" "', argument " "1"" of type '" "Statistics *""'"); 
   29066             :   }
   29067           0 :   arg1 = reinterpret_cast< Statistics * >(argp1);
   29068           0 :   {
   29069           0 :     const int bLocalUseExceptions = GetUseExceptions();
   29070           0 :     if ( bLocalUseExceptions ) {
   29071           0 :       pushErrorHandler();
   29072             :     }
   29073           0 :     {
   29074           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29075           0 :       delete_Statistics(arg1);
   29076           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29077             :     }
   29078           0 :     if ( bLocalUseExceptions ) {
   29079           0 :       popErrorHandler();
   29080             :     }
   29081             : #ifndef SED_HACKS
   29082             :     if ( bLocalUseExceptions ) {
   29083             :       CPLErr eclass = CPLGetLastErrorType();
   29084             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29085             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29086             :       }
   29087             :     }
   29088             : #endif
   29089             :   }
   29090           0 :   resultobj = SWIG_Py_Void();
   29091           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   29092             :   return resultobj;
   29093             : fail:
   29094             :   return NULL;
   29095             : }
   29096             : 
   29097             : 
   29098           0 : SWIGINTERN PyObject *_wrap_new_Statistics(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29099           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29100           0 :   Statistics *result = 0 ;
   29101             :   
   29102           0 :   if (!SWIG_Python_UnpackTuple(args, "new_Statistics", 0, 0, 0)) SWIG_fail;
   29103           0 :   {
   29104           0 :     const int bLocalUseExceptions = GetUseExceptions();
   29105           0 :     if ( bLocalUseExceptions ) {
   29106           0 :       pushErrorHandler();
   29107             :     }
   29108           0 :     {
   29109           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29110           0 :       result = (Statistics *)new Statistics();
   29111           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29112             :     }
   29113           0 :     if ( bLocalUseExceptions ) {
   29114           0 :       popErrorHandler();
   29115             :     }
   29116             : #ifndef SED_HACKS
   29117             :     if ( bLocalUseExceptions ) {
   29118             :       CPLErr eclass = CPLGetLastErrorType();
   29119             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29120             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29121             :       }
   29122             :     }
   29123             : #endif
   29124             :   }
   29125           0 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Statistics, SWIG_POINTER_NEW |  0 );
   29126           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   29127             :   return resultobj;
   29128           0 : fail:
   29129           0 :   return NULL;
   29130             : }
   29131             : 
   29132             : 
   29133         271 : SWIGINTERN PyObject *Statistics_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29134         271 :   PyObject *obj;
   29135         271 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   29136         271 :   SWIG_TypeNewClientData(SWIGTYPE_p_Statistics, SWIG_NewClientData(obj));
   29137         271 :   return SWIG_Py_Void();
   29138             : }
   29139             : 
   29140           0 : SWIGINTERN PyObject *Statistics_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29141           0 :   return SWIG_Python_InitShadowInstance(args);
   29142             : }
   29143             : 
   29144        1935 : SWIGINTERN PyObject *_wrap_delete_MDArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29145        1935 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29146        1935 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   29147        1935 :   void *argp1 = 0 ;
   29148        1935 :   int res1 = 0 ;
   29149        1935 :   PyObject *swig_obj[1] ;
   29150             :   
   29151        1935 :   if (!args) SWIG_fail;
   29152        1935 :   swig_obj[0] = args;
   29153        1935 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_DISOWN |  0 );
   29154        1935 :   if (!SWIG_IsOK(res1)) {
   29155           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MDArray" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   29156             :   }
   29157        1935 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   29158        1935 :   {
   29159        1935 :     const int bLocalUseExceptions = GetUseExceptions();
   29160        1935 :     if ( bLocalUseExceptions ) {
   29161         388 :       pushErrorHandler();
   29162             :     }
   29163        1935 :     {
   29164        1935 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29165        1935 :       delete_GDALMDArrayHS(arg1);
   29166        1935 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29167             :     }
   29168        1935 :     if ( bLocalUseExceptions ) {
   29169         388 :       popErrorHandler();
   29170             :     }
   29171             : #ifndef SED_HACKS
   29172             :     if ( bLocalUseExceptions ) {
   29173             :       CPLErr eclass = CPLGetLastErrorType();
   29174             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29175             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29176             :       }
   29177             :     }
   29178             : #endif
   29179             :   }
   29180        1935 :   resultobj = SWIG_Py_Void();
   29181        1935 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   29182             :   return resultobj;
   29183             : fail:
   29184             :   return NULL;
   29185             : }
   29186             : 
   29187             : 
   29188          83 : SWIGINTERN PyObject *_wrap_MDArray_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29189          83 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29190          83 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   29191          83 :   void *argp1 = 0 ;
   29192          83 :   int res1 = 0 ;
   29193          83 :   PyObject *swig_obj[1] ;
   29194          83 :   char *result = 0 ;
   29195             :   
   29196          83 :   if (!args) SWIG_fail;
   29197          83 :   swig_obj[0] = args;
   29198          83 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   29199          83 :   if (!SWIG_IsOK(res1)) {
   29200           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetName" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   29201             :   }
   29202          83 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   29203          83 :   {
   29204          83 :     const int bLocalUseExceptions = GetUseExceptions();
   29205          83 :     if ( bLocalUseExceptions ) {
   29206          27 :       pushErrorHandler();
   29207             :     }
   29208          83 :     {
   29209          83 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29210          83 :       result = (char *)GDALMDArrayHS_GetName(arg1);
   29211          83 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29212             :     }
   29213          83 :     if ( bLocalUseExceptions ) {
   29214          27 :       popErrorHandler();
   29215             :     }
   29216             : #ifndef SED_HACKS
   29217             :     if ( bLocalUseExceptions ) {
   29218             :       CPLErr eclass = CPLGetLastErrorType();
   29219             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29220             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29221             :       }
   29222             :     }
   29223             : #endif
   29224             :   }
   29225          83 :   resultobj = SWIG_FromCharPtr((const char *)result);
   29226          83 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   29227             :   return resultobj;
   29228             : fail:
   29229             :   return NULL;
   29230             : }
   29231             : 
   29232             : 
   29233          50 : SWIGINTERN PyObject *_wrap_MDArray_GetFullName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29234          50 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29235          50 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   29236          50 :   void *argp1 = 0 ;
   29237          50 :   int res1 = 0 ;
   29238          50 :   PyObject *swig_obj[1] ;
   29239          50 :   char *result = 0 ;
   29240             :   
   29241          50 :   if (!args) SWIG_fail;
   29242          50 :   swig_obj[0] = args;
   29243          50 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   29244          50 :   if (!SWIG_IsOK(res1)) {
   29245           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetFullName" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   29246             :   }
   29247          50 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   29248          50 :   {
   29249          50 :     const int bLocalUseExceptions = GetUseExceptions();
   29250          50 :     if ( bLocalUseExceptions ) {
   29251          27 :       pushErrorHandler();
   29252             :     }
   29253          50 :     {
   29254          50 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29255          50 :       result = (char *)GDALMDArrayHS_GetFullName(arg1);
   29256          50 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29257             :     }
   29258          50 :     if ( bLocalUseExceptions ) {
   29259          27 :       popErrorHandler();
   29260             :     }
   29261             : #ifndef SED_HACKS
   29262             :     if ( bLocalUseExceptions ) {
   29263             :       CPLErr eclass = CPLGetLastErrorType();
   29264             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29265             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29266             :       }
   29267             :     }
   29268             : #endif
   29269             :   }
   29270          50 :   resultobj = SWIG_FromCharPtr((const char *)result);
   29271          50 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   29272             :   return resultobj;
   29273             : fail:
   29274             :   return NULL;
   29275             : }
   29276             : 
   29277             : 
   29278           6 : SWIGINTERN PyObject *_wrap_MDArray_GetTotalElementsCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29279           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29280           6 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   29281           6 :   void *argp1 = 0 ;
   29282           6 :   int res1 = 0 ;
   29283           6 :   PyObject *swig_obj[1] ;
   29284           6 :   GUIntBig result;
   29285             :   
   29286           6 :   if (!args) SWIG_fail;
   29287           6 :   swig_obj[0] = args;
   29288           6 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   29289           6 :   if (!SWIG_IsOK(res1)) {
   29290           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetTotalElementsCount" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   29291             :   }
   29292           6 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   29293           6 :   {
   29294           6 :     const int bLocalUseExceptions = GetUseExceptions();
   29295           6 :     if ( bLocalUseExceptions ) {
   29296           0 :       pushErrorHandler();
   29297             :     }
   29298           6 :     {
   29299           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29300           6 :       result = GDALMDArrayHS_GetTotalElementsCount(arg1);
   29301           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29302             :     }
   29303           6 :     if ( bLocalUseExceptions ) {
   29304           0 :       popErrorHandler();
   29305             :     }
   29306             : #ifndef SED_HACKS
   29307             :     if ( bLocalUseExceptions ) {
   29308             :       CPLErr eclass = CPLGetLastErrorType();
   29309             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29310             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29311             :       }
   29312             :     }
   29313             : #endif
   29314             :   }
   29315           6 :   {
   29316           6 :     resultobj = PyLong_FromUnsignedLongLong(result);
   29317             :   }
   29318           6 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   29319             :   return resultobj;
   29320             : fail:
   29321             :   return NULL;
   29322             : }
   29323             : 
   29324             : 
   29325        3343 : SWIGINTERN PyObject *_wrap_MDArray_GetDimensionCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29326        3343 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29327        3343 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   29328        3343 :   void *argp1 = 0 ;
   29329        3343 :   int res1 = 0 ;
   29330        3343 :   PyObject *swig_obj[1] ;
   29331        3343 :   size_t result;
   29332             :   
   29333        3343 :   if (!args) SWIG_fail;
   29334        3343 :   swig_obj[0] = args;
   29335        3343 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   29336        3343 :   if (!SWIG_IsOK(res1)) {
   29337           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetDimensionCount" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   29338             :   }
   29339        3343 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   29340        3343 :   {
   29341        3343 :     const int bLocalUseExceptions = GetUseExceptions();
   29342        3343 :     if ( bLocalUseExceptions ) {
   29343         356 :       pushErrorHandler();
   29344             :     }
   29345        3343 :     {
   29346        3343 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29347        3343 :       result = GDALMDArrayHS_GetDimensionCount(arg1);
   29348        3343 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29349             :     }
   29350        3343 :     if ( bLocalUseExceptions ) {
   29351         356 :       popErrorHandler();
   29352             :     }
   29353             : #ifndef SED_HACKS
   29354             :     if ( bLocalUseExceptions ) {
   29355             :       CPLErr eclass = CPLGetLastErrorType();
   29356             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29357             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29358             :       }
   29359             :     }
   29360             : #endif
   29361             :   }
   29362        3343 :   resultobj = SWIG_From_size_t(static_cast< size_t >(result));
   29363        3343 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   29364             :   return resultobj;
   29365             : fail:
   29366             :   return NULL;
   29367             : }
   29368             : 
   29369             : 
   29370        2179 : SWIGINTERN PyObject *_wrap_MDArray_GetDimensions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29371        2179 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29372        2179 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   29373        2179 :   GDALDimensionHS ***arg2 = (GDALDimensionHS ***) 0 ;
   29374        2179 :   size_t *arg3 = (size_t *) 0 ;
   29375        2179 :   void *argp1 = 0 ;
   29376        2179 :   int res1 = 0 ;
   29377        2179 :   GDALDimensionHS **dims2 = 0 ;
   29378        2179 :   size_t nCount2 = 0 ;
   29379        2179 :   PyObject *swig_obj[1] ;
   29380             :   
   29381        2179 :   {
   29382             :     /* %typemap(in,numinputs=0) (GDALDimensionHS*** pdims, size_t* pnCount) */
   29383        2179 :     arg2 = &dims2;
   29384        2179 :     arg3 = &nCount2;
   29385             :   }
   29386        2179 :   if (!args) SWIG_fail;
   29387        2179 :   swig_obj[0] = args;
   29388        2179 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   29389        2179 :   if (!SWIG_IsOK(res1)) {
   29390           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetDimensions" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   29391             :   }
   29392        2179 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   29393        2179 :   {
   29394        2179 :     const int bLocalUseExceptions = GetUseExceptions();
   29395        2179 :     if ( bLocalUseExceptions ) {
   29396         243 :       pushErrorHandler();
   29397             :     }
   29398        2179 :     {
   29399        2179 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29400        2179 :       GDALMDArrayHS_GetDimensions(arg1,arg2,arg3);
   29401        2179 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29402             :     }
   29403        2179 :     if ( bLocalUseExceptions ) {
   29404         243 :       popErrorHandler();
   29405             :     }
   29406             : #ifndef SED_HACKS
   29407             :     if ( bLocalUseExceptions ) {
   29408             :       CPLErr eclass = CPLGetLastErrorType();
   29409             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29410             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29411             :       }
   29412             :     }
   29413             : #endif
   29414             :   }
   29415        2179 :   resultobj = SWIG_Py_Void();
   29416        2179 :   {
   29417             :     /* %typemap(argout) (GDALDimensionHS*** pdims, size_t* pnCount) */
   29418        2179 :     Py_DECREF(resultobj);
   29419        2179 :     resultobj = PyList_New( *arg3 );
   29420        2179 :     if( !resultobj ) {
   29421           0 :       SWIG_fail;
   29422             :     }
   29423        6121 :     for( size_t i = 0; i < *arg3; i++ ) {
   29424        3942 :       PyList_SetItem(resultobj, i,
   29425        3942 :         SWIG_NewPointerObj((void*)(*arg2)[i],SWIGTYPE_p_GDALDimensionHS,SWIG_POINTER_OWN) );
   29426             :       /* We have borrowed the GDALDimensionHS */
   29427        3942 :       (*arg2)[i] = NULL;
   29428             :     }
   29429             :   }
   29430        2179 :   {
   29431             :     /* %typemap(freearg) (GDALDimensionHS*** pdims, size_t* pnCount) */
   29432        2179 :     GDALReleaseDimensions(*arg2, *arg3);
   29433             :   }
   29434        2179 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   29435             :   return resultobj;
   29436           0 : fail:
   29437           0 :   {
   29438             :     /* %typemap(freearg) (GDALDimensionHS*** pdims, size_t* pnCount) */
   29439           0 :     GDALReleaseDimensions(*arg2, *arg3);
   29440             :   }
   29441             :   return NULL;
   29442             : }
   29443             : 
   29444             : 
   29445          13 : SWIGINTERN PyObject *_wrap_MDArray_GetCoordinateVariables(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29446          13 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29447          13 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   29448          13 :   GDALMDArrayHS ***arg2 = (GDALMDArrayHS ***) 0 ;
   29449          13 :   size_t *arg3 = (size_t *) 0 ;
   29450          13 :   void *argp1 = 0 ;
   29451          13 :   int res1 = 0 ;
   29452          13 :   GDALMDArrayHS **arrays2 = 0 ;
   29453          13 :   size_t nCount2 = 0 ;
   29454          13 :   PyObject *swig_obj[1] ;
   29455             :   
   29456          13 :   {
   29457             :     /* %typemap(in,numinputs=0) (GDALMDArrayHS*** parrays, size_t* pnCount) */
   29458          13 :     arg2 = &arrays2;
   29459          13 :     arg3 = &nCount2;
   29460             :   }
   29461          13 :   if (!args) SWIG_fail;
   29462          13 :   swig_obj[0] = args;
   29463          13 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   29464          13 :   if (!SWIG_IsOK(res1)) {
   29465           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetCoordinateVariables" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   29466             :   }
   29467          13 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   29468          13 :   {
   29469          13 :     const int bLocalUseExceptions = GetUseExceptions();
   29470          13 :     if ( bLocalUseExceptions ) {
   29471           3 :       pushErrorHandler();
   29472             :     }
   29473          13 :     {
   29474          13 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29475          13 :       GDALMDArrayHS_GetCoordinateVariables(arg1,arg2,arg3);
   29476          13 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29477             :     }
   29478          13 :     if ( bLocalUseExceptions ) {
   29479           3 :       popErrorHandler();
   29480             :     }
   29481             : #ifndef SED_HACKS
   29482             :     if ( bLocalUseExceptions ) {
   29483             :       CPLErr eclass = CPLGetLastErrorType();
   29484             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29485             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29486             :       }
   29487             :     }
   29488             : #endif
   29489             :   }
   29490          13 :   resultobj = SWIG_Py_Void();
   29491          13 :   {
   29492             :     /* %typemap(argout) (GDALMDArrayHS*** parrays, size_t* pnCount) */
   29493          13 :     Py_DECREF(resultobj);
   29494          13 :     resultobj = PyList_New( *arg3 );
   29495          13 :     if( !resultobj ) {
   29496           0 :       SWIG_fail;
   29497             :     }
   29498          29 :     for( size_t i = 0; i < *arg3; i++ ) {
   29499          16 :       PyList_SetItem(resultobj, i,
   29500          16 :         SWIG_NewPointerObj((void*)(*arg2)[i],SWIGTYPE_p_GDALMDArrayHS,SWIG_POINTER_OWN) );
   29501             :       /* We have borrowed the GDALMDArrayHS */
   29502          16 :       (*arg2)[i] = NULL;
   29503             :     }
   29504             :   }
   29505          13 :   {
   29506             :     /* %typemap(freearg) (GDALMDArrayHS*** parrays, size_t* pnCount) */
   29507          13 :     GDALReleaseArrays(*arg2, *arg3);
   29508             :   }
   29509          13 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   29510             :   return resultobj;
   29511           0 : fail:
   29512           0 :   {
   29513             :     /* %typemap(freearg) (GDALMDArrayHS*** parrays, size_t* pnCount) */
   29514           0 :     GDALReleaseArrays(*arg2, *arg3);
   29515             :   }
   29516             :   return NULL;
   29517             : }
   29518             : 
   29519             : 
   29520          93 : SWIGINTERN PyObject *_wrap_MDArray_GetBlockSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29521          93 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29522          93 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   29523          93 :   GUIntBig **arg2 = (GUIntBig **) 0 ;
   29524          93 :   size_t *arg3 = (size_t *) 0 ;
   29525          93 :   void *argp1 = 0 ;
   29526          93 :   int res1 = 0 ;
   29527          93 :   GUIntBig *vals2 = 0 ;
   29528          93 :   size_t nCount2 = 0 ;
   29529          93 :   PyObject *swig_obj[1] ;
   29530             :   
   29531          93 :   {
   29532             :     /* %typemap(in,numinputs=0) (GUIntBig** pvals, size_t* pnCount) */
   29533          93 :     arg2 = &vals2;
   29534          93 :     arg3 = &nCount2;
   29535             :   }
   29536          93 :   if (!args) SWIG_fail;
   29537          93 :   swig_obj[0] = args;
   29538          93 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   29539          93 :   if (!SWIG_IsOK(res1)) {
   29540           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetBlockSize" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   29541             :   }
   29542          93 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   29543          93 :   {
   29544          93 :     const int bLocalUseExceptions = GetUseExceptions();
   29545          93 :     if ( bLocalUseExceptions ) {
   29546           3 :       pushErrorHandler();
   29547             :     }
   29548          93 :     {
   29549          93 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29550          93 :       GDALMDArrayHS_GetBlockSize(arg1,arg2,arg3);
   29551          93 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29552             :     }
   29553          93 :     if ( bLocalUseExceptions ) {
   29554           3 :       popErrorHandler();
   29555             :     }
   29556             : #ifndef SED_HACKS
   29557             :     if ( bLocalUseExceptions ) {
   29558             :       CPLErr eclass = CPLGetLastErrorType();
   29559             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29560             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29561             :       }
   29562             :     }
   29563             : #endif
   29564             :   }
   29565          93 :   resultobj = SWIG_Py_Void();
   29566          93 :   {
   29567             :     /* %typemap(argout) (GUIntBig** pvals, size_t* pnCount) */
   29568          93 :     Py_DECREF(resultobj);
   29569          93 :     resultobj = PyList_New( *arg3 );
   29570          93 :     if( !resultobj ) {
   29571           0 :       SWIG_fail;
   29572             :     }
   29573         285 :     for( size_t i = 0; i < *arg3; i++ ) {
   29574         192 :       char szTmp[32];
   29575         192 :       sprintf(szTmp, CPL_FRMT_GUIB, (*arg2)[i]);
   29576         192 :       PyObject *o = PyLong_FromString(szTmp, NULL, 10);
   29577         192 :       PyList_SetItem(resultobj, i, o );
   29578             :     }
   29579             :   }
   29580          93 :   {
   29581             :     /* %typemap(freearg) (GUIntBig** pvals, size_t* pnCount) */
   29582          93 :     CPLFree(*arg2);
   29583             :   }
   29584          93 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   29585             :   return resultobj;
   29586           0 : fail:
   29587           0 :   {
   29588             :     /* %typemap(freearg) (GUIntBig** pvals, size_t* pnCount) */
   29589           0 :     CPLFree(*arg2);
   29590             :   }
   29591             :   return NULL;
   29592             : }
   29593             : 
   29594             : 
   29595           1 : SWIGINTERN PyObject *_wrap_MDArray_GetProcessingChunkSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29596           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29597           1 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   29598           1 :   size_t arg2 ;
   29599           1 :   GUIntBig **arg3 = (GUIntBig **) 0 ;
   29600           1 :   size_t *arg4 = (size_t *) 0 ;
   29601           1 :   void *argp1 = 0 ;
   29602           1 :   int res1 = 0 ;
   29603           1 :   size_t val2 ;
   29604           1 :   int ecode2 = 0 ;
   29605           1 :   GUIntBig *vals3 = 0 ;
   29606           1 :   size_t nCount3 = 0 ;
   29607           1 :   PyObject *swig_obj[2] ;
   29608             :   
   29609           1 :   {
   29610             :     /* %typemap(in,numinputs=0) (GUIntBig** pvals, size_t* pnCount) */
   29611           1 :     arg3 = &vals3;
   29612           1 :     arg4 = &nCount3;
   29613             :   }
   29614           1 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_GetProcessingChunkSize", 2, 2, swig_obj)) SWIG_fail;
   29615           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   29616           1 :   if (!SWIG_IsOK(res1)) {
   29617           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetProcessingChunkSize" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   29618             :   }
   29619           1 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   29620           1 :   ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2);
   29621           1 :   if (!SWIG_IsOK(ecode2)) {
   29622           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MDArray_GetProcessingChunkSize" "', argument " "2"" of type '" "size_t""'");
   29623             :   } 
   29624           1 :   arg2 = static_cast< size_t >(val2);
   29625           1 :   {
   29626           1 :     const int bLocalUseExceptions = GetUseExceptions();
   29627           1 :     if ( bLocalUseExceptions ) {
   29628           0 :       pushErrorHandler();
   29629             :     }
   29630           1 :     {
   29631           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29632           1 :       GDALMDArrayHS_GetProcessingChunkSize(arg1,arg2,arg3,arg4);
   29633           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29634             :     }
   29635           1 :     if ( bLocalUseExceptions ) {
   29636           0 :       popErrorHandler();
   29637             :     }
   29638             : #ifndef SED_HACKS
   29639             :     if ( bLocalUseExceptions ) {
   29640             :       CPLErr eclass = CPLGetLastErrorType();
   29641             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29642             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29643             :       }
   29644             :     }
   29645             : #endif
   29646             :   }
   29647           1 :   resultobj = SWIG_Py_Void();
   29648           1 :   {
   29649             :     /* %typemap(argout) (GUIntBig** pvals, size_t* pnCount) */
   29650           1 :     Py_DECREF(resultobj);
   29651           1 :     resultobj = PyList_New( *arg4 );
   29652           1 :     if( !resultobj ) {
   29653           0 :       SWIG_fail;
   29654             :     }
   29655           3 :     for( size_t i = 0; i < *arg4; i++ ) {
   29656           2 :       char szTmp[32];
   29657           2 :       sprintf(szTmp, CPL_FRMT_GUIB, (*arg3)[i]);
   29658           2 :       PyObject *o = PyLong_FromString(szTmp, NULL, 10);
   29659           2 :       PyList_SetItem(resultobj, i, o );
   29660             :     }
   29661             :   }
   29662           1 :   {
   29663             :     /* %typemap(freearg) (GUIntBig** pvals, size_t* pnCount) */
   29664           1 :     CPLFree(*arg3);
   29665             :   }
   29666           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   29667             :   return resultobj;
   29668           0 : fail:
   29669           0 :   {
   29670             :     /* %typemap(freearg) (GUIntBig** pvals, size_t* pnCount) */
   29671           0 :     CPLFree(*arg3);
   29672             :   }
   29673             :   return NULL;
   29674             : }
   29675             : 
   29676             : 
   29677        1872 : SWIGINTERN PyObject *_wrap_MDArray_GetDataType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29678        1872 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29679        1872 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   29680        1872 :   void *argp1 = 0 ;
   29681        1872 :   int res1 = 0 ;
   29682        1872 :   PyObject *swig_obj[1] ;
   29683        1872 :   GDALExtendedDataTypeHS *result = 0 ;
   29684             :   
   29685        1872 :   if (!args) SWIG_fail;
   29686        1872 :   swig_obj[0] = args;
   29687        1872 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   29688        1872 :   if (!SWIG_IsOK(res1)) {
   29689           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetDataType" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   29690             :   }
   29691        1872 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   29692        1872 :   {
   29693        1872 :     const int bLocalUseExceptions = GetUseExceptions();
   29694        1872 :     if ( bLocalUseExceptions ) {
   29695         332 :       pushErrorHandler();
   29696             :     }
   29697        1872 :     {
   29698        1872 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29699        1872 :       result = (GDALExtendedDataTypeHS *)GDALMDArrayHS_GetDataType(arg1);
   29700        1872 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29701             :     }
   29702        1872 :     if ( bLocalUseExceptions ) {
   29703         332 :       popErrorHandler();
   29704             :     }
   29705             : #ifndef SED_HACKS
   29706             :     if ( bLocalUseExceptions ) {
   29707             :       CPLErr eclass = CPLGetLastErrorType();
   29708             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29709             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29710             :       }
   29711             :     }
   29712             : #endif
   29713             :   }
   29714        1872 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALExtendedDataTypeHS, SWIG_POINTER_OWN |  0 );
   29715        1872 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   29716             :   return resultobj;
   29717             : fail:
   29718             :   return NULL;
   29719             : }
   29720             : 
   29721             : 
   29722           5 : SWIGINTERN PyObject *_wrap_MDArray_GetStructuralInfo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29723           5 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29724           5 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   29725           5 :   void *argp1 = 0 ;
   29726           5 :   int res1 = 0 ;
   29727           5 :   PyObject *swig_obj[1] ;
   29728           5 :   char **result = 0 ;
   29729             :   
   29730           5 :   if (!args) SWIG_fail;
   29731           5 :   swig_obj[0] = args;
   29732           5 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   29733           5 :   if (!SWIG_IsOK(res1)) {
   29734           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetStructuralInfo" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   29735             :   }
   29736           5 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   29737           5 :   {
   29738           5 :     const int bLocalUseExceptions = GetUseExceptions();
   29739           5 :     if ( bLocalUseExceptions ) {
   29740           2 :       pushErrorHandler();
   29741             :     }
   29742           5 :     {
   29743           5 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29744           5 :       result = (char **)GDALMDArrayHS_GetStructuralInfo(arg1);
   29745           5 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29746             :     }
   29747           5 :     if ( bLocalUseExceptions ) {
   29748           2 :       popErrorHandler();
   29749             :     }
   29750             : #ifndef SED_HACKS
   29751             :     if ( bLocalUseExceptions ) {
   29752             :       CPLErr eclass = CPLGetLastErrorType();
   29753             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29754             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29755             :       }
   29756             :     }
   29757             : #endif
   29758             :   }
   29759           5 :   {
   29760             :     /* %typemap(out) char **dict */
   29761           5 :     resultobj = GetCSLStringAsPyDict(result, false);
   29762             :   }
   29763           5 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   29764             :   return resultobj;
   29765             : fail:
   29766             :   return NULL;
   29767             : }
   29768             : 
   29769             : 
   29770          44 : SWIGINTERN PyObject *_wrap_MDArray_Resize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29771          44 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29772          44 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   29773          44 :   int arg2 ;
   29774          44 :   GUIntBig *arg3 = (GUIntBig *) 0 ;
   29775          44 :   char **arg4 = (char **) NULL ;
   29776          44 :   void *argp1 = 0 ;
   29777          44 :   int res1 = 0 ;
   29778          44 :   PyObject *swig_obj[3] ;
   29779          44 :   CPLErr result;
   29780             :   
   29781          44 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_Resize", 2, 3, swig_obj)) SWIG_fail;
   29782          44 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   29783          44 :   if (!SWIG_IsOK(res1)) {
   29784           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_Resize" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   29785             :   }
   29786          44 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   29787          44 :   {
   29788             :     /* %typemap(in,numinputs=1) (int nList, GUIntBig* pList)*/
   29789          44 :     arg3 = CreateCGUIntBigListFromSequence(swig_obj[1], &arg2);
   29790          44 :     if( arg2 < 0 ) {
   29791           0 :       SWIG_fail;
   29792             :     }
   29793             :   }
   29794          44 :   if (swig_obj[2]) {
   29795           0 :     {
   29796             :       /* %typemap(in) char **dict */
   29797           0 :       arg4 = NULL;
   29798           0 :       if ( PySequence_Check( swig_obj[2] ) ) {
   29799           0 :         int bErr = FALSE;
   29800           0 :         arg4 = CSLFromPySequence(swig_obj[2], &bErr);
   29801           0 :         if ( bErr )
   29802             :         {
   29803           0 :           SWIG_fail;
   29804             :         }
   29805             :       }
   29806           0 :       else if ( PyMapping_Check( swig_obj[2] ) ) {
   29807           0 :         int bErr = FALSE;
   29808           0 :         arg4 = CSLFromPyMapping(swig_obj[2], &bErr);
   29809           0 :         if ( bErr )
   29810             :         {
   29811           0 :           SWIG_fail;
   29812             :         }
   29813             :       }
   29814             :       else {
   29815           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   29816           0 :         SWIG_fail;
   29817             :       }
   29818             :     }
   29819             :   }
   29820          44 :   {
   29821          44 :     const int bLocalUseExceptions = GetUseExceptions();
   29822          44 :     if ( bLocalUseExceptions ) {
   29823           0 :       pushErrorHandler();
   29824             :     }
   29825          44 :     {
   29826          44 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29827          44 :       CPL_IGNORE_RET_VAL(result = (CPLErr)GDALMDArrayHS_Resize(arg1,arg2,arg3,arg4));
   29828          44 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29829             :     }
   29830          44 :     if ( bLocalUseExceptions ) {
   29831           0 :       popErrorHandler();
   29832             :     }
   29833             : #ifndef SED_HACKS
   29834             :     if ( bLocalUseExceptions ) {
   29835             :       CPLErr eclass = CPLGetLastErrorType();
   29836             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29837             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29838             :       }
   29839             :     }
   29840             : #endif
   29841             :   }
   29842          44 :   resultobj = SWIG_From_int(static_cast< int >(result));
   29843          44 :   {
   29844             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   29845          44 :     free(arg3);
   29846             :   }
   29847          44 :   {
   29848             :     /* %typemap(freearg) char **dict */
   29849          44 :     CSLDestroy( arg4 );
   29850             :   }
   29851          44 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   29852             :   return resultobj;
   29853           0 : fail:
   29854           0 :   {
   29855             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   29856           0 :     free(arg3);
   29857             :   }
   29858           0 :   {
   29859             :     /* %typemap(freearg) char **dict */
   29860           0 :     CSLDestroy( arg4 );
   29861             :   }
   29862             :   return NULL;
   29863             : }
   29864             : 
   29865             : 
   29866        1831 : SWIGINTERN PyObject *_wrap_MDArray_Read(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29867        1831 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29868        1831 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   29869        1831 :   int arg2 ;
   29870        1831 :   GUIntBig *arg3 = (GUIntBig *) 0 ;
   29871        1831 :   int arg4 ;
   29872        1831 :   GUIntBig *arg5 = (GUIntBig *) 0 ;
   29873        1831 :   int arg6 ;
   29874        1831 :   GIntBig *arg7 = (GIntBig *) 0 ;
   29875        1831 :   int arg8 ;
   29876        1831 :   GIntBig *arg9 = (GIntBig *) 0 ;
   29877        1831 :   GDALExtendedDataTypeHS *arg10 = (GDALExtendedDataTypeHS *) 0 ;
   29878        1831 :   void **arg11 = (void **) 0 ;
   29879        1831 :   void *argp1 = 0 ;
   29880        1831 :   int res1 = 0 ;
   29881        1831 :   void *argp10 = 0 ;
   29882        1831 :   int res10 = 0 ;
   29883        1831 :   void *pyObject11 = NULL ;
   29884        1831 :   PyObject *swig_obj[6] ;
   29885        1831 :   CPLErr result;
   29886             :   
   29887        1831 :   {
   29888             :     /* %typemap(in,numinputs=0) ( void **outPythonObject ) ( void *pyObject11 = NULL ) */
   29889        1831 :     arg11 = &pyObject11;
   29890             :   }
   29891        1831 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_Read", 6, 6, swig_obj)) SWIG_fail;
   29892        1831 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   29893        1831 :   if (!SWIG_IsOK(res1)) {
   29894           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_Read" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   29895             :   }
   29896        1831 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   29897        1831 :   {
   29898             :     /* %typemap(in,numinputs=1) (int nList, GUIntBig* pList)*/
   29899        1831 :     arg3 = CreateCGUIntBigListFromSequence(swig_obj[1], &arg2);
   29900        1831 :     if( arg2 < 0 ) {
   29901           0 :       SWIG_fail;
   29902             :     }
   29903             :   }
   29904        1831 :   {
   29905             :     /* %typemap(in,numinputs=1) (int nList, GUIntBig* pList)*/
   29906        1831 :     arg5 = CreateCGUIntBigListFromSequence(swig_obj[2], &arg4);
   29907        1831 :     if( arg4 < 0 ) {
   29908           0 :       SWIG_fail;
   29909             :     }
   29910             :   }
   29911        1831 :   {
   29912             :     /* %typemap(in,numinputs=1) (int nList, GIntBig* pList)*/
   29913        1831 :     arg7 = CreateCGIntBigListFromSequence(swig_obj[3], &arg6);
   29914        1831 :     if( arg6 < 0 ) {
   29915           0 :       SWIG_fail;
   29916             :     }
   29917             :   }
   29918        1831 :   {
   29919             :     /* %typemap(in,numinputs=1) (int nList, GIntBig* pList)*/
   29920        1831 :     arg9 = CreateCGIntBigListFromSequence(swig_obj[4], &arg8);
   29921        1831 :     if( arg8 < 0 ) {
   29922           0 :       SWIG_fail;
   29923             :     }
   29924             :   }
   29925        1831 :   res10 = SWIG_ConvertPtr(swig_obj[5], &argp10,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   29926        1831 :   if (!SWIG_IsOK(res10)) {
   29927           0 :     SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "MDArray_Read" "', argument " "10"" of type '" "GDALExtendedDataTypeHS *""'"); 
   29928             :   }
   29929        1831 :   arg10 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp10);
   29930        1831 :   {
   29931        1831 :     if (!arg10) {
   29932           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   29933             :     }
   29934             :   }
   29935        1831 :   {
   29936        1831 :     const int bLocalUseExceptions = GetUseExceptions();
   29937        1831 :     if ( bLocalUseExceptions ) {
   29938         114 :       pushErrorHandler();
   29939             :     }
   29940        1831 :     {
   29941        1831 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29942        1831 :       CPL_IGNORE_RET_VAL(result = (CPLErr)GDALMDArrayHS_Read(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11));
   29943        1831 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29944             :     }
   29945        1831 :     if ( bLocalUseExceptions ) {
   29946         114 :       popErrorHandler();
   29947             :     }
   29948             : #ifndef SED_HACKS
   29949             :     if ( bLocalUseExceptions ) {
   29950             :       CPLErr eclass = CPLGetLastErrorType();
   29951             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29952             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29953             :       }
   29954             :     }
   29955             : #endif
   29956             :   }
   29957        1831 :   resultobj = SWIG_From_int(static_cast< int >(result));
   29958        1831 :   {
   29959             :     /* %typemap(argout) ( void **outPythonObject ) */
   29960        1831 :     Py_XDECREF(resultobj);
   29961        1831 :     if (*arg11)
   29962             :     {
   29963             :       resultobj = (PyObject*)*arg11;
   29964             :     }
   29965             :     else
   29966             :     {
   29967          37 :       resultobj = Py_None;
   29968          37 :       Py_INCREF(resultobj);
   29969             :     }
   29970             :   }
   29971        1831 :   {
   29972             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   29973        1831 :     free(arg3);
   29974             :   }
   29975        1831 :   {
   29976             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   29977        1831 :     free(arg5);
   29978             :   }
   29979        1831 :   {
   29980             :     /* %typemap(freearg) (int nList, GIntBig* pList) */
   29981        1831 :     free(arg7);
   29982             :   }
   29983        1831 :   {
   29984             :     /* %typemap(freearg) (int nList, GIntBig* pList) */
   29985        1831 :     free(arg9);
   29986             :   }
   29987        1831 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   29988             :   return resultobj;
   29989           0 : fail:
   29990           0 :   {
   29991             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   29992           0 :     free(arg3);
   29993             :   }
   29994           0 :   {
   29995             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   29996           0 :     free(arg5);
   29997             :   }
   29998           0 :   {
   29999             :     /* %typemap(freearg) (int nList, GIntBig* pList) */
   30000           0 :     free(arg7);
   30001             :   }
   30002           0 :   {
   30003             :     /* %typemap(freearg) (int nList, GIntBig* pList) */
   30004           0 :     free(arg9);
   30005             :   }
   30006           0 :   return NULL;
   30007             : }
   30008             : 
   30009             : 
   30010          11 : SWIGINTERN PyObject *_wrap_MDArray_WriteStringArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   30011          11 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   30012          11 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   30013          11 :   int arg2 ;
   30014          11 :   GUIntBig *arg3 = (GUIntBig *) 0 ;
   30015          11 :   int arg4 ;
   30016          11 :   GUIntBig *arg5 = (GUIntBig *) 0 ;
   30017          11 :   int arg6 ;
   30018          11 :   GIntBig *arg7 = (GIntBig *) 0 ;
   30019          11 :   GDALExtendedDataTypeHS *arg8 = (GDALExtendedDataTypeHS *) 0 ;
   30020          11 :   char **arg9 = (char **) 0 ;
   30021          11 :   void *argp1 = 0 ;
   30022          11 :   int res1 = 0 ;
   30023          11 :   void *argp8 = 0 ;
   30024          11 :   int res8 = 0 ;
   30025          11 :   PyObject *swig_obj[6] ;
   30026          11 :   CPLErr result;
   30027             :   
   30028          11 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_WriteStringArray", 6, 6, swig_obj)) SWIG_fail;
   30029          11 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   30030          11 :   if (!SWIG_IsOK(res1)) {
   30031           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_WriteStringArray" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   30032             :   }
   30033          11 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   30034          11 :   {
   30035             :     /* %typemap(in,numinputs=1) (int nList, GUIntBig* pList)*/
   30036          11 :     arg3 = CreateCGUIntBigListFromSequence(swig_obj[1], &arg2);
   30037          11 :     if( arg2 < 0 ) {
   30038           0 :       SWIG_fail;
   30039             :     }
   30040             :   }
   30041          11 :   {
   30042             :     /* %typemap(in,numinputs=1) (int nList, GUIntBig* pList)*/
   30043          11 :     arg5 = CreateCGUIntBigListFromSequence(swig_obj[2], &arg4);
   30044          11 :     if( arg4 < 0 ) {
   30045           0 :       SWIG_fail;
   30046             :     }
   30047             :   }
   30048          11 :   {
   30049             :     /* %typemap(in,numinputs=1) (int nList, GIntBig* pList)*/
   30050          11 :     arg7 = CreateCGIntBigListFromSequence(swig_obj[3], &arg6);
   30051          11 :     if( arg6 < 0 ) {
   30052           0 :       SWIG_fail;
   30053             :     }
   30054             :   }
   30055          11 :   res8 = SWIG_ConvertPtr(swig_obj[4], &argp8,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   30056          11 :   if (!SWIG_IsOK(res8)) {
   30057           0 :     SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "MDArray_WriteStringArray" "', argument " "8"" of type '" "GDALExtendedDataTypeHS *""'"); 
   30058             :   }
   30059          11 :   arg8 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp8);
   30060          11 :   {
   30061             :     /* %typemap(in) char **dict */
   30062          11 :     arg9 = NULL;
   30063          11 :     if ( PySequence_Check( swig_obj[5] ) ) {
   30064          11 :       int bErr = FALSE;
   30065          11 :       arg9 = CSLFromPySequence(swig_obj[5], &bErr);
   30066          11 :       if ( bErr )
   30067             :       {
   30068           0 :         SWIG_fail;
   30069             :       }
   30070             :     }
   30071           0 :     else if ( PyMapping_Check( swig_obj[5] ) ) {
   30072           0 :       int bErr = FALSE;
   30073           0 :       arg9 = CSLFromPyMapping(swig_obj[5], &bErr);
   30074           0 :       if ( bErr )
   30075             :       {
   30076           0 :         SWIG_fail;
   30077             :       }
   30078             :     }
   30079             :     else {
   30080           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   30081           0 :       SWIG_fail;
   30082             :     }
   30083             :   }
   30084          11 :   {
   30085          11 :     if (!arg8) {
   30086           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   30087             :     }
   30088             :   }
   30089          11 :   {
   30090          11 :     const int bLocalUseExceptions = GetUseExceptions();
   30091          11 :     if ( bLocalUseExceptions ) {
   30092           2 :       pushErrorHandler();
   30093             :     }
   30094          11 :     {
   30095          11 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   30096          11 :       CPL_IGNORE_RET_VAL(result = (CPLErr)GDALMDArrayHS_WriteStringArray(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9));
   30097          11 :       SWIG_PYTHON_THREAD_END_ALLOW;
   30098             :     }
   30099          11 :     if ( bLocalUseExceptions ) {
   30100           2 :       popErrorHandler();
   30101             :     }
   30102             : #ifndef SED_HACKS
   30103             :     if ( bLocalUseExceptions ) {
   30104             :       CPLErr eclass = CPLGetLastErrorType();
   30105             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   30106             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   30107             :       }
   30108             :     }
   30109             : #endif
   30110             :   }
   30111          11 :   resultobj = SWIG_From_int(static_cast< int >(result));
   30112          11 :   {
   30113             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   30114          11 :     free(arg3);
   30115             :   }
   30116          11 :   {
   30117             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   30118          11 :     free(arg5);
   30119             :   }
   30120          11 :   {
   30121             :     /* %typemap(freearg) (int nList, GIntBig* pList) */
   30122          11 :     free(arg7);
   30123             :   }
   30124          11 :   {
   30125             :     /* %typemap(freearg) char **dict */
   30126          11 :     CSLDestroy( arg9 );
   30127             :   }
   30128          11 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   30129             :   return resultobj;
   30130           0 : fail:
   30131           0 :   {
   30132             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   30133           0 :     free(arg3);
   30134             :   }
   30135           0 :   {
   30136             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   30137           0 :     free(arg5);
   30138             :   }
   30139           0 :   {
   30140             :     /* %typemap(freearg) (int nList, GIntBig* pList) */
   30141           0 :     free(arg7);
   30142             :   }
   30143           0 :   {
   30144             :     /* %typemap(freearg) char **dict */
   30145           0 :     CSLDestroy( arg9 );
   30146             :   }
   30147             :   return NULL;
   30148             : }
   30149             : 
   30150             : 
   30151         506 : SWIGINTERN PyObject *_wrap_MDArray_Write(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   30152         506 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   30153         506 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   30154         506 :   int arg2 ;
   30155         506 :   GUIntBig *arg3 = (GUIntBig *) 0 ;
   30156         506 :   int arg4 ;
   30157         506 :   GUIntBig *arg5 = (GUIntBig *) 0 ;
   30158         506 :   int arg6 ;
   30159         506 :   GIntBig *arg7 = (GIntBig *) 0 ;
   30160         506 :   int arg8 ;
   30161         506 :   GIntBig *arg9 = (GIntBig *) 0 ;
   30162         506 :   GDALExtendedDataTypeHS *arg10 = (GDALExtendedDataTypeHS *) 0 ;
   30163         506 :   GIntBig arg11 ;
   30164         506 :   char *arg12 = (char *) 0 ;
   30165         506 :   void *argp1 = 0 ;
   30166         506 :   int res1 = 0 ;
   30167         506 :   void *argp10 = 0 ;
   30168         506 :   int res10 = 0 ;
   30169         506 :   int alloc11 = 0 ;
   30170         506 :   bool viewIsValid11 = false ;
   30171         506 :   Py_buffer view11 ;
   30172         506 :   PyObject *swig_obj[7] ;
   30173         506 :   CPLErr result;
   30174             :   
   30175         506 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_Write", 7, 7, swig_obj)) SWIG_fail;
   30176         506 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   30177         506 :   if (!SWIG_IsOK(res1)) {
   30178           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_Write" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   30179             :   }
   30180         506 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   30181         506 :   {
   30182             :     /* %typemap(in,numinputs=1) (int nList, GUIntBig* pList)*/
   30183         506 :     arg3 = CreateCGUIntBigListFromSequence(swig_obj[1], &arg2);
   30184         506 :     if( arg2 < 0 ) {
   30185           0 :       SWIG_fail;
   30186             :     }
   30187             :   }
   30188         506 :   {
   30189             :     /* %typemap(in,numinputs=1) (int nList, GUIntBig* pList)*/
   30190         506 :     arg5 = CreateCGUIntBigListFromSequence(swig_obj[2], &arg4);
   30191         506 :     if( arg4 < 0 ) {
   30192           0 :       SWIG_fail;
   30193             :     }
   30194             :   }
   30195         506 :   {
   30196             :     /* %typemap(in,numinputs=1) (int nList, GIntBig* pList)*/
   30197         506 :     arg7 = CreateCGIntBigListFromSequence(swig_obj[3], &arg6);
   30198         506 :     if( arg6 < 0 ) {
   30199           0 :       SWIG_fail;
   30200             :     }
   30201             :   }
   30202         506 :   {
   30203             :     /* %typemap(in,numinputs=1) (int nList, GIntBig* pList)*/
   30204         506 :     arg9 = CreateCGIntBigListFromSequence(swig_obj[4], &arg8);
   30205         506 :     if( arg8 < 0 ) {
   30206           0 :       SWIG_fail;
   30207             :     }
   30208             :   }
   30209         506 :   res10 = SWIG_ConvertPtr(swig_obj[5], &argp10,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   30210         506 :   if (!SWIG_IsOK(res10)) {
   30211           0 :     SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "MDArray_Write" "', argument " "10"" of type '" "GDALExtendedDataTypeHS *""'"); 
   30212             :   }
   30213         506 :   arg10 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp10);
   30214         506 :   {
   30215             :     /* %typemap(in,numinputs=1) (GIntBig nLen, char *pBuf ) */
   30216         506 :     char* ptr = NULL;
   30217         506 :     if( !GetBufferAsCharPtrGIntBigSize(swig_obj[6], &arg11, &ptr, &alloc11, &viewIsValid11, &view11) ) {
   30218           0 :       SWIG_fail;
   30219             :     }
   30220         506 :     arg12 = (char *)ptr;
   30221             :   }
   30222         506 :   {
   30223         506 :     if (!arg10) {
   30224           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   30225             :     }
   30226             :   }
   30227         506 :   {
   30228         506 :     const int bLocalUseExceptions = GetUseExceptions();
   30229         506 :     if ( bLocalUseExceptions ) {
   30230          39 :       pushErrorHandler();
   30231             :     }
   30232         506 :     {
   30233         506 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   30234         506 :       CPL_IGNORE_RET_VAL(result = (CPLErr)GDALMDArrayHS_Write(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12));
   30235         506 :       SWIG_PYTHON_THREAD_END_ALLOW;
   30236             :     }
   30237         506 :     if ( bLocalUseExceptions ) {
   30238          39 :       popErrorHandler();
   30239             :     }
   30240             : #ifndef SED_HACKS
   30241             :     if ( bLocalUseExceptions ) {
   30242             :       CPLErr eclass = CPLGetLastErrorType();
   30243             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   30244             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   30245             :       }
   30246             :     }
   30247             : #endif
   30248             :   }
   30249         506 :   resultobj = SWIG_From_int(static_cast< int >(result));
   30250         506 :   {
   30251             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   30252         506 :     free(arg3);
   30253             :   }
   30254         506 :   {
   30255             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   30256         506 :     free(arg5);
   30257             :   }
   30258         506 :   {
   30259             :     /* %typemap(freearg) (int nList, GIntBig* pList) */
   30260         506 :     free(arg7);
   30261             :   }
   30262         506 :   {
   30263             :     /* %typemap(freearg) (int nList, GIntBig* pList) */
   30264         506 :     free(arg9);
   30265             :   }
   30266         506 :   {
   30267             :     /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
   30268         506 :     if( viewIsValid11 ) {
   30269         505 :       PyBuffer_Release(&view11);
   30270             :     }
   30271           1 :     else if( alloc11 == SWIG_NEWOBJ ) {
   30272           1 :       delete[] arg12;
   30273             :     }
   30274             :   }
   30275         507 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   30276             :   return resultobj;
   30277           0 : fail:
   30278           0 :   {
   30279             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   30280           0 :     free(arg3);
   30281             :   }
   30282           0 :   {
   30283             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   30284           0 :     free(arg5);
   30285             :   }
   30286           0 :   {
   30287             :     /* %typemap(freearg) (int nList, GIntBig* pList) */
   30288           0 :     free(arg7);
   30289             :   }
   30290           0 :   {
   30291             :     /* %typemap(freearg) (int nList, GIntBig* pList) */
   30292           0 :     free(arg9);
   30293             :   }
   30294           0 :   {
   30295             :     /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
   30296           0 :     if( viewIsValid11 ) {
   30297           0 :       PyBuffer_Release(&view11);
   30298             :     }
   30299           0 :     else if( alloc11 == SWIG_NEWOBJ ) {
   30300           0 :       delete[] arg12;
   30301             :     }
   30302             :   }
   30303             :   return NULL;
   30304             : }
   30305             : 
   30306             : 
   30307          22 : SWIGINTERN PyObject *_wrap_MDArray_AdviseRead(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   30308          22 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   30309          22 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   30310          22 :   int arg2 ;
   30311          22 :   GUIntBig *arg3 = (GUIntBig *) 0 ;
   30312          22 :   int arg4 ;
   30313          22 :   GUIntBig *arg5 = (GUIntBig *) 0 ;
   30314          22 :   char **arg6 = (char **) 0 ;
   30315          22 :   void *argp1 = 0 ;
   30316          22 :   int res1 = 0 ;
   30317          22 :   PyObject *swig_obj[4] ;
   30318          22 :   CPLErr result;
   30319             :   
   30320          22 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_AdviseRead", 3, 4, swig_obj)) SWIG_fail;
   30321          22 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   30322          22 :   if (!SWIG_IsOK(res1)) {
   30323           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_AdviseRead" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   30324             :   }
   30325          22 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   30326          22 :   {
   30327             :     /* %typemap(in,numinputs=1) (int nList, GUIntBig* pList)*/
   30328          22 :     arg3 = CreateCGUIntBigListFromSequence(swig_obj[1], &arg2);
   30329          22 :     if( arg2 < 0 ) {
   30330           0 :       SWIG_fail;
   30331             :     }
   30332             :   }
   30333          22 :   {
   30334             :     /* %typemap(in,numinputs=1) (int nList, GUIntBig* pList)*/
   30335          22 :     arg5 = CreateCGUIntBigListFromSequence(swig_obj[2], &arg4);
   30336          22 :     if( arg4 < 0 ) {
   30337           0 :       SWIG_fail;
   30338             :     }
   30339             :   }
   30340          22 :   if (swig_obj[3]) {
   30341          22 :     {
   30342             :       /* %typemap(in) char **dict */
   30343          22 :       arg6 = NULL;
   30344          22 :       if ( PySequence_Check( swig_obj[3] ) ) {
   30345          22 :         int bErr = FALSE;
   30346          22 :         arg6 = CSLFromPySequence(swig_obj[3], &bErr);
   30347          22 :         if ( bErr )
   30348             :         {
   30349           0 :           SWIG_fail;
   30350             :         }
   30351             :       }
   30352           0 :       else if ( PyMapping_Check( swig_obj[3] ) ) {
   30353           0 :         int bErr = FALSE;
   30354           0 :         arg6 = CSLFromPyMapping(swig_obj[3], &bErr);
   30355           0 :         if ( bErr )
   30356             :         {
   30357           0 :           SWIG_fail;
   30358             :         }
   30359             :       }
   30360             :       else {
   30361           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   30362           0 :         SWIG_fail;
   30363             :       }
   30364             :     }
   30365             :   }
   30366          22 :   {
   30367          22 :     const int bLocalUseExceptions = GetUseExceptions();
   30368          22 :     if ( bLocalUseExceptions ) {
   30369           0 :       pushErrorHandler();
   30370             :     }
   30371          22 :     {
   30372          22 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   30373          22 :       CPL_IGNORE_RET_VAL(result = (CPLErr)GDALMDArrayHS_AdviseRead(arg1,arg2,arg3,arg4,arg5,arg6));
   30374          22 :       SWIG_PYTHON_THREAD_END_ALLOW;
   30375             :     }
   30376          22 :     if ( bLocalUseExceptions ) {
   30377           0 :       popErrorHandler();
   30378             :     }
   30379             : #ifndef SED_HACKS
   30380             :     if ( bLocalUseExceptions ) {
   30381             :       CPLErr eclass = CPLGetLastErrorType();
   30382             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   30383             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   30384             :       }
   30385             :     }
   30386             : #endif
   30387             :   }
   30388          22 :   resultobj = SWIG_From_int(static_cast< int >(result));
   30389          22 :   {
   30390             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   30391          22 :     free(arg3);
   30392             :   }
   30393          22 :   {
   30394             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   30395          22 :     free(arg5);
   30396             :   }
   30397          22 :   {
   30398             :     /* %typemap(freearg) char **dict */
   30399          22 :     CSLDestroy( arg6 );
   30400             :   }
   30401          22 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   30402             :   return resultobj;
   30403           0 : fail:
   30404           0 :   {
   30405             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   30406           0 :     free(arg3);
   30407             :   }
   30408           0 :   {
   30409             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   30410           0 :     free(arg5);
   30411             :   }
   30412           0 :   {
   30413             :     /* %typemap(freearg) char **dict */
   30414           0 :     CSLDestroy( arg6 );
   30415             :   }
   30416             :   return NULL;
   30417             : }
   30418             : 
   30419             : 
   30420         118 : SWIGINTERN PyObject *_wrap_MDArray_GetAttribute(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   30421         118 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   30422         118 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   30423         118 :   char *arg2 = (char *) 0 ;
   30424         118 :   void *argp1 = 0 ;
   30425         118 :   int res1 = 0 ;
   30426         118 :   int res2 ;
   30427         118 :   char *buf2 = 0 ;
   30428         118 :   int alloc2 = 0 ;
   30429         118 :   PyObject *swig_obj[2] ;
   30430         118 :   GDALAttributeHS *result = 0 ;
   30431             :   
   30432         118 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_GetAttribute", 2, 2, swig_obj)) SWIG_fail;
   30433         118 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   30434         118 :   if (!SWIG_IsOK(res1)) {
   30435           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetAttribute" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   30436             :   }
   30437         118 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   30438         118 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   30439         118 :   if (!SWIG_IsOK(res2)) {
   30440           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MDArray_GetAttribute" "', argument " "2"" of type '" "char const *""'");
   30441             :   }
   30442         118 :   arg2 = reinterpret_cast< char * >(buf2);
   30443         118 :   {
   30444         118 :     if (!arg2) {
   30445           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   30446             :     }
   30447             :   }
   30448         118 :   {
   30449         118 :     const int bLocalUseExceptions = GetUseExceptions();
   30450         118 :     if ( bLocalUseExceptions ) {
   30451          58 :       pushErrorHandler();
   30452             :     }
   30453         118 :     {
   30454         118 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   30455         118 :       result = (GDALAttributeHS *)GDALMDArrayHS_GetAttribute(arg1,(char const *)arg2);
   30456         118 :       SWIG_PYTHON_THREAD_END_ALLOW;
   30457             :     }
   30458         118 :     if ( bLocalUseExceptions ) {
   30459          58 :       popErrorHandler();
   30460             :     }
   30461             : #ifndef SED_HACKS
   30462             :     if ( bLocalUseExceptions ) {
   30463             :       CPLErr eclass = CPLGetLastErrorType();
   30464             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   30465             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   30466             :       }
   30467             :     }
   30468             : #endif
   30469             :   }
   30470         118 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALAttributeHS, SWIG_POINTER_OWN |  0 );
   30471         118 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   30472         123 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   30473             :   return resultobj;
   30474           0 : fail:
   30475           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   30476             :   return NULL;
   30477             : }
   30478             : 
   30479             : 
   30480          57 : SWIGINTERN PyObject *_wrap_MDArray_GetAttributes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   30481          57 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   30482          57 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   30483          57 :   GDALAttributeHS ***arg2 = (GDALAttributeHS ***) 0 ;
   30484          57 :   size_t *arg3 = (size_t *) 0 ;
   30485          57 :   char **arg4 = (char **) 0 ;
   30486          57 :   void *argp1 = 0 ;
   30487          57 :   int res1 = 0 ;
   30488          57 :   GDALAttributeHS **attrs2 = 0 ;
   30489          57 :   size_t nCount2 = 0 ;
   30490          57 :   PyObject *swig_obj[2] ;
   30491             :   
   30492          57 :   {
   30493             :     /* %typemap(in,numinputs=0) (GDALAttributeHS*** pattrs, size_t* pnCount) */
   30494          57 :     arg2 = &attrs2;
   30495          57 :     arg3 = &nCount2;
   30496             :   }
   30497          57 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_GetAttributes", 1, 2, swig_obj)) SWIG_fail;
   30498          57 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   30499          57 :   if (!SWIG_IsOK(res1)) {
   30500           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetAttributes" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   30501             :   }
   30502          57 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   30503          57 :   if (swig_obj[1]) {
   30504           0 :     {
   30505             :       /* %typemap(in) char **dict */
   30506           0 :       arg4 = NULL;
   30507           0 :       if ( PySequence_Check( swig_obj[1] ) ) {
   30508           0 :         int bErr = FALSE;
   30509           0 :         arg4 = CSLFromPySequence(swig_obj[1], &bErr);
   30510           0 :         if ( bErr )
   30511             :         {
   30512           0 :           SWIG_fail;
   30513             :         }
   30514             :       }
   30515           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   30516           0 :         int bErr = FALSE;
   30517           0 :         arg4 = CSLFromPyMapping(swig_obj[1], &bErr);
   30518           0 :         if ( bErr )
   30519             :         {
   30520           0 :           SWIG_fail;
   30521             :         }
   30522             :       }
   30523             :       else {
   30524           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   30525           0 :         SWIG_fail;
   30526             :       }
   30527             :     }
   30528             :   }
   30529          57 :   {
   30530          57 :     const int bLocalUseExceptions = GetUseExceptions();
   30531          57 :     if ( bLocalUseExceptions ) {
   30532          41 :       pushErrorHandler();
   30533             :     }
   30534          57 :     {
   30535          57 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   30536          57 :       GDALMDArrayHS_GetAttributes(arg1,arg2,arg3,arg4);
   30537          57 :       SWIG_PYTHON_THREAD_END_ALLOW;
   30538             :     }
   30539          57 :     if ( bLocalUseExceptions ) {
   30540          41 :       popErrorHandler();
   30541             :     }
   30542             : #ifndef SED_HACKS
   30543             :     if ( bLocalUseExceptions ) {
   30544             :       CPLErr eclass = CPLGetLastErrorType();
   30545             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   30546             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   30547             :       }
   30548             :     }
   30549             : #endif
   30550             :   }
   30551          57 :   resultobj = SWIG_Py_Void();
   30552          57 :   {
   30553             :     /* %typemap(argout) (GDALAttributeHS*** pattrs, size_t* pnCount) */
   30554          57 :     Py_DECREF(resultobj);
   30555          57 :     resultobj = PyList_New( *arg3 );
   30556          57 :     if( !resultobj ) {
   30557           0 :       SWIG_fail;
   30558             :     }
   30559         185 :     for( size_t i = 0; i < *arg3; i++ ) {
   30560         128 :       PyList_SetItem(resultobj, i,
   30561         128 :         SWIG_NewPointerObj((void*)(*arg2)[i],SWIGTYPE_p_GDALAttributeHS,SWIG_POINTER_OWN) );
   30562             :       /* We have borrowed the GDALAttributeHS */
   30563         128 :       (*arg2)[i] = NULL;
   30564             :     }
   30565             :   }
   30566          57 :   {
   30567             :     /* %typemap(freearg) (GDALAttributeHS*** pattrs, size_t* pnCount) */
   30568          57 :     GDALReleaseAttributes(*arg2, *arg3);
   30569             :   }
   30570          57 :   {
   30571             :     /* %typemap(freearg) char **dict */
   30572          57 :     CSLDestroy( arg4 );
   30573             :   }
   30574          65 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   30575             :   return resultobj;
   30576           0 : fail:
   30577           0 :   {
   30578             :     /* %typemap(freearg) (GDALAttributeHS*** pattrs, size_t* pnCount) */
   30579           0 :     GDALReleaseAttributes(*arg2, *arg3);
   30580             :   }
   30581           0 :   {
   30582             :     /* %typemap(freearg) char **dict */
   30583           0 :     CSLDestroy( arg4 );
   30584             :   }
   30585             :   return NULL;
   30586             : }
   30587             : 
   30588             : 
   30589         149 : SWIGINTERN PyObject *_wrap_MDArray_CreateAttribute(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   30590         149 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   30591         149 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   30592         149 :   char *arg2 = (char *) 0 ;
   30593         149 :   int arg3 ;
   30594         149 :   GUIntBig *arg4 = (GUIntBig *) 0 ;
   30595         149 :   GDALExtendedDataTypeHS *arg5 = (GDALExtendedDataTypeHS *) 0 ;
   30596         149 :   char **arg6 = (char **) 0 ;
   30597         149 :   void *argp1 = 0 ;
   30598         149 :   int res1 = 0 ;
   30599         149 :   int res2 ;
   30600         149 :   char *buf2 = 0 ;
   30601         149 :   int alloc2 = 0 ;
   30602         149 :   void *argp5 = 0 ;
   30603         149 :   int res5 = 0 ;
   30604         149 :   PyObject *swig_obj[5] ;
   30605         149 :   GDALAttributeHS *result = 0 ;
   30606             :   
   30607         149 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_CreateAttribute", 4, 5, swig_obj)) SWIG_fail;
   30608         149 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   30609         149 :   if (!SWIG_IsOK(res1)) {
   30610           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_CreateAttribute" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   30611             :   }
   30612         149 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   30613         149 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   30614         149 :   if (!SWIG_IsOK(res2)) {
   30615           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MDArray_CreateAttribute" "', argument " "2"" of type '" "char const *""'");
   30616             :   }
   30617         149 :   arg2 = reinterpret_cast< char * >(buf2);
   30618         149 :   {
   30619             :     /* %typemap(in,numinputs=1) (int nList, GUIntBig* pList)*/
   30620         149 :     arg4 = CreateCGUIntBigListFromSequence(swig_obj[2], &arg3);
   30621         149 :     if( arg3 < 0 ) {
   30622           0 :       SWIG_fail;
   30623             :     }
   30624             :   }
   30625         149 :   res5 = SWIG_ConvertPtr(swig_obj[3], &argp5,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   30626         149 :   if (!SWIG_IsOK(res5)) {
   30627           0 :     SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "MDArray_CreateAttribute" "', argument " "5"" of type '" "GDALExtendedDataTypeHS *""'"); 
   30628             :   }
   30629         149 :   arg5 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp5);
   30630         149 :   if (swig_obj[4]) {
   30631           0 :     {
   30632             :       /* %typemap(in) char **dict */
   30633           0 :       arg6 = NULL;
   30634           0 :       if ( PySequence_Check( swig_obj[4] ) ) {
   30635           0 :         int bErr = FALSE;
   30636           0 :         arg6 = CSLFromPySequence(swig_obj[4], &bErr);
   30637           0 :         if ( bErr )
   30638             :         {
   30639           0 :           SWIG_fail;
   30640             :         }
   30641             :       }
   30642           0 :       else if ( PyMapping_Check( swig_obj[4] ) ) {
   30643           0 :         int bErr = FALSE;
   30644           0 :         arg6 = CSLFromPyMapping(swig_obj[4], &bErr);
   30645           0 :         if ( bErr )
   30646             :         {
   30647           0 :           SWIG_fail;
   30648             :         }
   30649             :       }
   30650             :       else {
   30651           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   30652           0 :         SWIG_fail;
   30653             :       }
   30654             :     }
   30655             :   }
   30656         149 :   {
   30657         149 :     if (!arg2) {
   30658           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   30659             :     }
   30660             :   }
   30661         148 :   {
   30662         148 :     if (!arg5) {
   30663           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   30664             :     }
   30665             :   }
   30666         148 :   {
   30667         148 :     const int bLocalUseExceptions = GetUseExceptions();
   30668         148 :     if ( bLocalUseExceptions ) {
   30669         104 :       pushErrorHandler();
   30670             :     }
   30671         148 :     {
   30672         148 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   30673         148 :       result = (GDALAttributeHS *)GDALMDArrayHS_CreateAttribute(arg1,(char const *)arg2,arg3,arg4,arg5,arg6);
   30674         148 :       SWIG_PYTHON_THREAD_END_ALLOW;
   30675             :     }
   30676         148 :     if ( bLocalUseExceptions ) {
   30677         104 :       popErrorHandler();
   30678             :     }
   30679             : #ifndef SED_HACKS
   30680             :     if ( bLocalUseExceptions ) {
   30681             :       CPLErr eclass = CPLGetLastErrorType();
   30682             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   30683             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   30684             :       }
   30685             :     }
   30686             : #endif
   30687             :   }
   30688         148 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALAttributeHS, SWIG_POINTER_OWN |  0 );
   30689         148 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   30690         148 :   {
   30691             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   30692         148 :     free(arg4);
   30693             :   }
   30694         148 :   {
   30695             :     /* %typemap(freearg) char **dict */
   30696         148 :     CSLDestroy( arg6 );
   30697             :   }
   30698         150 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   30699             :   return resultobj;
   30700           1 : fail:
   30701           1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   30702           1 :   {
   30703             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   30704           1 :     free(arg4);
   30705             :   }
   30706           1 :   {
   30707             :     /* %typemap(freearg) char **dict */
   30708           1 :     CSLDestroy( arg6 );
   30709             :   }
   30710             :   return NULL;
   30711             : }
   30712             : 
   30713             : 
   30714          24 : SWIGINTERN PyObject *_wrap_MDArray_DeleteAttribute(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   30715          24 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   30716          24 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   30717          24 :   char *arg2 = (char *) 0 ;
   30718          24 :   char **arg3 = (char **) 0 ;
   30719          24 :   void *argp1 = 0 ;
   30720          24 :   int res1 = 0 ;
   30721          24 :   int res2 ;
   30722          24 :   char *buf2 = 0 ;
   30723          24 :   int alloc2 = 0 ;
   30724          24 :   PyObject *swig_obj[3] ;
   30725          24 :   CPLErr result;
   30726             :   
   30727          24 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_DeleteAttribute", 2, 3, swig_obj)) SWIG_fail;
   30728          24 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   30729          24 :   if (!SWIG_IsOK(res1)) {
   30730           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_DeleteAttribute" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   30731             :   }
   30732          24 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   30733          24 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   30734          24 :   if (!SWIG_IsOK(res2)) {
   30735           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MDArray_DeleteAttribute" "', argument " "2"" of type '" "char const *""'");
   30736             :   }
   30737          24 :   arg2 = reinterpret_cast< char * >(buf2);
   30738          24 :   if (swig_obj[2]) {
   30739           0 :     {
   30740             :       /* %typemap(in) char **dict */
   30741           0 :       arg3 = NULL;
   30742           0 :       if ( PySequence_Check( swig_obj[2] ) ) {
   30743           0 :         int bErr = FALSE;
   30744           0 :         arg3 = CSLFromPySequence(swig_obj[2], &bErr);
   30745           0 :         if ( bErr )
   30746             :         {
   30747           0 :           SWIG_fail;
   30748             :         }
   30749             :       }
   30750           0 :       else if ( PyMapping_Check( swig_obj[2] ) ) {
   30751           0 :         int bErr = FALSE;
   30752           0 :         arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
   30753           0 :         if ( bErr )
   30754             :         {
   30755           0 :           SWIG_fail;
   30756             :         }
   30757             :       }
   30758             :       else {
   30759           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   30760           0 :         SWIG_fail;
   30761             :       }
   30762             :     }
   30763             :   }
   30764          24 :   {
   30765          24 :     if (!arg2) {
   30766           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   30767             :     }
   30768             :   }
   30769          24 :   {
   30770          24 :     const int bLocalUseExceptions = GetUseExceptions();
   30771          24 :     if ( bLocalUseExceptions ) {
   30772          24 :       pushErrorHandler();
   30773             :     }
   30774          24 :     {
   30775          24 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   30776          48 :       CPL_IGNORE_RET_VAL(result = (CPLErr)GDALMDArrayHS_DeleteAttribute(arg1,(char const *)arg2,arg3));
   30777          24 :       SWIG_PYTHON_THREAD_END_ALLOW;
   30778             :     }
   30779          24 :     if ( bLocalUseExceptions ) {
   30780          24 :       popErrorHandler();
   30781             :     }
   30782             : #ifndef SED_HACKS
   30783             :     if ( bLocalUseExceptions ) {
   30784             :       CPLErr eclass = CPLGetLastErrorType();
   30785             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   30786             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   30787             :       }
   30788             :     }
   30789             : #endif
   30790             :   }
   30791          24 :   resultobj = SWIG_From_int(static_cast< int >(result));
   30792          24 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   30793          24 :   {
   30794             :     /* %typemap(freearg) char **dict */
   30795          24 :     CSLDestroy( arg3 );
   30796             :   }
   30797          38 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   30798             :   return resultobj;
   30799           0 : fail:
   30800           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   30801           0 :   {
   30802             :     /* %typemap(freearg) char **dict */
   30803           0 :     CSLDestroy( arg3 );
   30804             :   }
   30805             :   return NULL;
   30806             : }
   30807             : 
   30808             : 
   30809          70 : SWIGINTERN PyObject *_wrap_MDArray_GetNoDataValueAsRaw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   30810          70 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   30811          70 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   30812          70 :   void **arg2 = (void **) 0 ;
   30813          70 :   void *argp1 = 0 ;
   30814          70 :   int res1 = 0 ;
   30815          70 :   void *pyObject2 = NULL ;
   30816          70 :   PyObject *swig_obj[1] ;
   30817          70 :   CPLErr result;
   30818             :   
   30819          70 :   {
   30820             :     /* %typemap(in,numinputs=0) ( void **outPythonObject ) ( void *pyObject2 = NULL ) */
   30821          70 :     arg2 = &pyObject2;
   30822             :   }
   30823          70 :   if (!args) SWIG_fail;
   30824          70 :   swig_obj[0] = args;
   30825          70 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   30826          70 :   if (!SWIG_IsOK(res1)) {
   30827           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetNoDataValueAsRaw" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   30828             :   }
   30829          70 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   30830          70 :   {
   30831          70 :     const int bLocalUseExceptions = GetUseExceptions();
   30832          70 :     if ( bLocalUseExceptions ) {
   30833          20 :       pushErrorHandler();
   30834             :     }
   30835          70 :     {
   30836          70 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   30837          70 :       CPL_IGNORE_RET_VAL(result = (CPLErr)GDALMDArrayHS_GetNoDataValueAsRaw(arg1,arg2));
   30838          70 :       SWIG_PYTHON_THREAD_END_ALLOW;
   30839             :     }
   30840          70 :     if ( bLocalUseExceptions ) {
   30841          20 :       popErrorHandler();
   30842             :     }
   30843             : #ifndef SED_HACKS
   30844             :     if ( bLocalUseExceptions ) {
   30845             :       CPLErr eclass = CPLGetLastErrorType();
   30846             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   30847             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   30848             :       }
   30849             :     }
   30850             : #endif
   30851             :   }
   30852          70 :   resultobj = SWIG_From_int(static_cast< int >(result));
   30853          70 :   {
   30854             :     /* %typemap(argout) ( void **outPythonObject ) */
   30855          70 :     Py_XDECREF(resultobj);
   30856          70 :     if (*arg2)
   30857             :     {
   30858             :       resultobj = (PyObject*)*arg2;
   30859             :     }
   30860             :     else
   30861             :     {
   30862          35 :       resultobj = Py_None;
   30863          35 :       Py_INCREF(resultobj);
   30864             :     }
   30865             :   }
   30866          70 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   30867             :   return resultobj;
   30868             : fail:
   30869             :   return NULL;
   30870             : }
   30871             : 
   30872             : 
   30873         117 : SWIGINTERN PyObject *_wrap_MDArray_GetNoDataValueAsDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   30874         117 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   30875         117 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   30876         117 :   double *arg2 = (double *) 0 ;
   30877         117 :   int *arg3 = (int *) 0 ;
   30878         117 :   void *argp1 = 0 ;
   30879         117 :   int res1 = 0 ;
   30880         117 :   double tmpval2 ;
   30881         117 :   int tmphasval2 ;
   30882         117 :   PyObject *swig_obj[1] ;
   30883             :   
   30884         117 :   {
   30885             :     /* %typemap(python,in,numinputs=0) (double *val, int *hasval) */
   30886         117 :     arg2 = &tmpval2;
   30887         117 :     arg3 = &tmphasval2;
   30888             :   }
   30889         117 :   if (!args) SWIG_fail;
   30890         117 :   swig_obj[0] = args;
   30891         117 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   30892         117 :   if (!SWIG_IsOK(res1)) {
   30893           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetNoDataValueAsDouble" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   30894             :   }
   30895         117 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   30896         117 :   {
   30897         117 :     const int bLocalUseExceptions = GetUseExceptions();
   30898         117 :     if ( bLocalUseExceptions ) {
   30899           6 :       pushErrorHandler();
   30900             :     }
   30901         117 :     {
   30902         117 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   30903         117 :       GDALMDArrayHS_GetNoDataValueAsDouble(arg1,arg2,arg3);
   30904         117 :       SWIG_PYTHON_THREAD_END_ALLOW;
   30905             :     }
   30906         117 :     if ( bLocalUseExceptions ) {
   30907           6 :       popErrorHandler();
   30908             :     }
   30909             : #ifndef SED_HACKS
   30910             :     if ( bLocalUseExceptions ) {
   30911             :       CPLErr eclass = CPLGetLastErrorType();
   30912             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   30913             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   30914             :       }
   30915             :     }
   30916             : #endif
   30917             :   }
   30918         117 :   resultobj = SWIG_Py_Void();
   30919         117 :   {
   30920             :     /* %typemap(python,argout) (double *val, int *hasval) */
   30921         117 :     PyObject *r;
   30922         117 :     if ( !*arg3 ) {
   30923          48 :       Py_INCREF(Py_None);
   30924          48 :       r = Py_None;
   30925          48 :       resultobj = t_output_helper(resultobj,r);
   30926             :     }
   30927             :     else {
   30928          69 :       r = PyFloat_FromDouble( *arg2 );
   30929          69 :       resultobj = t_output_helper(resultobj,r);
   30930             :     }
   30931             :   }
   30932         117 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   30933             :   return resultobj;
   30934             : fail:
   30935             :   return NULL;
   30936             : }
   30937             : 
   30938             : 
   30939          11 : SWIGINTERN PyObject *_wrap_MDArray_GetNoDataValueAsInt64(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   30940          11 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   30941          11 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   30942          11 :   GIntBig *arg2 = (GIntBig *) 0 ;
   30943          11 :   int *arg3 = (int *) 0 ;
   30944          11 :   void *argp1 = 0 ;
   30945          11 :   int res1 = 0 ;
   30946          11 :   GIntBig tmpval2 ;
   30947          11 :   int tmphasval2 ;
   30948          11 :   PyObject *swig_obj[1] ;
   30949             :   
   30950          11 :   {
   30951             :     /* %typemap(python,in,numinputs=0) (GIntBig *val, int *hasval) */
   30952          11 :     arg2 = &tmpval2;
   30953          11 :     arg3 = &tmphasval2;
   30954             :   }
   30955          11 :   if (!args) SWIG_fail;
   30956          11 :   swig_obj[0] = args;
   30957          11 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   30958          11 :   if (!SWIG_IsOK(res1)) {
   30959           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetNoDataValueAsInt64" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   30960             :   }
   30961          11 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   30962          11 :   {
   30963          11 :     const int bLocalUseExceptions = GetUseExceptions();
   30964          11 :     if ( bLocalUseExceptions ) {
   30965           0 :       pushErrorHandler();
   30966             :     }
   30967          11 :     {
   30968          11 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   30969          11 :       GDALMDArrayHS_GetNoDataValueAsInt64(arg1,arg2,arg3);
   30970          11 :       SWIG_PYTHON_THREAD_END_ALLOW;
   30971             :     }
   30972          11 :     if ( bLocalUseExceptions ) {
   30973           0 :       popErrorHandler();
   30974             :     }
   30975             : #ifndef SED_HACKS
   30976             :     if ( bLocalUseExceptions ) {
   30977             :       CPLErr eclass = CPLGetLastErrorType();
   30978             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   30979             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   30980             :       }
   30981             :     }
   30982             : #endif
   30983             :   }
   30984          11 :   resultobj = SWIG_Py_Void();
   30985          11 :   {
   30986             :     /* %typemap(python,argout) (GIntBig *val, int *hasval) */
   30987          11 :     PyObject *r;
   30988          11 :     if ( !*arg3 ) {
   30989           4 :       Py_INCREF(Py_None);
   30990           4 :       r = Py_None;
   30991           4 :       resultobj = t_output_helper(resultobj,r);
   30992             :     }
   30993             :     else {
   30994           7 :       r = PyLong_FromLongLong( *arg2 );
   30995           7 :       resultobj = t_output_helper(resultobj,r);
   30996             :     }
   30997             :   }
   30998          11 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   30999             :   return resultobj;
   31000             : fail:
   31001             :   return NULL;
   31002             : }
   31003             : 
   31004             : 
   31005           7 : SWIGINTERN PyObject *_wrap_MDArray_GetNoDataValueAsUInt64(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   31006           7 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   31007           7 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   31008           7 :   GUIntBig *arg2 = (GUIntBig *) 0 ;
   31009           7 :   int *arg3 = (int *) 0 ;
   31010           7 :   void *argp1 = 0 ;
   31011           7 :   int res1 = 0 ;
   31012           7 :   GUIntBig tmpval2 ;
   31013           7 :   int tmphasval2 ;
   31014           7 :   PyObject *swig_obj[1] ;
   31015             :   
   31016           7 :   {
   31017             :     /* %typemap(python,in,numinputs=0) (GUIntBig *val, int *hasval) */
   31018           7 :     arg2 = &tmpval2;
   31019           7 :     arg3 = &tmphasval2;
   31020             :   }
   31021           7 :   if (!args) SWIG_fail;
   31022           7 :   swig_obj[0] = args;
   31023           7 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   31024           7 :   if (!SWIG_IsOK(res1)) {
   31025           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetNoDataValueAsUInt64" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   31026             :   }
   31027           7 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   31028           7 :   {
   31029           7 :     const int bLocalUseExceptions = GetUseExceptions();
   31030           7 :     if ( bLocalUseExceptions ) {
   31031           0 :       pushErrorHandler();
   31032             :     }
   31033           7 :     {
   31034           7 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   31035           7 :       GDALMDArrayHS_GetNoDataValueAsUInt64(arg1,arg2,arg3);
   31036           7 :       SWIG_PYTHON_THREAD_END_ALLOW;
   31037             :     }
   31038           7 :     if ( bLocalUseExceptions ) {
   31039           0 :       popErrorHandler();
   31040             :     }
   31041             : #ifndef SED_HACKS
   31042             :     if ( bLocalUseExceptions ) {
   31043             :       CPLErr eclass = CPLGetLastErrorType();
   31044             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   31045             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   31046             :       }
   31047             :     }
   31048             : #endif
   31049             :   }
   31050           7 :   resultobj = SWIG_Py_Void();
   31051           7 :   {
   31052             :     /* %typemap(python,argout) (GUIntBig *val, int *hasval) */
   31053           7 :     PyObject *r;
   31054           7 :     if ( !*arg3 ) {
   31055           2 :       Py_INCREF(Py_None);
   31056           2 :       r = Py_None;
   31057           2 :       resultobj = t_output_helper(resultobj,r);
   31058             :     }
   31059             :     else {
   31060           5 :       r = PyLong_FromUnsignedLongLong( *arg2 );
   31061           5 :       resultobj = t_output_helper(resultobj,r);
   31062             :     }
   31063             :   }
   31064           7 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   31065             :   return resultobj;
   31066             : fail:
   31067             :   return NULL;
   31068             : }
   31069             : 
   31070             : 
   31071           5 : SWIGINTERN PyObject *_wrap_MDArray_GetNoDataValueAsString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   31072           5 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   31073           5 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   31074           5 :   void *argp1 = 0 ;
   31075           5 :   int res1 = 0 ;
   31076           5 :   PyObject *swig_obj[1] ;
   31077           5 :   retStringAndCPLFree *result = 0 ;
   31078             :   
   31079           5 :   if (!args) SWIG_fail;
   31080           5 :   swig_obj[0] = args;
   31081           5 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   31082           5 :   if (!SWIG_IsOK(res1)) {
   31083           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetNoDataValueAsString" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   31084             :   }
   31085           5 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   31086           5 :   {
   31087           5 :     const int bLocalUseExceptions = GetUseExceptions();
   31088           5 :     if ( bLocalUseExceptions ) {
   31089           0 :       pushErrorHandler();
   31090             :     }
   31091           5 :     {
   31092           5 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   31093           5 :       result = (retStringAndCPLFree *)GDALMDArrayHS_GetNoDataValueAsString(arg1);
   31094           5 :       SWIG_PYTHON_THREAD_END_ALLOW;
   31095             :     }
   31096           5 :     if ( bLocalUseExceptions ) {
   31097           0 :       popErrorHandler();
   31098             :     }
   31099             : #ifndef SED_HACKS
   31100             :     if ( bLocalUseExceptions ) {
   31101             :       CPLErr eclass = CPLGetLastErrorType();
   31102             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   31103             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   31104             :       }
   31105             :     }
   31106             : #endif
   31107             :   }
   31108           5 :   {
   31109             :     /* %typemap(out) (retStringAndCPLFree*) */
   31110           5 :     Py_XDECREF(resultobj);
   31111           5 :     if(result)
   31112             :     {
   31113           2 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   31114           2 :       CPLFree(result);
   31115             :     }
   31116             :     else
   31117             :     {
   31118           3 :       resultobj = Py_None;
   31119           3 :       Py_INCREF(resultobj);
   31120             :     }
   31121             :   }
   31122           5 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   31123             :   return resultobj;
   31124             : fail:
   31125             :   return NULL;
   31126             : }
   31127             : 
   31128             : 
   31129          50 : SWIGINTERN PyObject *_wrap_MDArray_SetNoDataValueDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   31130          50 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   31131          50 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   31132          50 :   double arg2 ;
   31133          50 :   void *argp1 = 0 ;
   31134          50 :   int res1 = 0 ;
   31135          50 :   double val2 ;
   31136          50 :   int ecode2 = 0 ;
   31137          50 :   PyObject *swig_obj[2] ;
   31138          50 :   CPLErr result;
   31139             :   
   31140          50 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_SetNoDataValueDouble", 2, 2, swig_obj)) SWIG_fail;
   31141          50 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   31142          50 :   if (!SWIG_IsOK(res1)) {
   31143           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_SetNoDataValueDouble" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   31144             :   }
   31145          50 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   31146          50 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   31147          50 :   if (!SWIG_IsOK(ecode2)) {
   31148           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MDArray_SetNoDataValueDouble" "', argument " "2"" of type '" "double""'");
   31149             :   } 
   31150          50 :   arg2 = static_cast< double >(val2);
   31151          50 :   {
   31152          50 :     const int bLocalUseExceptions = GetUseExceptions();
   31153          50 :     if ( bLocalUseExceptions ) {
   31154           3 :       pushErrorHandler();
   31155             :     }
   31156          50 :     {
   31157          50 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   31158         100 :       CPL_IGNORE_RET_VAL(result = (CPLErr)GDALMDArrayHS_SetNoDataValueDouble(arg1,arg2));
   31159          50 :       SWIG_PYTHON_THREAD_END_ALLOW;
   31160             :     }
   31161          50 :     if ( bLocalUseExceptions ) {
   31162           3 :       popErrorHandler();
   31163             :     }
   31164             : #ifndef SED_HACKS
   31165             :     if ( bLocalUseExceptions ) {
   31166             :       CPLErr eclass = CPLGetLastErrorType();
   31167             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   31168             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   31169             :       }
   31170             :     }
   31171             : #endif
   31172             :   }
   31173          50 :   resultobj = SWIG_From_int(static_cast< int >(result));
   31174          51 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   31175             :   return resultobj;
   31176             : fail:
   31177             :   return NULL;
   31178             : }
   31179             : 
   31180             : 
   31181           1 : SWIGINTERN PyObject *_wrap_MDArray_SetNoDataValueInt64(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   31182           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   31183           1 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   31184           1 :   GIntBig arg2 ;
   31185           1 :   void *argp1 = 0 ;
   31186           1 :   int res1 = 0 ;
   31187           1 :   PyObject *swig_obj[2] ;
   31188           1 :   CPLErr result;
   31189             :   
   31190           1 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_SetNoDataValueInt64", 2, 2, swig_obj)) SWIG_fail;
   31191           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   31192           1 :   if (!SWIG_IsOK(res1)) {
   31193           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_SetNoDataValueInt64" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   31194             :   }
   31195           1 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   31196           1 :   {
   31197           1 :     arg2 = (GIntBig)PyLong_AsLongLong(swig_obj[1]);
   31198             :   }
   31199           1 :   {
   31200           1 :     const int bLocalUseExceptions = GetUseExceptions();
   31201           1 :     if ( bLocalUseExceptions ) {
   31202           0 :       pushErrorHandler();
   31203             :     }
   31204           1 :     {
   31205           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   31206           2 :       CPL_IGNORE_RET_VAL(result = (CPLErr)GDALMDArrayHS_SetNoDataValueInt64(arg1,arg2));
   31207           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   31208             :     }
   31209           1 :     if ( bLocalUseExceptions ) {
   31210           0 :       popErrorHandler();
   31211             :     }
   31212             : #ifndef SED_HACKS
   31213             :     if ( bLocalUseExceptions ) {
   31214             :       CPLErr eclass = CPLGetLastErrorType();
   31215             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   31216             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   31217             :       }
   31218             :     }
   31219             : #endif
   31220             :   }
   31221           1 :   resultobj = SWIG_From_int(static_cast< int >(result));
   31222           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   31223             :   return resultobj;
   31224             : fail:
   31225             :   return NULL;
   31226             : }
   31227             : 
   31228             : 
   31229           1 : SWIGINTERN PyObject *_wrap_MDArray_SetNoDataValueUInt64(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   31230           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   31231           1 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   31232           1 :   GUIntBig arg2 ;
   31233           1 :   void *argp1 = 0 ;
   31234           1 :   int res1 = 0 ;
   31235           1 :   PyObject *swig_obj[2] ;
   31236           1 :   CPLErr result;
   31237             :   
   31238           1 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_SetNoDataValueUInt64", 2, 2, swig_obj)) SWIG_fail;
   31239           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   31240           1 :   if (!SWIG_IsOK(res1)) {
   31241           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_SetNoDataValueUInt64" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   31242             :   }
   31243           1 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   31244           1 :   {
   31245           1 :     arg2 = (GIntBig)PyLong_AsUnsignedLongLong(swig_obj[1]);
   31246             :   }
   31247           1 :   {
   31248           1 :     const int bLocalUseExceptions = GetUseExceptions();
   31249           1 :     if ( bLocalUseExceptions ) {
   31250           0 :       pushErrorHandler();
   31251             :     }
   31252           1 :     {
   31253           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   31254           2 :       CPL_IGNORE_RET_VAL(result = (CPLErr)GDALMDArrayHS_SetNoDataValueUInt64(arg1,arg2));
   31255           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   31256             :     }
   31257           1 :     if ( bLocalUseExceptions ) {
   31258           0 :       popErrorHandler();
   31259             :     }
   31260             : #ifndef SED_HACKS
   31261             :     if ( bLocalUseExceptions ) {
   31262             :       CPLErr eclass = CPLGetLastErrorType();
   31263             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   31264             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   31265             :       }
   31266             :     }
   31267             : #endif
   31268             :   }
   31269           1 :   resultobj = SWIG_From_int(static_cast< int >(result));
   31270           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   31271             :   return resultobj;
   31272             : fail:
   31273             :   return NULL;
   31274             : }
   31275             : 
   31276             : 
   31277           3 : SWIGINTERN PyObject *_wrap_MDArray_SetNoDataValueString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   31278           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   31279           3 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   31280           3 :   char *arg2 = (char *) 0 ;
   31281           3 :   void *argp1 = 0 ;
   31282           3 :   int res1 = 0 ;
   31283           3 :   int res2 ;
   31284           3 :   char *buf2 = 0 ;
   31285           3 :   int alloc2 = 0 ;
   31286           3 :   PyObject *swig_obj[2] ;
   31287           3 :   CPLErr result;
   31288             :   
   31289           3 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_SetNoDataValueString", 2, 2, swig_obj)) SWIG_fail;
   31290           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   31291           3 :   if (!SWIG_IsOK(res1)) {
   31292           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_SetNoDataValueString" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   31293             :   }
   31294           3 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   31295           3 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   31296           3 :   if (!SWIG_IsOK(res2)) {
   31297           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MDArray_SetNoDataValueString" "', argument " "2"" of type '" "char const *""'");
   31298             :   }
   31299           3 :   arg2 = reinterpret_cast< char * >(buf2);
   31300           3 :   {
   31301           3 :     const int bLocalUseExceptions = GetUseExceptions();
   31302           3 :     if ( bLocalUseExceptions ) {
   31303           0 :       pushErrorHandler();
   31304             :     }
   31305           3 :     {
   31306           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   31307           3 :       CPL_IGNORE_RET_VAL(result = (CPLErr)GDALMDArrayHS_SetNoDataValueString(arg1,(char const *)arg2));
   31308           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   31309             :     }
   31310           3 :     if ( bLocalUseExceptions ) {
   31311           0 :       popErrorHandler();
   31312             :     }
   31313             : #ifndef SED_HACKS
   31314             :     if ( bLocalUseExceptions ) {
   31315             :       CPLErr eclass = CPLGetLastErrorType();
   31316             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   31317             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   31318             :       }
   31319             :     }
   31320             : #endif
   31321             :   }
   31322           3 :   resultobj = SWIG_From_int(static_cast< int >(result));
   31323           3 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   31324           3 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   31325             :   return resultobj;
   31326           0 : fail:
   31327           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   31328             :   return NULL;
   31329             : }
   31330             : 
   31331             : 
   31332           8 : SWIGINTERN PyObject *_wrap_MDArray_SetNoDataValueRaw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   31333           8 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   31334           8 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   31335           8 :   GIntBig arg2 ;
   31336           8 :   char *arg3 = (char *) 0 ;
   31337           8 :   void *argp1 = 0 ;
   31338           8 :   int res1 = 0 ;
   31339           8 :   int alloc2 = 0 ;
   31340           8 :   bool viewIsValid2 = false ;
   31341           8 :   Py_buffer view2 ;
   31342           8 :   PyObject *swig_obj[2] ;
   31343           8 :   CPLErr result;
   31344             :   
   31345           8 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_SetNoDataValueRaw", 2, 2, swig_obj)) SWIG_fail;
   31346           8 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   31347           8 :   if (!SWIG_IsOK(res1)) {
   31348           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_SetNoDataValueRaw" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   31349             :   }
   31350           8 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   31351           8 :   {
   31352             :     /* %typemap(in,numinputs=1) (GIntBig nLen, char *pBuf ) */
   31353           8 :     char* ptr = NULL;
   31354           8 :     if( !GetBufferAsCharPtrGIntBigSize(swig_obj[1], &arg2, &ptr, &alloc2, &viewIsValid2, &view2) ) {
   31355           0 :       SWIG_fail;
   31356             :     }
   31357           8 :     arg3 = (char *)ptr;
   31358             :   }
   31359           8 :   {
   31360           8 :     const int bLocalUseExceptions = GetUseExceptions();
   31361           8 :     if ( bLocalUseExceptions ) {
   31362           1 :       pushErrorHandler();
   31363             :     }
   31364           8 :     {
   31365           8 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   31366           8 :       CPL_IGNORE_RET_VAL(result = (CPLErr)GDALMDArrayHS_SetNoDataValueRaw(arg1,arg2,arg3));
   31367           8 :       SWIG_PYTHON_THREAD_END_ALLOW;
   31368             :     }
   31369           8 :     if ( bLocalUseExceptions ) {
   31370           1 :       popErrorHandler();
   31371             :     }
   31372             : #ifndef SED_HACKS
   31373             :     if ( bLocalUseExceptions ) {
   31374             :       CPLErr eclass = CPLGetLastErrorType();
   31375             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   31376             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   31377             :       }
   31378             :     }
   31379             : #endif
   31380             :   }
   31381           8 :   resultobj = SWIG_From_int(static_cast< int >(result));
   31382           8 :   {
   31383             :     /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
   31384           8 :     if( viewIsValid2 ) {
   31385           8 :       PyBuffer_Release(&view2);
   31386             :     }
   31387           0 :     else if (ReturnSame(alloc2) == SWIG_NEWOBJ ) {
   31388           0 :       delete[] arg3;
   31389             :     }
   31390             :   }
   31391           8 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   31392             :   return resultobj;
   31393           0 : fail:
   31394           0 :   {
   31395             :     /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
   31396           0 :     if( viewIsValid2 ) {
   31397           0 :       PyBuffer_Release(&view2);
   31398             :     }
   31399           8 :     else if (ReturnSame(alloc2) == SWIG_NEWOBJ ) {
   31400             :       delete[] arg3;
   31401             :     }
   31402             :   }
   31403             :   return NULL;
   31404             : }
   31405             : 
   31406             : 
   31407           4 : SWIGINTERN PyObject *_wrap_MDArray_DeleteNoDataValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   31408           4 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   31409           4 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   31410           4 :   void *argp1 = 0 ;
   31411           4 :   int res1 = 0 ;
   31412           4 :   PyObject *swig_obj[1] ;
   31413           4 :   CPLErr result;
   31414             :   
   31415           4 :   if (!args) SWIG_fail;
   31416           4 :   swig_obj[0] = args;
   31417           4 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   31418           4 :   if (!SWIG_IsOK(res1)) {
   31419           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_DeleteNoDataValue" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   31420             :   }
   31421           4 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   31422           4 :   {
   31423           4 :     const int bLocalUseExceptions = GetUseExceptions();
   31424           4 :     if ( bLocalUseExceptions ) {
   31425           0 :       pushErrorHandler();
   31426             :     }
   31427           4 :     {
   31428           4 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   31429           8 :       CPL_IGNORE_RET_VAL(result = (CPLErr)GDALMDArrayHS_DeleteNoDataValue(arg1));
   31430           4 :       SWIG_PYTHON_THREAD_END_ALLOW;
   31431             :     }
   31432           4 :     if ( bLocalUseExceptions ) {
   31433           0 :       popErrorHandler();
   31434             :     }
   31435             : #ifndef SED_HACKS
   31436             :     if ( bLocalUseExceptions ) {
   31437             :       CPLErr eclass = CPLGetLastErrorType();
   31438             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   31439             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   31440             :       }
   31441             :     }
   31442             : #endif
   31443             :   }
   31444           4 :   resultobj = SWIG_From_int(static_cast< int >(result));
   31445           4 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   31446             :   return resultobj;
   31447             : fail:
   31448             :   return NULL;
   31449             : }
   31450             : 
   31451             : 
   31452          99 : SWIGINTERN PyObject *_wrap_MDArray_GetOffset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   31453          99 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   31454          99 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   31455          99 :   double *arg2 = (double *) 0 ;
   31456          99 :   int *arg3 = (int *) 0 ;
   31457          99 :   void *argp1 = 0 ;
   31458          99 :   int res1 = 0 ;
   31459          99 :   double tmpval2 ;
   31460          99 :   int tmphasval2 ;
   31461          99 :   PyObject *swig_obj[1] ;
   31462             :   
   31463          99 :   {
   31464             :     /* %typemap(python,in,numinputs=0) (double *val, int *hasval) */
   31465          99 :     arg2 = &tmpval2;
   31466          99 :     arg3 = &tmphasval2;
   31467             :   }
   31468          99 :   if (!args) SWIG_fail;
   31469          99 :   swig_obj[0] = args;
   31470          99 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   31471          99 :   if (!SWIG_IsOK(res1)) {
   31472           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetOffset" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   31473             :   }
   31474          99 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   31475          99 :   {
   31476          99 :     const int bLocalUseExceptions = GetUseExceptions();
   31477          99 :     if ( bLocalUseExceptions ) {
   31478           0 :       pushErrorHandler();
   31479             :     }
   31480          99 :     {
   31481          99 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   31482          99 :       GDALMDArrayHS_GetOffset(arg1,arg2,arg3);
   31483          99 :       SWIG_PYTHON_THREAD_END_ALLOW;
   31484             :     }
   31485          99 :     if ( bLocalUseExceptions ) {
   31486           0 :       popErrorHandler();
   31487             :     }
   31488             : #ifndef SED_HACKS
   31489             :     if ( bLocalUseExceptions ) {
   31490             :       CPLErr eclass = CPLGetLastErrorType();
   31491             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   31492             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   31493             :       }
   31494             :     }
   31495             : #endif
   31496             :   }
   31497          99 :   resultobj = SWIG_Py_Void();
   31498          99 :   {
   31499             :     /* %typemap(python,argout) (double *val, int *hasval) */
   31500          99 :     PyObject *r;
   31501          99 :     if ( !*arg3 ) {
   31502          82 :       Py_INCREF(Py_None);
   31503          82 :       r = Py_None;
   31504          82 :       resultobj = t_output_helper(resultobj,r);
   31505             :     }
   31506             :     else {
   31507          17 :       r = PyFloat_FromDouble( *arg2 );
   31508          17 :       resultobj = t_output_helper(resultobj,r);
   31509             :     }
   31510             :   }
   31511          99 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   31512             :   return resultobj;
   31513             : fail:
   31514             :   return NULL;
   31515             : }
   31516             : 
   31517             : 
   31518           5 : SWIGINTERN PyObject *_wrap_MDArray_GetOffsetStorageType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   31519           5 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   31520           5 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   31521           5 :   void *argp1 = 0 ;
   31522           5 :   int res1 = 0 ;
   31523           5 :   PyObject *swig_obj[1] ;
   31524           5 :   GDALDataType result;
   31525             :   
   31526           5 :   if (!args) SWIG_fail;
   31527           5 :   swig_obj[0] = args;
   31528           5 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   31529           5 :   if (!SWIG_IsOK(res1)) {
   31530           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetOffsetStorageType" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   31531             :   }
   31532           5 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   31533           5 :   {
   31534           5 :     const int bLocalUseExceptions = GetUseExceptions();
   31535           5 :     if ( bLocalUseExceptions ) {
   31536           0 :       pushErrorHandler();
   31537             :     }
   31538           5 :     {
   31539           5 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   31540           5 :       result = (GDALDataType)GDALMDArrayHS_GetOffsetStorageType(arg1);
   31541           5 :       SWIG_PYTHON_THREAD_END_ALLOW;
   31542             :     }
   31543           5 :     if ( bLocalUseExceptions ) {
   31544           0 :       popErrorHandler();
   31545             :     }
   31546             : #ifndef SED_HACKS
   31547             :     if ( bLocalUseExceptions ) {
   31548             :       CPLErr eclass = CPLGetLastErrorType();
   31549             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   31550             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   31551             :       }
   31552             :     }
   31553             : #endif
   31554             :   }
   31555           5 :   resultobj = SWIG_From_int(static_cast< int >(result));
   31556           5 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   31557             :   return resultobj;
   31558             : fail:
   31559             :   return NULL;
   31560             : }
   31561             : 
   31562             : 
   31563         102 : SWIGINTERN PyObject *_wrap_MDArray_GetScale(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   31564         102 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   31565         102 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   31566         102 :   double *arg2 = (double *) 0 ;
   31567         102 :   int *arg3 = (int *) 0 ;
   31568         102 :   void *argp1 = 0 ;
   31569         102 :   int res1 = 0 ;
   31570         102 :   double tmpval2 ;
   31571         102 :   int tmphasval2 ;
   31572         102 :   PyObject *swig_obj[1] ;
   31573             :   
   31574         102 :   {
   31575             :     /* %typemap(python,in,numinputs=0) (double *val, int *hasval) */
   31576         102 :     arg2 = &tmpval2;
   31577         102 :     arg3 = &tmphasval2;
   31578             :   }
   31579         102 :   if (!args) SWIG_fail;
   31580         102 :   swig_obj[0] = args;
   31581         102 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   31582         102 :   if (!SWIG_IsOK(res1)) {
   31583           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetScale" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   31584             :   }
   31585         102 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   31586         102 :   {
   31587         102 :     const int bLocalUseExceptions = GetUseExceptions();
   31588         102 :     if ( bLocalUseExceptions ) {
   31589           0 :       pushErrorHandler();
   31590             :     }
   31591         102 :     {
   31592         102 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   31593         102 :       GDALMDArrayHS_GetScale(arg1,arg2,arg3);
   31594         102 :       SWIG_PYTHON_THREAD_END_ALLOW;
   31595             :     }
   31596         102 :     if ( bLocalUseExceptions ) {
   31597           0 :       popErrorHandler();
   31598             :     }
   31599             : #ifndef SED_HACKS
   31600             :     if ( bLocalUseExceptions ) {
   31601             :       CPLErr eclass = CPLGetLastErrorType();
   31602             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   31603             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   31604             :       }
   31605             :     }
   31606             : #endif
   31607             :   }
   31608         102 :   resultobj = SWIG_Py_Void();
   31609         102 :   {
   31610             :     /* %typemap(python,argout) (double *val, int *hasval) */
   31611         102 :     PyObject *r;
   31612         102 :     if ( !*arg3 ) {
   31613          82 :       Py_INCREF(Py_None);
   31614          82 :       r = Py_None;
   31615          82 :       resultobj = t_output_helper(resultobj,r);
   31616             :     }
   31617             :     else {
   31618          20 :       r = PyFloat_FromDouble( *arg2 );
   31619          20 :       resultobj = t_output_helper(resultobj,r);
   31620             :     }
   31621             :   }
   31622         102 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   31623             :   return resultobj;
   31624             : fail:
   31625             :   return NULL;
   31626             : }
   31627             : 
   31628             : 
   31629           5 : SWIGINTERN PyObject *_wrap_MDArray_GetScaleStorageType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   31630           5 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   31631           5 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   31632           5 :   void *argp1 = 0 ;
   31633           5 :   int res1 = 0 ;
   31634           5 :   PyObject *swig_obj[1] ;
   31635           5 :   GDALDataType result;
   31636             :   
   31637           5 :   if (!args) SWIG_fail;
   31638           5 :   swig_obj[0] = args;
   31639           5 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   31640           5 :   if (!SWIG_IsOK(res1)) {
   31641           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetScaleStorageType" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   31642             :   }
   31643           5 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   31644           5 :   {
   31645           5 :     const int bLocalUseExceptions = GetUseExceptions();
   31646           5 :     if ( bLocalUseExceptions ) {
   31647           0 :       pushErrorHandler();
   31648             :     }
   31649           5 :     {
   31650           5 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   31651           5 :       result = (GDALDataType)GDALMDArrayHS_GetScaleStorageType(arg1);
   31652           5 :       SWIG_PYTHON_THREAD_END_ALLOW;
   31653             :     }
   31654           5 :     if ( bLocalUseExceptions ) {
   31655           0 :       popErrorHandler();
   31656             :     }
   31657             : #ifndef SED_HACKS
   31658             :     if ( bLocalUseExceptions ) {
   31659             :       CPLErr eclass = CPLGetLastErrorType();
   31660             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   31661             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   31662             :       }
   31663             :     }
   31664             : #endif
   31665             :   }
   31666           5 :   resultobj = SWIG_From_int(static_cast< int >(result));
   31667           5 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   31668             :   return resultobj;
   31669             : fail:
   31670             :   return NULL;
   31671             : }
   31672             : 
   31673             : 
   31674          20 : SWIGINTERN PyObject *_wrap_MDArray_SetOffset(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   31675          20 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   31676          20 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   31677          20 :   double arg2 ;
   31678          20 :   GDALDataType arg3 = (GDALDataType) GDT_Unknown ;
   31679          20 :   void *argp1 = 0 ;
   31680          20 :   int res1 = 0 ;
   31681          20 :   double val2 ;
   31682          20 :   int ecode2 = 0 ;
   31683          20 :   PyObject * obj0 = 0 ;
   31684          20 :   PyObject * obj1 = 0 ;
   31685          20 :   PyObject * obj2 = 0 ;
   31686          20 :   char * kwnames[] = {
   31687             :     (char *)"self",  (char *)"val",  (char *)"storageType",  NULL 
   31688             :   };
   31689          20 :   CPLErr result;
   31690             :   
   31691          20 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|O:MDArray_SetOffset", kwnames, &obj0, &obj1, &obj2)) SWIG_fail;
   31692          20 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   31693          20 :   if (!SWIG_IsOK(res1)) {
   31694           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_SetOffset" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   31695             :   }
   31696          20 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   31697          20 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   31698          20 :   if (!SWIG_IsOK(ecode2)) {
   31699           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MDArray_SetOffset" "', argument " "2"" of type '" "double""'");
   31700             :   } 
   31701          20 :   arg2 = static_cast< double >(val2);
   31702          20 :   if (obj2) {
   31703           2 :     {
   31704             :       // %typemap(in) GDALDataType
   31705           2 :       int val = 0;
   31706           2 :       int ecode = SWIG_AsVal_int(obj2, &val);
   31707           2 :       if (!SWIG_IsOK(ecode)) {
   31708           0 :         SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   31709             :       }
   31710           2 :       if( val < GDT_Unknown || val >= GDT_TypeCount )
   31711             :       {
   31712           0 :         SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   31713             :       }
   31714             :       arg3 = static_cast<GDALDataType>(val);
   31715             :     }
   31716             :   }
   31717          20 :   {
   31718          20 :     const int bLocalUseExceptions = GetUseExceptions();
   31719          20 :     if ( bLocalUseExceptions ) {
   31720           1 :       pushErrorHandler();
   31721             :     }
   31722          20 :     {
   31723          20 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   31724          40 :       CPL_IGNORE_RET_VAL(result = (CPLErr)GDALMDArrayHS_SetOffset(arg1,arg2,arg3));
   31725          20 :       SWIG_PYTHON_THREAD_END_ALLOW;
   31726             :     }
   31727          20 :     if ( bLocalUseExceptions ) {
   31728           1 :       popErrorHandler();
   31729             :     }
   31730             : #ifndef SED_HACKS
   31731             :     if ( bLocalUseExceptions ) {
   31732             :       CPLErr eclass = CPLGetLastErrorType();
   31733             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   31734             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   31735             :       }
   31736             :     }
   31737             : #endif
   31738             :   }
   31739          20 :   resultobj = SWIG_From_int(static_cast< int >(result));
   31740          20 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   31741             :   return resultobj;
   31742             : fail:
   31743             :   return NULL;
   31744             : }
   31745             : 
   31746             : 
   31747          20 : SWIGINTERN PyObject *_wrap_MDArray_SetScale(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   31748          20 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   31749          20 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   31750          20 :   double arg2 ;
   31751          20 :   GDALDataType arg3 = (GDALDataType) GDT_Unknown ;
   31752          20 :   void *argp1 = 0 ;
   31753          20 :   int res1 = 0 ;
   31754          20 :   double val2 ;
   31755          20 :   int ecode2 = 0 ;
   31756          20 :   PyObject * obj0 = 0 ;
   31757          20 :   PyObject * obj1 = 0 ;
   31758          20 :   PyObject * obj2 = 0 ;
   31759          20 :   char * kwnames[] = {
   31760             :     (char *)"self",  (char *)"val",  (char *)"storageType",  NULL 
   31761             :   };
   31762          20 :   CPLErr result;
   31763             :   
   31764          20 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|O:MDArray_SetScale", kwnames, &obj0, &obj1, &obj2)) SWIG_fail;
   31765          20 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   31766          20 :   if (!SWIG_IsOK(res1)) {
   31767           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_SetScale" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   31768             :   }
   31769          20 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   31770          20 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   31771          20 :   if (!SWIG_IsOK(ecode2)) {
   31772           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MDArray_SetScale" "', argument " "2"" of type '" "double""'");
   31773             :   } 
   31774          20 :   arg2 = static_cast< double >(val2);
   31775          20 :   if (obj2) {
   31776           2 :     {
   31777             :       // %typemap(in) GDALDataType
   31778           2 :       int val = 0;
   31779           2 :       int ecode = SWIG_AsVal_int(obj2, &val);
   31780           2 :       if (!SWIG_IsOK(ecode)) {
   31781           0 :         SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   31782             :       }
   31783           2 :       if( val < GDT_Unknown || val >= GDT_TypeCount )
   31784             :       {
   31785           0 :         SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   31786             :       }
   31787             :       arg3 = static_cast<GDALDataType>(val);
   31788             :     }
   31789             :   }
   31790          20 :   {
   31791          20 :     const int bLocalUseExceptions = GetUseExceptions();
   31792          20 :     if ( bLocalUseExceptions ) {
   31793           1 :       pushErrorHandler();
   31794             :     }
   31795          20 :     {
   31796          20 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   31797          40 :       CPL_IGNORE_RET_VAL(result = (CPLErr)GDALMDArrayHS_SetScale(arg1,arg2,arg3));
   31798          20 :       SWIG_PYTHON_THREAD_END_ALLOW;
   31799             :     }
   31800          20 :     if ( bLocalUseExceptions ) {
   31801           1 :       popErrorHandler();
   31802             :     }
   31803             : #ifndef SED_HACKS
   31804             :     if ( bLocalUseExceptions ) {
   31805             :       CPLErr eclass = CPLGetLastErrorType();
   31806             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   31807             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   31808             :       }
   31809             :     }
   31810             : #endif
   31811             :   }
   31812          20 :   resultobj = SWIG_From_int(static_cast< int >(result));
   31813          20 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   31814             :   return resultobj;
   31815             : fail:
   31816             :   return NULL;
   31817             : }
   31818             : 
   31819             : 
   31820          14 : SWIGINTERN PyObject *_wrap_MDArray_SetUnit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   31821          14 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   31822          14 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   31823          14 :   char *arg2 = (char *) 0 ;
   31824          14 :   void *argp1 = 0 ;
   31825          14 :   int res1 = 0 ;
   31826          14 :   int res2 ;
   31827          14 :   char *buf2 = 0 ;
   31828          14 :   int alloc2 = 0 ;
   31829          14 :   PyObject *swig_obj[2] ;
   31830          14 :   CPLErr result;
   31831             :   
   31832          14 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_SetUnit", 2, 2, swig_obj)) SWIG_fail;
   31833          14 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   31834          14 :   if (!SWIG_IsOK(res1)) {
   31835           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_SetUnit" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   31836             :   }
   31837          14 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   31838          14 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   31839          14 :   if (!SWIG_IsOK(res2)) {
   31840           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MDArray_SetUnit" "', argument " "2"" of type '" "char const *""'");
   31841             :   }
   31842          14 :   arg2 = reinterpret_cast< char * >(buf2);
   31843          14 :   {
   31844          14 :     const int bLocalUseExceptions = GetUseExceptions();
   31845          14 :     if ( bLocalUseExceptions ) {
   31846           3 :       pushErrorHandler();
   31847             :     }
   31848          14 :     {
   31849          14 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   31850          28 :       CPL_IGNORE_RET_VAL(result = (CPLErr)GDALMDArrayHS_SetUnit(arg1,(char const *)arg2));
   31851          14 :       SWIG_PYTHON_THREAD_END_ALLOW;
   31852             :     }
   31853          14 :     if ( bLocalUseExceptions ) {
   31854           3 :       popErrorHandler();
   31855             :     }
   31856             : #ifndef SED_HACKS
   31857             :     if ( bLocalUseExceptions ) {
   31858             :       CPLErr eclass = CPLGetLastErrorType();
   31859             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   31860             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   31861             :       }
   31862             :     }
   31863             : #endif
   31864             :   }
   31865          14 :   resultobj = SWIG_From_int(static_cast< int >(result));
   31866          14 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   31867          14 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   31868             :   return resultobj;
   31869           0 : fail:
   31870           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   31871             :   return NULL;
   31872             : }
   31873             : 
   31874             : 
   31875         110 : SWIGINTERN PyObject *_wrap_MDArray_GetUnit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   31876         110 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   31877         110 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   31878         110 :   void *argp1 = 0 ;
   31879         110 :   int res1 = 0 ;
   31880         110 :   PyObject *swig_obj[1] ;
   31881         110 :   char *result = 0 ;
   31882             :   
   31883         110 :   if (!args) SWIG_fail;
   31884         110 :   swig_obj[0] = args;
   31885         110 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   31886         110 :   if (!SWIG_IsOK(res1)) {
   31887           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetUnit" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   31888             :   }
   31889         110 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   31890         110 :   {
   31891         110 :     const int bLocalUseExceptions = GetUseExceptions();
   31892         110 :     if ( bLocalUseExceptions ) {
   31893           6 :       pushErrorHandler();
   31894             :     }
   31895         110 :     {
   31896         110 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   31897         110 :       result = (char *)GDALMDArrayHS_GetUnit(arg1);
   31898         110 :       SWIG_PYTHON_THREAD_END_ALLOW;
   31899             :     }
   31900         110 :     if ( bLocalUseExceptions ) {
   31901           6 :       popErrorHandler();
   31902             :     }
   31903             : #ifndef SED_HACKS
   31904             :     if ( bLocalUseExceptions ) {
   31905             :       CPLErr eclass = CPLGetLastErrorType();
   31906             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   31907             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   31908             :       }
   31909             :     }
   31910             : #endif
   31911             :   }
   31912         110 :   resultobj = SWIG_FromCharPtr((const char *)result);
   31913         110 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   31914             :   return resultobj;
   31915             : fail:
   31916             :   return NULL;
   31917             : }
   31918             : 
   31919             : 
   31920          30 : SWIGINTERN PyObject *_wrap_MDArray_SetSpatialRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   31921          30 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   31922          30 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   31923          30 :   OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
   31924          30 :   void *argp1 = 0 ;
   31925          30 :   int res1 = 0 ;
   31926          30 :   void *argp2 = 0 ;
   31927          30 :   int res2 = 0 ;
   31928          30 :   PyObject *swig_obj[2] ;
   31929          30 :   OGRErr result;
   31930             :   
   31931          30 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_SetSpatialRef", 2, 2, swig_obj)) SWIG_fail;
   31932          30 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   31933          30 :   if (!SWIG_IsOK(res1)) {
   31934           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_SetSpatialRef" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   31935             :   }
   31936          30 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   31937          30 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
   31938          30 :   if (!SWIG_IsOK(res2)) {
   31939           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MDArray_SetSpatialRef" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'"); 
   31940             :   }
   31941          30 :   arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
   31942          30 :   {
   31943          30 :     const int bLocalUseExceptions = GetUseExceptions();
   31944          30 :     if ( bLocalUseExceptions ) {
   31945           4 :       pushErrorHandler();
   31946             :     }
   31947          30 :     {
   31948          30 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   31949          30 :       result = (OGRErr)GDALMDArrayHS_SetSpatialRef(arg1,arg2);
   31950          30 :       SWIG_PYTHON_THREAD_END_ALLOW;
   31951             :     }
   31952          30 :     if ( bLocalUseExceptions ) {
   31953           4 :       popErrorHandler();
   31954             :     }
   31955             : #ifndef SED_HACKS
   31956             :     if ( bLocalUseExceptions ) {
   31957             :       CPLErr eclass = CPLGetLastErrorType();
   31958             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   31959             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   31960             :       }
   31961             :     }
   31962             : #endif
   31963             :   }
   31964          30 :   {
   31965             :     /* %typemap(out) OGRErr */
   31966          30 :     if ( result != 0 && GetUseExceptions()) {
   31967           0 :       const char* pszMessage = CPLGetLastErrorMsg();
   31968           0 :       if( pszMessage[0] != '\0' )
   31969           0 :       PyErr_SetString( PyExc_RuntimeError, pszMessage );
   31970             :       else
   31971           0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
   31972           0 :       SWIG_fail;
   31973             :     }
   31974             :   }
   31975          30 :   {
   31976             :     /* %typemap(ret) OGRErr */
   31977          30 :     if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
   31978          30 :       resultobj = PyInt_FromLong( result );
   31979             :     }
   31980             :   }
   31981          30 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   31982             :   return resultobj;
   31983             : fail:
   31984             :   return NULL;
   31985             : }
   31986             : 
   31987             : 
   31988          77 : SWIGINTERN PyObject *_wrap_MDArray_GetSpatialRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   31989          77 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   31990          77 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   31991          77 :   void *argp1 = 0 ;
   31992          77 :   int res1 = 0 ;
   31993          77 :   PyObject *swig_obj[1] ;
   31994          77 :   OSRSpatialReferenceShadow *result = 0 ;
   31995             :   
   31996          77 :   if (!args) SWIG_fail;
   31997          77 :   swig_obj[0] = args;
   31998          77 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   31999          77 :   if (!SWIG_IsOK(res1)) {
   32000           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetSpatialRef" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   32001             :   }
   32002          77 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   32003          77 :   {
   32004          77 :     const int bLocalUseExceptions = GetUseExceptions();
   32005          77 :     if ( bLocalUseExceptions ) {
   32006          13 :       pushErrorHandler();
   32007             :     }
   32008          77 :     {
   32009          77 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32010          77 :       result = (OSRSpatialReferenceShadow *)GDALMDArrayHS_GetSpatialRef(arg1);
   32011          77 :       SWIG_PYTHON_THREAD_END_ALLOW;
   32012             :     }
   32013          77 :     if ( bLocalUseExceptions ) {
   32014          13 :       popErrorHandler();
   32015             :     }
   32016             : #ifndef SED_HACKS
   32017             :     if ( bLocalUseExceptions ) {
   32018             :       CPLErr eclass = CPLGetLastErrorType();
   32019             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   32020             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   32021             :       }
   32022             :     }
   32023             : #endif
   32024             :   }
   32025          77 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_POINTER_OWN |  0 );
   32026          77 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   32027             :   return resultobj;
   32028             : fail:
   32029             :   return NULL;
   32030             : }
   32031             : 
   32032             : 
   32033         431 : SWIGINTERN PyObject *_wrap_MDArray_GetView(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32034         431 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32035         431 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   32036         431 :   char *arg2 = (char *) 0 ;
   32037         431 :   void *argp1 = 0 ;
   32038         431 :   int res1 = 0 ;
   32039         431 :   int res2 ;
   32040         431 :   char *buf2 = 0 ;
   32041         431 :   int alloc2 = 0 ;
   32042         431 :   PyObject *swig_obj[2] ;
   32043         431 :   GDALMDArrayHS *result = 0 ;
   32044             :   
   32045         431 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_GetView", 2, 2, swig_obj)) SWIG_fail;
   32046         431 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   32047         431 :   if (!SWIG_IsOK(res1)) {
   32048           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetView" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   32049             :   }
   32050         431 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   32051         431 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   32052         431 :   if (!SWIG_IsOK(res2)) {
   32053           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MDArray_GetView" "', argument " "2"" of type '" "char const *""'");
   32054             :   }
   32055         431 :   arg2 = reinterpret_cast< char * >(buf2);
   32056         431 :   {
   32057         431 :     if (!arg2) {
   32058           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   32059             :     }
   32060             :   }
   32061         430 :   {
   32062         430 :     const int bLocalUseExceptions = GetUseExceptions();
   32063         430 :     if ( bLocalUseExceptions ) {
   32064           8 :       pushErrorHandler();
   32065             :     }
   32066         430 :     {
   32067         430 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32068         430 :       result = (GDALMDArrayHS *)GDALMDArrayHS_GetView(arg1,(char const *)arg2);
   32069         430 :       SWIG_PYTHON_THREAD_END_ALLOW;
   32070             :     }
   32071         430 :     if ( bLocalUseExceptions ) {
   32072           8 :       popErrorHandler();
   32073             :     }
   32074             : #ifndef SED_HACKS
   32075             :     if ( bLocalUseExceptions ) {
   32076             :       CPLErr eclass = CPLGetLastErrorType();
   32077             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   32078             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   32079             :       }
   32080             :     }
   32081             : #endif
   32082             :   }
   32083         430 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_OWN |  0 );
   32084         430 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   32085         431 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   32086             :   return resultobj;
   32087           1 : fail:
   32088           1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   32089             :   return NULL;
   32090             : }
   32091             : 
   32092             : 
   32093          44 : SWIGINTERN PyObject *_wrap_MDArray_Transpose(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32094          44 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32095          44 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   32096          44 :   int arg2 ;
   32097          44 :   int *arg3 = (int *) 0 ;
   32098          44 :   void *argp1 = 0 ;
   32099          44 :   int res1 = 0 ;
   32100          44 :   PyObject *swig_obj[2] ;
   32101          44 :   GDALMDArrayHS *result = 0 ;
   32102             :   
   32103          44 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_Transpose", 2, 2, swig_obj)) SWIG_fail;
   32104          44 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   32105          44 :   if (!SWIG_IsOK(res1)) {
   32106           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_Transpose" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   32107             :   }
   32108          44 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   32109          44 :   {
   32110             :     /* %typemap(in,numinputs=1) (int nList, int* pList)*/
   32111          44 :     arg3 = CreateCIntListFromSequence(swig_obj[1], &arg2);
   32112          44 :     if( arg2 < 0 ) {
   32113           0 :       SWIG_fail;
   32114             :     }
   32115             :   }
   32116          44 :   {
   32117          44 :     const int bLocalUseExceptions = GetUseExceptions();
   32118          44 :     if ( bLocalUseExceptions ) {
   32119           1 :       pushErrorHandler();
   32120             :     }
   32121          44 :     {
   32122          44 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32123          44 :       result = (GDALMDArrayHS *)GDALMDArrayHS_Transpose(arg1,arg2,arg3);
   32124          44 :       SWIG_PYTHON_THREAD_END_ALLOW;
   32125             :     }
   32126          44 :     if ( bLocalUseExceptions ) {
   32127           1 :       popErrorHandler();
   32128             :     }
   32129             : #ifndef SED_HACKS
   32130             :     if ( bLocalUseExceptions ) {
   32131             :       CPLErr eclass = CPLGetLastErrorType();
   32132             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   32133             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   32134             :       }
   32135             :     }
   32136             : #endif
   32137             :   }
   32138          44 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_OWN |  0 );
   32139          44 :   {
   32140             :     /* %typemap(freearg) (int nList, int* pList) */
   32141          44 :     free(arg3);
   32142             :   }
   32143          44 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   32144             :   return resultobj;
   32145           0 : fail:
   32146           0 :   {
   32147             :     /* %typemap(freearg) (int nList, int* pList) */
   32148           0 :     free(arg3);
   32149             :   }
   32150           0 :   return NULL;
   32151             : }
   32152             : 
   32153             : 
   32154          13 : SWIGINTERN PyObject *_wrap_MDArray_GetUnscaled(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32155          13 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32156          13 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   32157          13 :   void *argp1 = 0 ;
   32158          13 :   int res1 = 0 ;
   32159          13 :   PyObject *swig_obj[1] ;
   32160          13 :   GDALMDArrayHS *result = 0 ;
   32161             :   
   32162          13 :   if (!args) SWIG_fail;
   32163          13 :   swig_obj[0] = args;
   32164          13 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   32165          13 :   if (!SWIG_IsOK(res1)) {
   32166           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetUnscaled" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   32167             :   }
   32168          13 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   32169          13 :   {
   32170          13 :     const int bLocalUseExceptions = GetUseExceptions();
   32171          13 :     if ( bLocalUseExceptions ) {
   32172           0 :       pushErrorHandler();
   32173             :     }
   32174          13 :     {
   32175          13 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32176          13 :       result = (GDALMDArrayHS *)GDALMDArrayHS_GetUnscaled(arg1);
   32177          13 :       SWIG_PYTHON_THREAD_END_ALLOW;
   32178             :     }
   32179          13 :     if ( bLocalUseExceptions ) {
   32180           0 :       popErrorHandler();
   32181             :     }
   32182             : #ifndef SED_HACKS
   32183             :     if ( bLocalUseExceptions ) {
   32184             :       CPLErr eclass = CPLGetLastErrorType();
   32185             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   32186             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   32187             :       }
   32188             :     }
   32189             : #endif
   32190             :   }
   32191          13 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_OWN |  0 );
   32192          13 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   32193             :   return resultobj;
   32194             : fail:
   32195             :   return NULL;
   32196             : }
   32197             : 
   32198             : 
   32199          35 : SWIGINTERN PyObject *_wrap_MDArray_GetMask(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32200          35 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32201          35 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   32202          35 :   char **arg2 = (char **) 0 ;
   32203          35 :   void *argp1 = 0 ;
   32204          35 :   int res1 = 0 ;
   32205          35 :   PyObject *swig_obj[2] ;
   32206          35 :   GDALMDArrayHS *result = 0 ;
   32207             :   
   32208          35 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_GetMask", 1, 2, swig_obj)) SWIG_fail;
   32209          35 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   32210          35 :   if (!SWIG_IsOK(res1)) {
   32211           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetMask" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   32212             :   }
   32213          35 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   32214          35 :   if (swig_obj[1]) {
   32215          14 :     {
   32216             :       /* %typemap(in) char **dict */
   32217          14 :       arg2 = NULL;
   32218          14 :       if ( PySequence_Check( swig_obj[1] ) ) {
   32219          14 :         int bErr = FALSE;
   32220          14 :         arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   32221          14 :         if ( bErr )
   32222             :         {
   32223           0 :           SWIG_fail;
   32224             :         }
   32225             :       }
   32226           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   32227           0 :         int bErr = FALSE;
   32228           0 :         arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   32229           0 :         if ( bErr )
   32230             :         {
   32231           0 :           SWIG_fail;
   32232             :         }
   32233             :       }
   32234             :       else {
   32235           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   32236           0 :         SWIG_fail;
   32237             :       }
   32238             :     }
   32239             :   }
   32240          35 :   {
   32241          35 :     const int bLocalUseExceptions = GetUseExceptions();
   32242          35 :     if ( bLocalUseExceptions ) {
   32243          14 :       pushErrorHandler();
   32244             :     }
   32245          35 :     {
   32246          35 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32247          35 :       result = (GDALMDArrayHS *)GDALMDArrayHS_GetMask(arg1,arg2);
   32248          35 :       SWIG_PYTHON_THREAD_END_ALLOW;
   32249             :     }
   32250          35 :     if ( bLocalUseExceptions ) {
   32251          14 :       popErrorHandler();
   32252             :     }
   32253             : #ifndef SED_HACKS
   32254             :     if ( bLocalUseExceptions ) {
   32255             :       CPLErr eclass = CPLGetLastErrorType();
   32256             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   32257             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   32258             :       }
   32259             :     }
   32260             : #endif
   32261             :   }
   32262          35 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_OWN |  0 );
   32263          35 :   {
   32264             :     /* %typemap(freearg) char **dict */
   32265          35 :     CSLDestroy( arg2 );
   32266             :   }
   32267          41 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   32268             :   return resultobj;
   32269           0 : fail:
   32270           0 :   {
   32271             :     /* %typemap(freearg) char **dict */
   32272           0 :     CSLDestroy( arg2 );
   32273             :   }
   32274             :   return NULL;
   32275             : }
   32276             : 
   32277             : 
   32278          22 : SWIGINTERN PyObject *_wrap_MDArray_GetGridded(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   32279          22 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32280          22 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   32281          22 :   char *arg2 = (char *) 0 ;
   32282          22 :   GDALMDArrayHS *arg3 = (GDALMDArrayHS *) NULL ;
   32283          22 :   GDALMDArrayHS *arg4 = (GDALMDArrayHS *) NULL ;
   32284          22 :   char **arg5 = (char **) 0 ;
   32285          22 :   void *argp1 = 0 ;
   32286          22 :   int res1 = 0 ;
   32287          22 :   int res2 ;
   32288          22 :   char *buf2 = 0 ;
   32289          22 :   int alloc2 = 0 ;
   32290          22 :   void *argp3 = 0 ;
   32291          22 :   int res3 = 0 ;
   32292          22 :   void *argp4 = 0 ;
   32293          22 :   int res4 = 0 ;
   32294          22 :   PyObject * obj0 = 0 ;
   32295          22 :   PyObject * obj1 = 0 ;
   32296          22 :   PyObject * obj2 = 0 ;
   32297          22 :   PyObject * obj3 = 0 ;
   32298          22 :   PyObject * obj4 = 0 ;
   32299          22 :   char * kwnames[] = {
   32300             :     (char *)"self",  (char *)"pszGridOptions",  (char *)"xArray",  (char *)"yArray",  (char *)"options",  NULL 
   32301             :   };
   32302          22 :   GDALMDArrayHS *result = 0 ;
   32303             :   
   32304          22 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OOO:MDArray_GetGridded", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
   32305          22 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   32306          22 :   if (!SWIG_IsOK(res1)) {
   32307           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetGridded" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   32308             :   }
   32309          22 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   32310          22 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   32311          22 :   if (!SWIG_IsOK(res2)) {
   32312           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MDArray_GetGridded" "', argument " "2"" of type '" "char const *""'");
   32313             :   }
   32314          22 :   arg2 = reinterpret_cast< char * >(buf2);
   32315          22 :   if (obj2) {
   32316          14 :     res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   32317          14 :     if (!SWIG_IsOK(res3)) {
   32318           0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MDArray_GetGridded" "', argument " "3"" of type '" "GDALMDArrayHS *""'"); 
   32319             :     }
   32320          14 :     arg3 = reinterpret_cast< GDALMDArrayHS * >(argp3);
   32321             :   }
   32322          22 :   if (obj3) {
   32323          13 :     res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   32324          13 :     if (!SWIG_IsOK(res4)) {
   32325           0 :       SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "MDArray_GetGridded" "', argument " "4"" of type '" "GDALMDArrayHS *""'"); 
   32326             :     }
   32327          13 :     arg4 = reinterpret_cast< GDALMDArrayHS * >(argp4);
   32328             :   }
   32329          22 :   if (obj4) {
   32330           3 :     {
   32331             :       /* %typemap(in) char **dict */
   32332           3 :       arg5 = NULL;
   32333           3 :       if ( PySequence_Check( obj4 ) ) {
   32334           3 :         int bErr = FALSE;
   32335           3 :         arg5 = CSLFromPySequence(obj4, &bErr);
   32336           3 :         if ( bErr )
   32337             :         {
   32338           0 :           SWIG_fail;
   32339             :         }
   32340             :       }
   32341           0 :       else if ( PyMapping_Check( obj4 ) ) {
   32342           0 :         int bErr = FALSE;
   32343           0 :         arg5 = CSLFromPyMapping(obj4, &bErr);
   32344           0 :         if ( bErr )
   32345             :         {
   32346           0 :           SWIG_fail;
   32347             :         }
   32348             :       }
   32349             :       else {
   32350           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   32351           0 :         SWIG_fail;
   32352             :       }
   32353             :     }
   32354             :   }
   32355          22 :   {
   32356          22 :     if (!arg2) {
   32357           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   32358             :     }
   32359             :   }
   32360          22 :   {
   32361          22 :     const int bLocalUseExceptions = GetUseExceptions();
   32362          22 :     if ( bLocalUseExceptions ) {
   32363           0 :       pushErrorHandler();
   32364             :     }
   32365          22 :     {
   32366          22 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32367          22 :       result = (GDALMDArrayHS *)GDALMDArrayHS_GetGridded(arg1,(char const *)arg2,arg3,arg4,arg5);
   32368          22 :       SWIG_PYTHON_THREAD_END_ALLOW;
   32369             :     }
   32370          22 :     if ( bLocalUseExceptions ) {
   32371           0 :       popErrorHandler();
   32372             :     }
   32373             : #ifndef SED_HACKS
   32374             :     if ( bLocalUseExceptions ) {
   32375             :       CPLErr eclass = CPLGetLastErrorType();
   32376             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   32377             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   32378             :       }
   32379             :     }
   32380             : #endif
   32381             :   }
   32382          22 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_OWN |  0 );
   32383          22 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   32384          22 :   {
   32385             :     /* %typemap(freearg) char **dict */
   32386          22 :     CSLDestroy( arg5 );
   32387             :   }
   32388          22 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   32389             :   return resultobj;
   32390           0 : fail:
   32391           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   32392           0 :   {
   32393             :     /* %typemap(freearg) char **dict */
   32394           0 :     CSLDestroy( arg5 );
   32395             :   }
   32396             :   return NULL;
   32397             : }
   32398             : 
   32399             : 
   32400          56 : SWIGINTERN PyObject *_wrap_MDArray_AsClassicDataset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32401          56 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32402          56 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   32403          56 :   size_t arg2 ;
   32404          56 :   size_t arg3 ;
   32405          56 :   GDALGroupHS *arg4 = (GDALGroupHS *) NULL ;
   32406          56 :   char **arg5 = (char **) 0 ;
   32407          56 :   void *argp1 = 0 ;
   32408          56 :   int res1 = 0 ;
   32409          56 :   size_t val2 ;
   32410          56 :   int ecode2 = 0 ;
   32411          56 :   size_t val3 ;
   32412          56 :   int ecode3 = 0 ;
   32413          56 :   void *argp4 = 0 ;
   32414          56 :   int res4 = 0 ;
   32415          56 :   PyObject *swig_obj[5] ;
   32416          56 :   GDALDatasetShadow *result = 0 ;
   32417             :   
   32418          56 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_AsClassicDataset", 3, 5, swig_obj)) SWIG_fail;
   32419          56 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   32420          56 :   if (!SWIG_IsOK(res1)) {
   32421           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_AsClassicDataset" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   32422             :   }
   32423          56 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   32424          56 :   ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2);
   32425          56 :   if (!SWIG_IsOK(ecode2)) {
   32426           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MDArray_AsClassicDataset" "', argument " "2"" of type '" "size_t""'");
   32427             :   } 
   32428          56 :   arg2 = static_cast< size_t >(val2);
   32429          56 :   ecode3 = SWIG_AsVal_size_t(swig_obj[2], &val3);
   32430          56 :   if (!SWIG_IsOK(ecode3)) {
   32431           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MDArray_AsClassicDataset" "', argument " "3"" of type '" "size_t""'");
   32432             :   } 
   32433          56 :   arg3 = static_cast< size_t >(val3);
   32434          56 :   if (swig_obj[3]) {
   32435          21 :     res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   32436          21 :     if (!SWIG_IsOK(res4)) {
   32437           0 :       SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "MDArray_AsClassicDataset" "', argument " "4"" of type '" "GDALGroupHS *""'"); 
   32438             :     }
   32439          21 :     arg4 = reinterpret_cast< GDALGroupHS * >(argp4);
   32440             :   }
   32441          56 :   if (swig_obj[4]) {
   32442          21 :     {
   32443             :       /* %typemap(in) char **dict */
   32444          21 :       arg5 = NULL;
   32445          21 :       if ( PySequence_Check( swig_obj[4] ) ) {
   32446          21 :         int bErr = FALSE;
   32447          21 :         arg5 = CSLFromPySequence(swig_obj[4], &bErr);
   32448          21 :         if ( bErr )
   32449             :         {
   32450           0 :           SWIG_fail;
   32451             :         }
   32452             :       }
   32453           0 :       else if ( PyMapping_Check( swig_obj[4] ) ) {
   32454           0 :         int bErr = FALSE;
   32455           0 :         arg5 = CSLFromPyMapping(swig_obj[4], &bErr);
   32456           0 :         if ( bErr )
   32457             :         {
   32458           0 :           SWIG_fail;
   32459             :         }
   32460             :       }
   32461             :       else {
   32462           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   32463           0 :         SWIG_fail;
   32464             :       }
   32465             :     }
   32466             :   }
   32467          56 :   {
   32468          56 :     const int bLocalUseExceptions = GetUseExceptions();
   32469          56 :     if ( bLocalUseExceptions ) {
   32470          30 :       pushErrorHandler();
   32471             :     }
   32472          56 :     {
   32473          56 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32474          56 :       result = (GDALDatasetShadow *)GDALMDArrayHS_AsClassicDataset(arg1,arg2,arg3,arg4,arg5);
   32475          56 :       SWIG_PYTHON_THREAD_END_ALLOW;
   32476             :     }
   32477          56 :     if ( bLocalUseExceptions ) {
   32478          30 :       popErrorHandler();
   32479             :     }
   32480             : #ifndef SED_HACKS
   32481             :     if ( bLocalUseExceptions ) {
   32482             :       CPLErr eclass = CPLGetLastErrorType();
   32483             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   32484             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   32485             :       }
   32486             :     }
   32487             : #endif
   32488             :   }
   32489          56 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   32490          56 :   {
   32491             :     /* %typemap(freearg) char **dict */
   32492          56 :     CSLDestroy( arg5 );
   32493             :   }
   32494          70 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   32495             :   return resultobj;
   32496           0 : fail:
   32497           0 :   {
   32498             :     /* %typemap(freearg) char **dict */
   32499           0 :     CSLDestroy( arg5 );
   32500             :   }
   32501             :   return NULL;
   32502             : }
   32503             : 
   32504             : 
   32505          15 : SWIGINTERN PyObject *_wrap_MDArray_GetStatistics(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   32506          15 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32507          15 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   32508          15 :   bool arg2 = (bool) FALSE ;
   32509          15 :   bool arg3 = (bool) TRUE ;
   32510          15 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   32511          15 :   void *arg5 = (void *) NULL ;
   32512          15 :   void *argp1 = 0 ;
   32513          15 :   int res1 = 0 ;
   32514          15 :   bool val2 ;
   32515          15 :   int ecode2 = 0 ;
   32516          15 :   bool val3 ;
   32517          15 :   int ecode3 = 0 ;
   32518          15 :   PyObject * obj0 = 0 ;
   32519          15 :   PyObject * obj1 = 0 ;
   32520          15 :   PyObject * obj2 = 0 ;
   32521          15 :   PyObject * obj3 = 0 ;
   32522          15 :   PyObject * obj4 = 0 ;
   32523          15 :   char * kwnames[] = {
   32524             :     (char *)"self",  (char *)"approx_ok",  (char *)"force",  (char *)"callback",  (char *)"callback_data",  NULL 
   32525             :   };
   32526          15 :   Statistics *result = 0 ;
   32527             :   
   32528             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   32529          15 :   PyProgressData *psProgressInfo;
   32530          15 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   32531          15 :   psProgressInfo->nLastReported = -1;
   32532          15 :   psProgressInfo->psPyCallback = NULL;
   32533          15 :   psProgressInfo->psPyCallbackData = NULL;
   32534          15 :   arg5 = psProgressInfo;
   32535          15 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OOOO:MDArray_GetStatistics", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
   32536          15 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   32537          15 :   if (!SWIG_IsOK(res1)) {
   32538           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetStatistics" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   32539             :   }
   32540          15 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   32541          15 :   if (obj1) {
   32542          13 :     ecode2 = SWIG_AsVal_bool(obj1, &val2);
   32543          13 :     if (!SWIG_IsOK(ecode2)) {
   32544           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MDArray_GetStatistics" "', argument " "2"" of type '" "bool""'");
   32545             :     } 
   32546             :     arg2 = static_cast< bool >(val2);
   32547             :   }
   32548          15 :   if (obj2) {
   32549          13 :     ecode3 = SWIG_AsVal_bool(obj2, &val3);
   32550          13 :     if (!SWIG_IsOK(ecode3)) {
   32551           0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MDArray_GetStatistics" "', argument " "3"" of type '" "bool""'");
   32552             :     } 
   32553             :     arg3 = static_cast< bool >(val3);
   32554             :   }
   32555          15 :   if (obj3) {
   32556           0 :     {
   32557             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   32558             :       /* callback_func typemap */
   32559             :       
   32560             :       /* In some cases 0 is passed instead of None. */
   32561             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   32562           0 :       if ( PyLong_Check(obj3) || PyInt_Check(obj3) )
   32563             :       {
   32564           0 :         if( PyLong_AsLong(obj3) == 0 )
   32565             :         {
   32566           0 :           obj3 = Py_None;
   32567             :         }
   32568             :       }
   32569             :       
   32570           0 :       if (obj3 && obj3 != Py_None ) {
   32571           0 :         void* cbfunction = NULL;
   32572           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj3,
   32573             :             (void**)&cbfunction,
   32574             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   32575             :             SWIG_POINTER_EXCEPTION | 0 ));
   32576             :         
   32577           0 :         if ( cbfunction == GDALTermProgress ) {
   32578             :           arg4 = GDALTermProgress;
   32579             :         } else {
   32580           0 :           if (!PyCallable_Check(obj3)) {
   32581           0 :             PyErr_SetString( PyExc_RuntimeError,
   32582             :               "Object given is not a Python function" );
   32583           0 :             SWIG_fail;
   32584             :           }
   32585           0 :           psProgressInfo->psPyCallback = obj3;
   32586           0 :           arg4 = PyProgressProxy;
   32587             :         }
   32588             :         
   32589             :       }
   32590             :       
   32591             :     }
   32592             :   }
   32593          15 :   if (obj4) {
   32594           0 :     {
   32595             :       /* %typemap(in) ( void* callback_data=NULL)  */
   32596           0 :       psProgressInfo->psPyCallbackData = obj4 ;
   32597             :     }
   32598             :   }
   32599          15 :   {
   32600          15 :     const int bLocalUseExceptions = GetUseExceptions();
   32601          15 :     if ( bLocalUseExceptions ) {
   32602           5 :       pushErrorHandler();
   32603             :     }
   32604          15 :     {
   32605          15 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32606          15 :       result = (Statistics *)GDALMDArrayHS_GetStatistics(arg1,arg2,arg3,arg4,arg5);
   32607          15 :       SWIG_PYTHON_THREAD_END_ALLOW;
   32608             :     }
   32609          15 :     if ( bLocalUseExceptions ) {
   32610           5 :       popErrorHandler();
   32611             :     }
   32612             : #ifndef SED_HACKS
   32613             :     if ( bLocalUseExceptions ) {
   32614             :       CPLErr eclass = CPLGetLastErrorType();
   32615             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   32616             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   32617             :       }
   32618             :     }
   32619             : #endif
   32620             :   }
   32621          15 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Statistics, 0 |  0 );
   32622          15 :   {
   32623             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   32624             :     
   32625          15 :     CPLFree(psProgressInfo);
   32626             :     
   32627             :   }
   32628          15 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   32629             :   return resultobj;
   32630           0 : fail:
   32631           0 :   {
   32632             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   32633             :     
   32634           0 :     CPLFree(psProgressInfo);
   32635             :     
   32636             :   }
   32637             :   return NULL;
   32638             : }
   32639             : 
   32640             : 
   32641           4 : SWIGINTERN PyObject *_wrap_MDArray_ComputeStatistics(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   32642           4 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32643           4 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   32644           4 :   bool arg2 = (bool) FALSE ;
   32645           4 :   GDALProgressFunc arg3 = (GDALProgressFunc) NULL ;
   32646           4 :   void *arg4 = (void *) NULL ;
   32647           4 :   char **arg5 = (char **) 0 ;
   32648           4 :   void *argp1 = 0 ;
   32649           4 :   int res1 = 0 ;
   32650           4 :   bool val2 ;
   32651           4 :   int ecode2 = 0 ;
   32652           4 :   PyObject * obj0 = 0 ;
   32653           4 :   PyObject * obj1 = 0 ;
   32654           4 :   PyObject * obj2 = 0 ;
   32655           4 :   PyObject * obj3 = 0 ;
   32656           4 :   PyObject * obj4 = 0 ;
   32657           4 :   char * kwnames[] = {
   32658             :     (char *)"self",  (char *)"approx_ok",  (char *)"callback",  (char *)"callback_data",  (char *)"options",  NULL 
   32659             :   };
   32660           4 :   Statistics *result = 0 ;
   32661             :   
   32662             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   32663           4 :   PyProgressData *psProgressInfo;
   32664           4 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   32665           4 :   psProgressInfo->nLastReported = -1;
   32666           4 :   psProgressInfo->psPyCallback = NULL;
   32667           4 :   psProgressInfo->psPyCallbackData = NULL;
   32668           4 :   arg4 = psProgressInfo;
   32669           4 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OOOO:MDArray_ComputeStatistics", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
   32670           4 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   32671           4 :   if (!SWIG_IsOK(res1)) {
   32672           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_ComputeStatistics" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   32673             :   }
   32674           4 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   32675           4 :   if (obj1) {
   32676           2 :     ecode2 = SWIG_AsVal_bool(obj1, &val2);
   32677           2 :     if (!SWIG_IsOK(ecode2)) {
   32678           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MDArray_ComputeStatistics" "', argument " "2"" of type '" "bool""'");
   32679             :     } 
   32680             :     arg2 = static_cast< bool >(val2);
   32681             :   }
   32682           4 :   if (obj2) {
   32683           0 :     {
   32684             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   32685             :       /* callback_func typemap */
   32686             :       
   32687             :       /* In some cases 0 is passed instead of None. */
   32688             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   32689           0 :       if ( PyLong_Check(obj2) || PyInt_Check(obj2) )
   32690             :       {
   32691           0 :         if( PyLong_AsLong(obj2) == 0 )
   32692             :         {
   32693           0 :           obj2 = Py_None;
   32694             :         }
   32695             :       }
   32696             :       
   32697           0 :       if (obj2 && obj2 != Py_None ) {
   32698           0 :         void* cbfunction = NULL;
   32699           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj2,
   32700             :             (void**)&cbfunction,
   32701             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   32702             :             SWIG_POINTER_EXCEPTION | 0 ));
   32703             :         
   32704           0 :         if ( cbfunction == GDALTermProgress ) {
   32705             :           arg3 = GDALTermProgress;
   32706             :         } else {
   32707           0 :           if (!PyCallable_Check(obj2)) {
   32708           0 :             PyErr_SetString( PyExc_RuntimeError,
   32709             :               "Object given is not a Python function" );
   32710           0 :             SWIG_fail;
   32711             :           }
   32712           0 :           psProgressInfo->psPyCallback = obj2;
   32713           0 :           arg3 = PyProgressProxy;
   32714             :         }
   32715             :         
   32716             :       }
   32717             :       
   32718             :     }
   32719             :   }
   32720           4 :   if (obj3) {
   32721           0 :     {
   32722             :       /* %typemap(in) ( void* callback_data=NULL)  */
   32723           0 :       psProgressInfo->psPyCallbackData = obj3 ;
   32724             :     }
   32725             :   }
   32726           4 :   if (obj4) {
   32727           2 :     {
   32728             :       /* %typemap(in) char **dict */
   32729           2 :       arg5 = NULL;
   32730           2 :       if ( PySequence_Check( obj4 ) ) {
   32731           2 :         int bErr = FALSE;
   32732           2 :         arg5 = CSLFromPySequence(obj4, &bErr);
   32733           2 :         if ( bErr )
   32734             :         {
   32735           0 :           SWIG_fail;
   32736             :         }
   32737             :       }
   32738           0 :       else if ( PyMapping_Check( obj4 ) ) {
   32739           0 :         int bErr = FALSE;
   32740           0 :         arg5 = CSLFromPyMapping(obj4, &bErr);
   32741           0 :         if ( bErr )
   32742             :         {
   32743           0 :           SWIG_fail;
   32744             :         }
   32745             :       }
   32746             :       else {
   32747           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   32748           0 :         SWIG_fail;
   32749             :       }
   32750             :     }
   32751             :   }
   32752           4 :   {
   32753           4 :     const int bLocalUseExceptions = GetUseExceptions();
   32754           4 :     if ( bLocalUseExceptions ) {
   32755           2 :       pushErrorHandler();
   32756             :     }
   32757           4 :     {
   32758           4 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32759           4 :       result = (Statistics *)GDALMDArrayHS_ComputeStatistics(arg1,arg2,arg3,arg4,arg5);
   32760           4 :       SWIG_PYTHON_THREAD_END_ALLOW;
   32761             :     }
   32762           4 :     if ( bLocalUseExceptions ) {
   32763           2 :       popErrorHandler();
   32764             :     }
   32765             : #ifndef SED_HACKS
   32766             :     if ( bLocalUseExceptions ) {
   32767             :       CPLErr eclass = CPLGetLastErrorType();
   32768             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   32769             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   32770             :       }
   32771             :     }
   32772             : #endif
   32773             :   }
   32774           4 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Statistics, 0 |  0 );
   32775           4 :   {
   32776             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   32777             :     
   32778           4 :     CPLFree(psProgressInfo);
   32779             :     
   32780             :   }
   32781           4 :   {
   32782             :     /* %typemap(freearg) char **dict */
   32783           4 :     CSLDestroy( arg5 );
   32784             :   }
   32785           4 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   32786             :   return resultobj;
   32787           0 : fail:
   32788           0 :   {
   32789             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   32790             :     
   32791           0 :     CPLFree(psProgressInfo);
   32792             :     
   32793             :   }
   32794           0 :   {
   32795             :     /* %typemap(freearg) char **dict */
   32796           0 :     CSLDestroy( arg5 );
   32797             :   }
   32798             :   return NULL;
   32799             : }
   32800             : 
   32801             : 
   32802          30 : SWIGINTERN PyObject *_wrap_MDArray_GetResampled(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32803          30 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32804          30 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   32805          30 :   int arg2 ;
   32806          30 :   GDALDimensionHS **arg3 = (GDALDimensionHS **) 0 ;
   32807          30 :   GDALRIOResampleAlg arg4 ;
   32808          30 :   OSRSpatialReferenceShadow **arg5 = (OSRSpatialReferenceShadow **) 0 ;
   32809          30 :   char **arg6 = (char **) 0 ;
   32810          30 :   void *argp1 = 0 ;
   32811          30 :   int res1 = 0 ;
   32812          30 :   OSRSpatialReferenceShadow *val5 ;
   32813          30 :   PyObject *swig_obj[5] ;
   32814          30 :   GDALMDArrayHS *result = 0 ;
   32815             :   
   32816          30 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_GetResampled", 4, 5, swig_obj)) SWIG_fail;
   32817          30 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   32818          30 :   if (!SWIG_IsOK(res1)) {
   32819           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetResampled" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   32820             :   }
   32821          30 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   32822          30 :   {
   32823             :     /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALDimensionHS *optional_##GDALDimensionHS)*/
   32824          30 :     if ( !PySequence_Check(swig_obj[1]) ) {
   32825           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   32826           0 :       SWIG_fail;
   32827             :     }
   32828          30 :     Py_ssize_t size = PySequence_Size(swig_obj[1]);
   32829          30 :     if( size > (Py_ssize_t)INT_MAX ) {
   32830           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   32831           0 :       SWIG_fail;
   32832             :     }
   32833          30 :     if( (size_t)size > SIZE_MAX / sizeof(GDALDimensionHS*) ) {
   32834           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   32835           0 :       SWIG_fail;
   32836             :     }
   32837          30 :     arg2 = (int)size;
   32838          30 :     arg3 = (GDALDimensionHS**) VSIMalloc(arg2*sizeof(GDALDimensionHS*));
   32839          30 :     if( !arg3) {
   32840           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   32841           0 :       SWIG_fail;
   32842             :     }
   32843             :     
   32844          96 :     for( int i = 0; i<arg2; i++ ) {
   32845          66 :       PyObject *o = PySequence_GetItem(swig_obj[1],i);
   32846          66 :       GDALDimensionHS* rawobjectpointer = NULL;
   32847          66 :       if( o != Py_None )
   32848             :       {
   32849           8 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALDimensionHS, SWIG_POINTER_EXCEPTION | 0 ));
   32850           8 :         if (!rawobjectpointer) {
   32851           0 :           Py_DECREF(o);
   32852           0 :           PyErr_SetString(PyExc_TypeError, "object of wrong GDALDimensionHS");
   32853           0 :           SWIG_fail;
   32854             :         }
   32855             :       }
   32856          66 :       arg3[i] = rawobjectpointer;
   32857          66 :       Py_DECREF(o);
   32858             :       
   32859             :     }
   32860             :   }
   32861          30 :   {
   32862             :     // %typemap(in) GDALRIOResampleAlg
   32863          30 :     int val = 0;
   32864          30 :     int ecode = SWIG_AsVal_int(swig_obj[2], &val);
   32865          30 :     if (!SWIG_IsOK(ecode)) {
   32866           0 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALRIOResampleAlg");
   32867             :     }
   32868          30 :     if( val < 0 ||
   32869          30 :       ( val >= static_cast<int>(GRIORA_RESERVED_START) &&
   32870          30 :         val <= static_cast<int>(GRIORA_RESERVED_END) ) ||
   32871             :       val > static_cast<int>(GRIORA_LAST) )
   32872             :     {
   32873           0 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for resample_alg");
   32874             :     }
   32875          30 :     arg4 = static_cast< GDALRIOResampleAlg >(val);
   32876             :   }
   32877          30 :   {
   32878             :     /* %typemap(in) (OSRSpatialReferenceShadow** optional_OSRSpatialReferenceShadow) */
   32879          30 :     if ( swig_obj[3] == Py_None ) {
   32880             :       arg5 = NULL;
   32881             :     }
   32882             :     else {
   32883           1 :       void* argp = NULL;
   32884           1 :       int res = SWIG_ConvertPtr(swig_obj[3], &argp, SWIGTYPE_p_OSRSpatialReferenceShadow,  0  | 0);
   32885           1 :       if (!SWIG_IsOK(res)) {
   32886           0 :         SWIG_exception_fail(SWIG_ArgError(res), "argument of type != OSRSpatialReferenceShadow");
   32887             :       }
   32888           1 :       val5 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp);
   32889           1 :       arg5 = &val5;
   32890             :     }
   32891             :   }
   32892          30 :   if (swig_obj[4]) {
   32893           4 :     {
   32894             :       /* %typemap(in) char **dict */
   32895           4 :       arg6 = NULL;
   32896           4 :       if ( PySequence_Check( swig_obj[4] ) ) {
   32897           4 :         int bErr = FALSE;
   32898           4 :         arg6 = CSLFromPySequence(swig_obj[4], &bErr);
   32899           4 :         if ( bErr )
   32900             :         {
   32901           0 :           SWIG_fail;
   32902             :         }
   32903             :       }
   32904           0 :       else if ( PyMapping_Check( swig_obj[4] ) ) {
   32905           0 :         int bErr = FALSE;
   32906           0 :         arg6 = CSLFromPyMapping(swig_obj[4], &bErr);
   32907           0 :         if ( bErr )
   32908             :         {
   32909           0 :           SWIG_fail;
   32910             :         }
   32911             :       }
   32912             :       else {
   32913           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   32914           0 :         SWIG_fail;
   32915             :       }
   32916             :     }
   32917             :   }
   32918          30 :   {
   32919          30 :     const int bLocalUseExceptions = GetUseExceptions();
   32920          30 :     if ( bLocalUseExceptions ) {
   32921           0 :       pushErrorHandler();
   32922             :     }
   32923          30 :     {
   32924          30 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32925          30 :       result = (GDALMDArrayHS *)GDALMDArrayHS_GetResampled(arg1,arg2,arg3,arg4,arg5,arg6);
   32926          30 :       SWIG_PYTHON_THREAD_END_ALLOW;
   32927             :     }
   32928          30 :     if ( bLocalUseExceptions ) {
   32929           0 :       popErrorHandler();
   32930             :     }
   32931             : #ifndef SED_HACKS
   32932             :     if ( bLocalUseExceptions ) {
   32933             :       CPLErr eclass = CPLGetLastErrorType();
   32934             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   32935             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   32936             :       }
   32937             :     }
   32938             : #endif
   32939             :   }
   32940          30 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_OWN |  0 );
   32941          30 :   {
   32942             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDimensionHS **poObjectsItemMaybeNull)*/
   32943          30 :     CPLFree( arg3 );
   32944             :   }
   32945          30 :   {
   32946             :     /* %typemap(freearg) char **dict */
   32947          30 :     CSLDestroy( arg6 );
   32948             :   }
   32949          30 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   32950             :   return resultobj;
   32951           0 : fail:
   32952           0 :   {
   32953             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDimensionHS **poObjectsItemMaybeNull)*/
   32954           0 :     CPLFree( arg3 );
   32955             :   }
   32956           0 :   {
   32957             :     /* %typemap(freearg) char **dict */
   32958           0 :     CSLDestroy( arg6 );
   32959             :   }
   32960             :   return NULL;
   32961             : }
   32962             : 
   32963             : 
   32964           6 : SWIGINTERN PyObject *_wrap_MDArray_Cache(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32965           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32966           6 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   32967           6 :   char **arg2 = (char **) NULL ;
   32968           6 :   void *argp1 = 0 ;
   32969           6 :   int res1 = 0 ;
   32970           6 :   PyObject *swig_obj[2] ;
   32971           6 :   bool result;
   32972             :   
   32973           6 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_Cache", 1, 2, swig_obj)) SWIG_fail;
   32974           6 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   32975           6 :   if (!SWIG_IsOK(res1)) {
   32976           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_Cache" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   32977             :   }
   32978           6 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   32979           6 :   if (swig_obj[1]) {
   32980           1 :     {
   32981             :       /* %typemap(in) char **dict */
   32982           1 :       arg2 = NULL;
   32983           1 :       if ( PySequence_Check( swig_obj[1] ) ) {
   32984           1 :         int bErr = FALSE;
   32985           1 :         arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   32986           1 :         if ( bErr )
   32987             :         {
   32988           0 :           SWIG_fail;
   32989             :         }
   32990             :       }
   32991           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   32992           0 :         int bErr = FALSE;
   32993           0 :         arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   32994           0 :         if ( bErr )
   32995             :         {
   32996           0 :           SWIG_fail;
   32997             :         }
   32998             :       }
   32999             :       else {
   33000           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   33001           0 :         SWIG_fail;
   33002             :       }
   33003             :     }
   33004             :   }
   33005           6 :   {
   33006           6 :     const int bLocalUseExceptions = GetUseExceptions();
   33007           6 :     if ( bLocalUseExceptions ) {
   33008           0 :       pushErrorHandler();
   33009             :     }
   33010           6 :     {
   33011           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   33012           6 :       result = (bool)GDALMDArrayHS_Cache(arg1,arg2);
   33013           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   33014             :     }
   33015           6 :     if ( bLocalUseExceptions ) {
   33016           0 :       popErrorHandler();
   33017             :     }
   33018             : #ifndef SED_HACKS
   33019             :     if ( bLocalUseExceptions ) {
   33020             :       CPLErr eclass = CPLGetLastErrorType();
   33021             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   33022             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   33023             :       }
   33024             :     }
   33025             : #endif
   33026             :   }
   33027           6 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   33028           6 :   {
   33029             :     /* %typemap(freearg) char **dict */
   33030           6 :     CSLDestroy( arg2 );
   33031             :   }
   33032           6 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   33033             :   return resultobj;
   33034           0 : fail:
   33035           0 :   {
   33036             :     /* %typemap(freearg) char **dict */
   33037           0 :     CSLDestroy( arg2 );
   33038             :   }
   33039             :   return NULL;
   33040             : }
   33041             : 
   33042             : 
   33043          28 : SWIGINTERN PyObject *_wrap_MDArray_Rename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   33044          28 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   33045          28 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   33046          28 :   char *arg2 = (char *) 0 ;
   33047          28 :   void *argp1 = 0 ;
   33048          28 :   int res1 = 0 ;
   33049          28 :   int res2 ;
   33050          28 :   char *buf2 = 0 ;
   33051          28 :   int alloc2 = 0 ;
   33052          28 :   PyObject *swig_obj[2] ;
   33053          28 :   CPLErr result;
   33054             :   
   33055          28 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_Rename", 2, 2, swig_obj)) SWIG_fail;
   33056          28 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   33057          28 :   if (!SWIG_IsOK(res1)) {
   33058           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_Rename" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   33059             :   }
   33060          28 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   33061          28 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   33062          28 :   if (!SWIG_IsOK(res2)) {
   33063           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MDArray_Rename" "', argument " "2"" of type '" "char const *""'");
   33064             :   }
   33065          28 :   arg2 = reinterpret_cast< char * >(buf2);
   33066          28 :   {
   33067          28 :     const int bLocalUseExceptions = GetUseExceptions();
   33068          28 :     if ( bLocalUseExceptions ) {
   33069          28 :       pushErrorHandler();
   33070             :     }
   33071          28 :     {
   33072          28 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   33073          56 :       CPL_IGNORE_RET_VAL(result = (CPLErr)GDALMDArrayHS_Rename(arg1,(char const *)arg2));
   33074          28 :       SWIG_PYTHON_THREAD_END_ALLOW;
   33075             :     }
   33076          28 :     if ( bLocalUseExceptions ) {
   33077          28 :       popErrorHandler();
   33078             :     }
   33079             : #ifndef SED_HACKS
   33080             :     if ( bLocalUseExceptions ) {
   33081             :       CPLErr eclass = CPLGetLastErrorType();
   33082             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   33083             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   33084             :       }
   33085             :     }
   33086             : #endif
   33087             :   }
   33088          28 :   resultobj = SWIG_From_int(static_cast< int >(result));
   33089          28 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   33090          48 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   33091             :   return resultobj;
   33092           0 : fail:
   33093           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   33094             :   return NULL;
   33095             : }
   33096             : 
   33097             : 
   33098         271 : SWIGINTERN PyObject *MDArray_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   33099         271 :   PyObject *obj;
   33100         271 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   33101         271 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALMDArrayHS, SWIG_NewClientData(obj));
   33102         271 :   return SWIG_Py_Void();
   33103             : }
   33104             : 
   33105         680 : SWIGINTERN PyObject *_wrap_delete_Attribute(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   33106         680 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   33107         680 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   33108         680 :   void *argp1 = 0 ;
   33109         680 :   int res1 = 0 ;
   33110         680 :   PyObject *swig_obj[1] ;
   33111             :   
   33112         680 :   if (!args) SWIG_fail;
   33113         680 :   swig_obj[0] = args;
   33114         680 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, SWIG_POINTER_DISOWN |  0 );
   33115         680 :   if (!SWIG_IsOK(res1)) {
   33116           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Attribute" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   33117             :   }
   33118         680 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   33119         680 :   {
   33120         680 :     const int bLocalUseExceptions = GetUseExceptions();
   33121         680 :     if ( bLocalUseExceptions ) {
   33122         351 :       pushErrorHandler();
   33123             :     }
   33124         680 :     {
   33125         680 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   33126         680 :       delete_GDALAttributeHS(arg1);
   33127         680 :       SWIG_PYTHON_THREAD_END_ALLOW;
   33128             :     }
   33129         680 :     if ( bLocalUseExceptions ) {
   33130         351 :       popErrorHandler();
   33131             :     }
   33132             : #ifndef SED_HACKS
   33133             :     if ( bLocalUseExceptions ) {
   33134             :       CPLErr eclass = CPLGetLastErrorType();
   33135             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   33136             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   33137             :       }
   33138             :     }
   33139             : #endif
   33140             :   }
   33141         680 :   resultobj = SWIG_Py_Void();
   33142         680 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   33143             :   return resultobj;
   33144             : fail:
   33145             :   return NULL;
   33146             : }
   33147             : 
   33148             : 
   33149         361 : SWIGINTERN PyObject *_wrap_Attribute_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   33150         361 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   33151         361 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   33152         361 :   void *argp1 = 0 ;
   33153         361 :   int res1 = 0 ;
   33154         361 :   PyObject *swig_obj[1] ;
   33155         361 :   char *result = 0 ;
   33156             :   
   33157         361 :   if (!args) SWIG_fail;
   33158         361 :   swig_obj[0] = args;
   33159         361 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   33160         361 :   if (!SWIG_IsOK(res1)) {
   33161           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_GetName" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   33162             :   }
   33163         361 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   33164         361 :   {
   33165         361 :     const int bLocalUseExceptions = GetUseExceptions();
   33166         361 :     if ( bLocalUseExceptions ) {
   33167         149 :       pushErrorHandler();
   33168             :     }
   33169         361 :     {
   33170         361 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   33171         361 :       result = (char *)GDALAttributeHS_GetName(arg1);
   33172         361 :       SWIG_PYTHON_THREAD_END_ALLOW;
   33173             :     }
   33174         361 :     if ( bLocalUseExceptions ) {
   33175         149 :       popErrorHandler();
   33176             :     }
   33177             : #ifndef SED_HACKS
   33178             :     if ( bLocalUseExceptions ) {
   33179             :       CPLErr eclass = CPLGetLastErrorType();
   33180             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   33181             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   33182             :       }
   33183             :     }
   33184             : #endif
   33185             :   }
   33186         361 :   resultobj = SWIG_FromCharPtr((const char *)result);
   33187         361 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   33188             :   return resultobj;
   33189             : fail:
   33190             :   return NULL;
   33191             : }
   33192             : 
   33193             : 
   33194          49 : SWIGINTERN PyObject *_wrap_Attribute_GetFullName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   33195          49 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   33196          49 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   33197          49 :   void *argp1 = 0 ;
   33198          49 :   int res1 = 0 ;
   33199          49 :   PyObject *swig_obj[1] ;
   33200          49 :   char *result = 0 ;
   33201             :   
   33202          49 :   if (!args) SWIG_fail;
   33203          49 :   swig_obj[0] = args;
   33204          49 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   33205          49 :   if (!SWIG_IsOK(res1)) {
   33206           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_GetFullName" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   33207             :   }
   33208          49 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   33209          49 :   {
   33210          49 :     const int bLocalUseExceptions = GetUseExceptions();
   33211          49 :     if ( bLocalUseExceptions ) {
   33212          41 :       pushErrorHandler();
   33213             :     }
   33214          49 :     {
   33215          49 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   33216          49 :       result = (char *)GDALAttributeHS_GetFullName(arg1);
   33217          49 :       SWIG_PYTHON_THREAD_END_ALLOW;
   33218             :     }
   33219          49 :     if ( bLocalUseExceptions ) {
   33220          41 :       popErrorHandler();
   33221             :     }
   33222             : #ifndef SED_HACKS
   33223             :     if ( bLocalUseExceptions ) {
   33224             :       CPLErr eclass = CPLGetLastErrorType();
   33225             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   33226             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   33227             :       }
   33228             :     }
   33229             : #endif
   33230             :   }
   33231          49 :   resultobj = SWIG_FromCharPtr((const char *)result);
   33232          49 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   33233             :   return resultobj;
   33234             : fail:
   33235             :   return NULL;
   33236             : }
   33237             : 
   33238             : 
   33239         176 : SWIGINTERN PyObject *_wrap_Attribute_GetTotalElementsCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   33240         176 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   33241         176 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   33242         176 :   void *argp1 = 0 ;
   33243         176 :   int res1 = 0 ;
   33244         176 :   PyObject *swig_obj[1] ;
   33245         176 :   GUIntBig result;
   33246             :   
   33247         176 :   if (!args) SWIG_fail;
   33248         176 :   swig_obj[0] = args;
   33249         176 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   33250         176 :   if (!SWIG_IsOK(res1)) {
   33251           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_GetTotalElementsCount" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   33252             :   }
   33253         176 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   33254         176 :   {
   33255         176 :     const int bLocalUseExceptions = GetUseExceptions();
   33256         176 :     if ( bLocalUseExceptions ) {
   33257          52 :       pushErrorHandler();
   33258             :     }
   33259         176 :     {
   33260         176 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   33261         176 :       result = GDALAttributeHS_GetTotalElementsCount(arg1);
   33262         176 :       SWIG_PYTHON_THREAD_END_ALLOW;
   33263             :     }
   33264         176 :     if ( bLocalUseExceptions ) {
   33265          52 :       popErrorHandler();
   33266             :     }
   33267             : #ifndef SED_HACKS
   33268             :     if ( bLocalUseExceptions ) {
   33269             :       CPLErr eclass = CPLGetLastErrorType();
   33270             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   33271             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   33272             :       }
   33273             :     }
   33274             : #endif
   33275             :   }
   33276         176 :   {
   33277         176 :     resultobj = PyLong_FromUnsignedLongLong(result);
   33278             :   }
   33279         176 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   33280             :   return resultobj;
   33281             : fail:
   33282             :   return NULL;
   33283             : }
   33284             : 
   33285             : 
   33286          12 : SWIGINTERN PyObject *_wrap_Attribute_GetDimensionCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   33287          12 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   33288          12 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   33289          12 :   void *argp1 = 0 ;
   33290          12 :   int res1 = 0 ;
   33291          12 :   PyObject *swig_obj[1] ;
   33292          12 :   size_t result;
   33293             :   
   33294          12 :   if (!args) SWIG_fail;
   33295          12 :   swig_obj[0] = args;
   33296          12 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   33297          12 :   if (!SWIG_IsOK(res1)) {
   33298           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_GetDimensionCount" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   33299             :   }
   33300          12 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   33301          12 :   {
   33302          12 :     const int bLocalUseExceptions = GetUseExceptions();
   33303          12 :     if ( bLocalUseExceptions ) {
   33304           6 :       pushErrorHandler();
   33305             :     }
   33306          12 :     {
   33307          12 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   33308          12 :       result = GDALAttributeHS_GetDimensionCount(arg1);
   33309          12 :       SWIG_PYTHON_THREAD_END_ALLOW;
   33310             :     }
   33311          12 :     if ( bLocalUseExceptions ) {
   33312           6 :       popErrorHandler();
   33313             :     }
   33314             : #ifndef SED_HACKS
   33315             :     if ( bLocalUseExceptions ) {
   33316             :       CPLErr eclass = CPLGetLastErrorType();
   33317             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   33318             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   33319             :       }
   33320             :     }
   33321             : #endif
   33322             :   }
   33323          12 :   resultobj = SWIG_From_size_t(static_cast< size_t >(result));
   33324          12 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   33325             :   return resultobj;
   33326             : fail:
   33327             :   return NULL;
   33328             : }
   33329             : 
   33330             : 
   33331          11 : SWIGINTERN PyObject *_wrap_Attribute_GetDimensionsSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   33332          11 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   33333          11 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   33334          11 :   GUIntBig **arg2 = (GUIntBig **) 0 ;
   33335          11 :   size_t *arg3 = (size_t *) 0 ;
   33336          11 :   void *argp1 = 0 ;
   33337          11 :   int res1 = 0 ;
   33338          11 :   GUIntBig *vals2 = 0 ;
   33339          11 :   size_t nCount2 = 0 ;
   33340          11 :   PyObject *swig_obj[1] ;
   33341             :   
   33342          11 :   {
   33343             :     /* %typemap(in,numinputs=0) (GUIntBig** pvals, size_t* pnCount) */
   33344          11 :     arg2 = &vals2;
   33345          11 :     arg3 = &nCount2;
   33346             :   }
   33347          11 :   if (!args) SWIG_fail;
   33348          11 :   swig_obj[0] = args;
   33349          11 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   33350          11 :   if (!SWIG_IsOK(res1)) {
   33351           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_GetDimensionsSize" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   33352             :   }
   33353          11 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   33354          11 :   {
   33355          11 :     const int bLocalUseExceptions = GetUseExceptions();
   33356          11 :     if ( bLocalUseExceptions ) {
   33357           5 :       pushErrorHandler();
   33358             :     }
   33359          11 :     {
   33360          11 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   33361          11 :       GDALAttributeHS_GetDimensionsSize(arg1,arg2,arg3);
   33362          11 :       SWIG_PYTHON_THREAD_END_ALLOW;
   33363             :     }
   33364          11 :     if ( bLocalUseExceptions ) {
   33365           5 :       popErrorHandler();
   33366             :     }
   33367             : #ifndef SED_HACKS
   33368             :     if ( bLocalUseExceptions ) {
   33369             :       CPLErr eclass = CPLGetLastErrorType();
   33370             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   33371             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   33372             :       }
   33373             :     }
   33374             : #endif
   33375             :   }
   33376          11 :   resultobj = SWIG_Py_Void();
   33377          11 :   {
   33378             :     /* %typemap(argout) (GUIntBig** pvals, size_t* pnCount) */
   33379          11 :     Py_DECREF(resultobj);
   33380          11 :     resultobj = PyList_New( *arg3 );
   33381          11 :     if( !resultobj ) {
   33382           0 :       SWIG_fail;
   33383             :     }
   33384          22 :     for( size_t i = 0; i < *arg3; i++ ) {
   33385          11 :       char szTmp[32];
   33386          11 :       sprintf(szTmp, CPL_FRMT_GUIB, (*arg2)[i]);
   33387          11 :       PyObject *o = PyLong_FromString(szTmp, NULL, 10);
   33388          11 :       PyList_SetItem(resultobj, i, o );
   33389             :     }
   33390             :   }
   33391          11 :   {
   33392             :     /* %typemap(freearg) (GUIntBig** pvals, size_t* pnCount) */
   33393          11 :     CPLFree(*arg2);
   33394             :   }
   33395          11 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   33396             :   return resultobj;
   33397           0 : fail:
   33398           0 :   {
   33399             :     /* %typemap(freearg) (GUIntBig** pvals, size_t* pnCount) */
   33400           0 :     CPLFree(*arg2);
   33401             :   }
   33402             :   return NULL;
   33403             : }
   33404             : 
   33405             : 
   33406         396 : SWIGINTERN PyObject *_wrap_Attribute_GetDataType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   33407         396 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   33408         396 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   33409         396 :   void *argp1 = 0 ;
   33410         396 :   int res1 = 0 ;
   33411         396 :   PyObject *swig_obj[1] ;
   33412         396 :   GDALExtendedDataTypeHS *result = 0 ;
   33413             :   
   33414         396 :   if (!args) SWIG_fail;
   33415         396 :   swig_obj[0] = args;
   33416         396 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   33417         396 :   if (!SWIG_IsOK(res1)) {
   33418           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_GetDataType" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   33419             :   }
   33420         396 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   33421         396 :   {
   33422         396 :     const int bLocalUseExceptions = GetUseExceptions();
   33423         396 :     if ( bLocalUseExceptions ) {
   33424         196 :       pushErrorHandler();
   33425             :     }
   33426         396 :     {
   33427         396 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   33428         396 :       result = (GDALExtendedDataTypeHS *)GDALAttributeHS_GetDataType(arg1);
   33429         396 :       SWIG_PYTHON_THREAD_END_ALLOW;
   33430             :     }
   33431         396 :     if ( bLocalUseExceptions ) {
   33432         196 :       popErrorHandler();
   33433             :     }
   33434             : #ifndef SED_HACKS
   33435             :     if ( bLocalUseExceptions ) {
   33436             :       CPLErr eclass = CPLGetLastErrorType();
   33437             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   33438             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   33439             :       }
   33440             :     }
   33441             : #endif
   33442             :   }
   33443         396 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALExtendedDataTypeHS, SWIG_POINTER_OWN |  0 );
   33444         396 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   33445             :   return resultobj;
   33446             : fail:
   33447             :   return NULL;
   33448             : }
   33449             : 
   33450             : 
   33451          10 : SWIGINTERN PyObject *_wrap_Attribute_ReadAsRaw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   33452          10 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   33453          10 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   33454          10 :   void **arg2 = (void **) 0 ;
   33455          10 :   void *argp1 = 0 ;
   33456          10 :   int res1 = 0 ;
   33457          10 :   void *pyObject2 = NULL ;
   33458          10 :   PyObject *swig_obj[1] ;
   33459          10 :   CPLErr result;
   33460             :   
   33461          10 :   {
   33462             :     /* %typemap(in,numinputs=0) ( void **outPythonObject ) ( void *pyObject2 = NULL ) */
   33463          10 :     arg2 = &pyObject2;
   33464             :   }
   33465          10 :   if (!args) SWIG_fail;
   33466          10 :   swig_obj[0] = args;
   33467          10 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   33468          10 :   if (!SWIG_IsOK(res1)) {
   33469           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_ReadAsRaw" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   33470             :   }
   33471          10 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   33472          10 :   {
   33473          10 :     const int bLocalUseExceptions = GetUseExceptions();
   33474          10 :     if ( bLocalUseExceptions ) {
   33475           4 :       pushErrorHandler();
   33476             :     }
   33477          10 :     {
   33478          10 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   33479          10 :       CPL_IGNORE_RET_VAL(result = (CPLErr)GDALAttributeHS_ReadAsRaw(arg1,arg2));
   33480          10 :       SWIG_PYTHON_THREAD_END_ALLOW;
   33481             :     }
   33482          10 :     if ( bLocalUseExceptions ) {
   33483           4 :       popErrorHandler();
   33484             :     }
   33485             : #ifndef SED_HACKS
   33486             :     if ( bLocalUseExceptions ) {
   33487             :       CPLErr eclass = CPLGetLastErrorType();
   33488             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   33489             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   33490             :       }
   33491             :     }
   33492             : #endif
   33493             :   }
   33494          10 :   resultobj = SWIG_From_int(static_cast< int >(result));
   33495          10 :   {
   33496             :     /* %typemap(argout) ( void **outPythonObject ) */
   33497          10 :     Py_XDECREF(resultobj);
   33498          10 :     if (*arg2)
   33499             :     {
   33500             :       resultobj = (PyObject*)*arg2;
   33501             :     }
   33502             :     else
   33503             :     {
   33504           4 :       resultobj = Py_None;
   33505           4 :       Py_INCREF(resultobj);
   33506             :     }
   33507             :   }
   33508          12 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   33509             :   return resultobj;
   33510             : fail:
   33511             :   return NULL;
   33512             : }
   33513             : 
   33514             : 
   33515         107 : SWIGINTERN PyObject *_wrap_Attribute_ReadAsString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   33516         107 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   33517         107 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   33518         107 :   void *argp1 = 0 ;
   33519         107 :   int res1 = 0 ;
   33520         107 :   PyObject *swig_obj[1] ;
   33521         107 :   char *result = 0 ;
   33522             :   
   33523         107 :   if (!args) SWIG_fail;
   33524         107 :   swig_obj[0] = args;
   33525         107 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   33526         107 :   if (!SWIG_IsOK(res1)) {
   33527           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_ReadAsString" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   33528             :   }
   33529         107 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   33530         107 :   {
   33531         107 :     const int bLocalUseExceptions = GetUseExceptions();
   33532         107 :     if ( bLocalUseExceptions ) {
   33533          31 :       pushErrorHandler();
   33534             :     }
   33535         107 :     {
   33536         107 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   33537         107 :       result = (char *)GDALAttributeHS_ReadAsString(arg1);
   33538         107 :       SWIG_PYTHON_THREAD_END_ALLOW;
   33539             :     }
   33540         107 :     if ( bLocalUseExceptions ) {
   33541          31 :       popErrorHandler();
   33542             :     }
   33543             : #ifndef SED_HACKS
   33544             :     if ( bLocalUseExceptions ) {
   33545             :       CPLErr eclass = CPLGetLastErrorType();
   33546             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   33547             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   33548             :       }
   33549             :     }
   33550             : #endif
   33551             :   }
   33552         107 :   resultobj = SWIG_FromCharPtr((const char *)result);
   33553         107 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   33554             :   return resultobj;
   33555             : fail:
   33556             :   return NULL;
   33557             : }
   33558             : 
   33559             : 
   33560          19 : SWIGINTERN PyObject *_wrap_Attribute_ReadAsInt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   33561          19 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   33562          19 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   33563          19 :   void *argp1 = 0 ;
   33564          19 :   int res1 = 0 ;
   33565          19 :   PyObject *swig_obj[1] ;
   33566          19 :   int result;
   33567             :   
   33568          19 :   if (!args) SWIG_fail;
   33569          19 :   swig_obj[0] = args;
   33570          19 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   33571          19 :   if (!SWIG_IsOK(res1)) {
   33572           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_ReadAsInt" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   33573             :   }
   33574          19 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   33575          19 :   {
   33576          19 :     const int bLocalUseExceptions = GetUseExceptions();
   33577          19 :     if ( bLocalUseExceptions ) {
   33578           9 :       pushErrorHandler();
   33579             :     }
   33580          19 :     {
   33581          19 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   33582          19 :       result = (int)GDALAttributeHS_ReadAsInt(arg1);
   33583          19 :       SWIG_PYTHON_THREAD_END_ALLOW;
   33584             :     }
   33585          19 :     if ( bLocalUseExceptions ) {
   33586           9 :       popErrorHandler();
   33587             :     }
   33588             : #ifndef SED_HACKS
   33589             :     if ( bLocalUseExceptions ) {
   33590             :       CPLErr eclass = CPLGetLastErrorType();
   33591             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   33592             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   33593             :       }
   33594             :     }
   33595             : #endif
   33596             :   }
   33597          19 :   resultobj = SWIG_From_int(static_cast< int >(result));
   33598          20 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   33599             :   return resultobj;
   33600             : fail:
   33601             :   return NULL;
   33602             : }
   33603             : 
   33604             : 
   33605          37 : SWIGINTERN PyObject *_wrap_Attribute_ReadAsDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   33606          37 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   33607          37 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   33608          37 :   void *argp1 = 0 ;
   33609          37 :   int res1 = 0 ;
   33610          37 :   PyObject *swig_obj[1] ;
   33611          37 :   double result;
   33612             :   
   33613          37 :   if (!args) SWIG_fail;
   33614          37 :   swig_obj[0] = args;
   33615          37 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   33616          37 :   if (!SWIG_IsOK(res1)) {
   33617           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_ReadAsDouble" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   33618             :   }
   33619          37 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   33620          37 :   {
   33621          37 :     const int bLocalUseExceptions = GetUseExceptions();
   33622          37 :     if ( bLocalUseExceptions ) {
   33623           7 :       pushErrorHandler();
   33624             :     }
   33625          37 :     {
   33626          37 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   33627          37 :       result = (double)GDALAttributeHS_ReadAsDouble(arg1);
   33628          37 :       SWIG_PYTHON_THREAD_END_ALLOW;
   33629             :     }
   33630          37 :     if ( bLocalUseExceptions ) {
   33631           7 :       popErrorHandler();
   33632             :     }
   33633             : #ifndef SED_HACKS
   33634             :     if ( bLocalUseExceptions ) {
   33635             :       CPLErr eclass = CPLGetLastErrorType();
   33636             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   33637             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   33638             :       }
   33639             :     }
   33640             : #endif
   33641             :   }
   33642          37 :   resultobj = SWIG_From_double(static_cast< double >(result));
   33643          37 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   33644             :   return resultobj;
   33645             : fail:
   33646             :   return NULL;
   33647             : }
   33648             : 
   33649             : 
   33650          19 : SWIGINTERN PyObject *_wrap_Attribute_ReadAsStringArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   33651          19 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   33652          19 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   33653          19 :   void *argp1 = 0 ;
   33654          19 :   int res1 = 0 ;
   33655          19 :   PyObject *swig_obj[1] ;
   33656          19 :   char **result = 0 ;
   33657             :   
   33658          19 :   if (!args) SWIG_fail;
   33659          19 :   swig_obj[0] = args;
   33660          19 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   33661          19 :   if (!SWIG_IsOK(res1)) {
   33662           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_ReadAsStringArray" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   33663             :   }
   33664          19 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   33665          19 :   {
   33666          19 :     const int bLocalUseExceptions = GetUseExceptions();
   33667          19 :     if ( bLocalUseExceptions ) {
   33668           4 :       pushErrorHandler();
   33669             :     }
   33670          19 :     {
   33671          19 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   33672          19 :       result = (char **)GDALAttributeHS_ReadAsStringArray(arg1);
   33673          19 :       SWIG_PYTHON_THREAD_END_ALLOW;
   33674             :     }
   33675          19 :     if ( bLocalUseExceptions ) {
   33676           4 :       popErrorHandler();
   33677             :     }
   33678             : #ifndef SED_HACKS
   33679             :     if ( bLocalUseExceptions ) {
   33680             :       CPLErr eclass = CPLGetLastErrorType();
   33681             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   33682             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   33683             :       }
   33684             :     }
   33685             : #endif
   33686             :   }
   33687          19 :   {
   33688             :     /* %typemap(out) char **CSL -> ( string ) */
   33689          19 :     bool bErr = false;
   33690          19 :     resultobj = CSLToList(result, &bErr);
   33691          19 :     CSLDestroy(result);
   33692          19 :     if( bErr ) {
   33693           0 :       SWIG_fail;
   33694             :     }
   33695             :   }
   33696          19 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   33697             :   return resultobj;
   33698             : fail:
   33699             :   return NULL;
   33700             : }
   33701             : 
   33702             : 
   33703          15 : SWIGINTERN PyObject *_wrap_Attribute_ReadAsIntArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   33704          15 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   33705          15 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   33706          15 :   int **arg2 = (int **) 0 ;
   33707          15 :   size_t *arg3 = (size_t *) 0 ;
   33708          15 :   void *argp1 = 0 ;
   33709          15 :   int res1 = 0 ;
   33710          15 :   int *vals2 = 0 ;
   33711          15 :   size_t nCount2 = 0 ;
   33712          15 :   PyObject *swig_obj[1] ;
   33713             :   
   33714          15 :   {
   33715             :     /* %typemap(in,numinputs=0) (int** pvals, size_t* pnCount) */
   33716          15 :     arg2 = &vals2;
   33717          15 :     arg3 = &nCount2;
   33718             :   }
   33719          15 :   if (!args) SWIG_fail;
   33720          15 :   swig_obj[0] = args;
   33721          15 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   33722          15 :   if (!SWIG_IsOK(res1)) {
   33723           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_ReadAsIntArray" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   33724             :   }
   33725          15 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   33726          15 :   {
   33727          15 :     const int bLocalUseExceptions = GetUseExceptions();
   33728          15 :     if ( bLocalUseExceptions ) {
   33729           4 :       pushErrorHandler();
   33730             :     }
   33731          15 :     {
   33732          15 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   33733          15 :       GDALAttributeHS_ReadAsIntArray(arg1,arg2,arg3);
   33734          15 :       SWIG_PYTHON_THREAD_END_ALLOW;
   33735             :     }
   33736          15 :     if ( bLocalUseExceptions ) {
   33737           4 :       popErrorHandler();
   33738             :     }
   33739             : #ifndef SED_HACKS
   33740             :     if ( bLocalUseExceptions ) {
   33741             :       CPLErr eclass = CPLGetLastErrorType();
   33742             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   33743             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   33744             :       }
   33745             :     }
   33746             : #endif
   33747             :   }
   33748          15 :   resultobj = SWIG_Py_Void();
   33749          15 :   {
   33750             :     /* %typemap(argout) (int** pvals, size_t* pnCount) */
   33751          15 :     Py_DECREF(resultobj);
   33752          15 :     resultobj = PyTuple_New( *arg3 );
   33753          15 :     if( !resultobj ) {
   33754           0 :       SWIG_fail;
   33755             :     }
   33756         819 :     for( unsigned int i=0; i<*arg3; i++ ) {
   33757         804 :       PyObject *val = PyInt_FromLong( (*arg2)[i] );
   33758         804 :       PyTuple_SetItem( resultobj, i, val );
   33759             :     }
   33760             :   }
   33761          15 :   {
   33762             :     /* %typemap(freearg) (int** pvals, size_t* pnCount) */
   33763          15 :     CPLFree(*arg2);
   33764             :   }
   33765          15 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   33766             :   return resultobj;
   33767           0 : fail:
   33768           0 :   {
   33769             :     /* %typemap(freearg) (int** pvals, size_t* pnCount) */
   33770           0 :     CPLFree(*arg2);
   33771             :   }
   33772             :   return NULL;
   33773             : }
   33774             : 
   33775             : 
   33776          19 : SWIGINTERN PyObject *_wrap_Attribute_ReadAsDoubleArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   33777          19 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   33778          19 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   33779          19 :   double **arg2 = (double **) 0 ;
   33780          19 :   size_t *arg3 = (size_t *) 0 ;
   33781          19 :   void *argp1 = 0 ;
   33782          19 :   int res1 = 0 ;
   33783          19 :   double *vals2 = 0 ;
   33784          19 :   size_t nCount2 = 0 ;
   33785          19 :   PyObject *swig_obj[1] ;
   33786             :   
   33787          19 :   {
   33788             :     /* %typemap(in,numinputs=0) (double** pvals, size_t* pnCount) */
   33789          19 :     arg2 = &vals2;
   33790          19 :     arg3 = &nCount2;
   33791             :   }
   33792          19 :   if (!args) SWIG_fail;
   33793          19 :   swig_obj[0] = args;
   33794          19 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   33795          19 :   if (!SWIG_IsOK(res1)) {
   33796           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_ReadAsDoubleArray" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   33797             :   }
   33798          19 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   33799          19 :   {
   33800          19 :     const int bLocalUseExceptions = GetUseExceptions();
   33801          19 :     if ( bLocalUseExceptions ) {
   33802           4 :       pushErrorHandler();
   33803             :     }
   33804          19 :     {
   33805          19 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   33806          19 :       GDALAttributeHS_ReadAsDoubleArray(arg1,arg2,arg3);
   33807          19 :       SWIG_PYTHON_THREAD_END_ALLOW;
   33808             :     }
   33809          19 :     if ( bLocalUseExceptions ) {
   33810           4 :       popErrorHandler();
   33811             :     }
   33812             : #ifndef SED_HACKS
   33813             :     if ( bLocalUseExceptions ) {
   33814             :       CPLErr eclass = CPLGetLastErrorType();
   33815             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   33816             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   33817             :       }
   33818             :     }
   33819             : #endif
   33820             :   }
   33821          19 :   resultobj = SWIG_Py_Void();
   33822          19 :   {
   33823             :     /* %typemap(argout) (double** pvals, size_t* pnCount) */
   33824          19 :     PyObject *list = CreateTupleFromDoubleArray(*arg2, *arg3);
   33825          19 :     Py_DECREF(resultobj);
   33826          19 :     resultobj = list;
   33827             :   }
   33828          19 :   {
   33829             :     /* %typemap(freearg) (double** pvals, size_t* pnCount) */
   33830          19 :     CPLFree(*arg2);
   33831             :   }
   33832          19 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   33833             :   return resultobj;
   33834           0 : fail:
   33835           0 :   {
   33836             :     /* %typemap(freearg) (double** pvals, size_t* pnCount) */
   33837           0 :     CPLFree(*arg2);
   33838             :   }
   33839             :   return NULL;
   33840             : }
   33841             : 
   33842             : 
   33843           5 : SWIGINTERN PyObject *_wrap_Attribute_WriteRaw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   33844           5 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   33845           5 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   33846           5 :   GIntBig arg2 ;
   33847           5 :   char *arg3 = (char *) 0 ;
   33848           5 :   void *argp1 = 0 ;
   33849           5 :   int res1 = 0 ;
   33850           5 :   int alloc2 = 0 ;
   33851           5 :   bool viewIsValid2 = false ;
   33852           5 :   Py_buffer view2 ;
   33853           5 :   PyObject *swig_obj[2] ;
   33854           5 :   CPLErr result;
   33855             :   
   33856           5 :   if (!SWIG_Python_UnpackTuple(args, "Attribute_WriteRaw", 2, 2, swig_obj)) SWIG_fail;
   33857           5 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   33858           5 :   if (!SWIG_IsOK(res1)) {
   33859           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_WriteRaw" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   33860             :   }
   33861           5 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   33862           5 :   {
   33863             :     /* %typemap(in,numinputs=1) (GIntBig nLen, char *pBuf ) */
   33864           5 :     char* ptr = NULL;
   33865           5 :     if( !GetBufferAsCharPtrGIntBigSize(swig_obj[1], &arg2, &ptr, &alloc2, &viewIsValid2, &view2) ) {
   33866           0 :       SWIG_fail;
   33867             :     }
   33868           5 :     arg3 = (char *)ptr;
   33869             :   }
   33870           5 :   {
   33871           5 :     const int bLocalUseExceptions = GetUseExceptions();
   33872           5 :     if ( bLocalUseExceptions ) {
   33873           4 :       pushErrorHandler();
   33874             :     }
   33875           5 :     {
   33876           5 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   33877           5 :       CPL_IGNORE_RET_VAL(result = (CPLErr)GDALAttributeHS_WriteRaw(arg1,arg2,arg3));
   33878           5 :       SWIG_PYTHON_THREAD_END_ALLOW;
   33879             :     }
   33880           5 :     if ( bLocalUseExceptions ) {
   33881           4 :       popErrorHandler();
   33882             :     }
   33883             : #ifndef SED_HACKS
   33884             :     if ( bLocalUseExceptions ) {
   33885             :       CPLErr eclass = CPLGetLastErrorType();
   33886             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   33887             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   33888             :       }
   33889             :     }
   33890             : #endif
   33891             :   }
   33892           5 :   resultobj = SWIG_From_int(static_cast< int >(result));
   33893           5 :   {
   33894             :     /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
   33895           5 :     if( viewIsValid2 ) {
   33896           5 :       PyBuffer_Release(&view2);
   33897             :     }
   33898           0 :     else if (ReturnSame(alloc2) == SWIG_NEWOBJ ) {
   33899           0 :       delete[] arg3;
   33900             :     }
   33901             :   }
   33902           5 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   33903             :   return resultobj;
   33904           0 : fail:
   33905           0 :   {
   33906             :     /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
   33907           0 :     if( viewIsValid2 ) {
   33908           0 :       PyBuffer_Release(&view2);
   33909             :     }
   33910           5 :     else if (ReturnSame(alloc2) == SWIG_NEWOBJ ) {
   33911             :       delete[] arg3;
   33912             :     }
   33913             :   }
   33914             :   return NULL;
   33915             : }
   33916             : 
   33917             : 
   33918         174 : SWIGINTERN PyObject *_wrap_Attribute_WriteString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   33919         174 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   33920         174 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   33921         174 :   char *arg2 = (char *) 0 ;
   33922         174 :   void *argp1 = 0 ;
   33923         174 :   int res1 = 0 ;
   33924         174 :   int res2 ;
   33925         174 :   char *buf2 = 0 ;
   33926         174 :   int alloc2 = 0 ;
   33927         174 :   PyObject *swig_obj[2] ;
   33928         174 :   CPLErr result;
   33929             :   
   33930         174 :   if (!SWIG_Python_UnpackTuple(args, "Attribute_WriteString", 2, 2, swig_obj)) SWIG_fail;
   33931         174 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   33932         174 :   if (!SWIG_IsOK(res1)) {
   33933           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_WriteString" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   33934             :   }
   33935         174 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   33936         174 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   33937         174 :   if (!SWIG_IsOK(res2)) {
   33938           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Attribute_WriteString" "', argument " "2"" of type '" "char const *""'");
   33939             :   }
   33940         174 :   arg2 = reinterpret_cast< char * >(buf2);
   33941         174 :   {
   33942         174 :     const int bLocalUseExceptions = GetUseExceptions();
   33943         174 :     if ( bLocalUseExceptions ) {
   33944         131 :       pushErrorHandler();
   33945             :     }
   33946         174 :     {
   33947         174 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   33948         348 :       CPL_IGNORE_RET_VAL(result = (CPLErr)GDALAttributeHS_WriteString(arg1,(char const *)arg2));
   33949         174 :       SWIG_PYTHON_THREAD_END_ALLOW;
   33950             :     }
   33951         174 :     if ( bLocalUseExceptions ) {
   33952         131 :       popErrorHandler();
   33953             :     }
   33954             : #ifndef SED_HACKS
   33955             :     if ( bLocalUseExceptions ) {
   33956             :       CPLErr eclass = CPLGetLastErrorType();
   33957             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   33958             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   33959             :       }
   33960             :     }
   33961             : #endif
   33962             :   }
   33963         174 :   resultobj = SWIG_From_int(static_cast< int >(result));
   33964         174 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   33965         187 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   33966             :   return resultobj;
   33967           0 : fail:
   33968           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   33969             :   return NULL;
   33970             : }
   33971             : 
   33972             : 
   33973           8 : SWIGINTERN PyObject *_wrap_Attribute_WriteStringArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   33974           8 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   33975           8 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   33976           8 :   char **arg2 = (char **) 0 ;
   33977           8 :   void *argp1 = 0 ;
   33978           8 :   int res1 = 0 ;
   33979           8 :   PyObject *swig_obj[2] ;
   33980           8 :   CPLErr result;
   33981             :   
   33982           8 :   if (!SWIG_Python_UnpackTuple(args, "Attribute_WriteStringArray", 2, 2, swig_obj)) SWIG_fail;
   33983           8 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   33984           8 :   if (!SWIG_IsOK(res1)) {
   33985           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_WriteStringArray" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   33986             :   }
   33987           8 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   33988           8 :   {
   33989             :     /* %typemap(in) char **dict */
   33990           8 :     arg2 = NULL;
   33991           8 :     if ( PySequence_Check( swig_obj[1] ) ) {
   33992           8 :       int bErr = FALSE;
   33993           8 :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   33994           8 :       if ( bErr )
   33995             :       {
   33996           0 :         SWIG_fail;
   33997             :       }
   33998             :     }
   33999           0 :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   34000           0 :       int bErr = FALSE;
   34001           0 :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   34002           0 :       if ( bErr )
   34003             :       {
   34004           0 :         SWIG_fail;
   34005             :       }
   34006             :     }
   34007             :     else {
   34008           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   34009           0 :       SWIG_fail;
   34010             :     }
   34011             :   }
   34012           8 :   {
   34013           8 :     const int bLocalUseExceptions = GetUseExceptions();
   34014           8 :     if ( bLocalUseExceptions ) {
   34015           0 :       pushErrorHandler();
   34016             :     }
   34017           8 :     {
   34018           8 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34019          16 :       CPL_IGNORE_RET_VAL(result = (CPLErr)GDALAttributeHS_WriteStringArray(arg1,arg2));
   34020           8 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34021             :     }
   34022           8 :     if ( bLocalUseExceptions ) {
   34023           0 :       popErrorHandler();
   34024             :     }
   34025             : #ifndef SED_HACKS
   34026             :     if ( bLocalUseExceptions ) {
   34027             :       CPLErr eclass = CPLGetLastErrorType();
   34028             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34029             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34030             :       }
   34031             :     }
   34032             : #endif
   34033             :   }
   34034           8 :   resultobj = SWIG_From_int(static_cast< int >(result));
   34035           8 :   {
   34036             :     /* %typemap(freearg) char **dict */
   34037           8 :     CSLDestroy( arg2 );
   34038             :   }
   34039           8 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   34040             :   return resultobj;
   34041           0 : fail:
   34042           0 :   {
   34043             :     /* %typemap(freearg) char **dict */
   34044           0 :     CSLDestroy( arg2 );
   34045             :   }
   34046             :   return NULL;
   34047             : }
   34048             : 
   34049             : 
   34050          22 : SWIGINTERN PyObject *_wrap_Attribute_WriteInt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34051          22 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34052          22 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   34053          22 :   int arg2 ;
   34054          22 :   void *argp1 = 0 ;
   34055          22 :   int res1 = 0 ;
   34056          22 :   int val2 ;
   34057          22 :   int ecode2 = 0 ;
   34058          22 :   PyObject *swig_obj[2] ;
   34059          22 :   CPLErr result;
   34060             :   
   34061          22 :   if (!SWIG_Python_UnpackTuple(args, "Attribute_WriteInt", 2, 2, swig_obj)) SWIG_fail;
   34062          22 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   34063          22 :   if (!SWIG_IsOK(res1)) {
   34064           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_WriteInt" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   34065             :   }
   34066          22 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   34067          22 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   34068          22 :   if (!SWIG_IsOK(ecode2)) {
   34069           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Attribute_WriteInt" "', argument " "2"" of type '" "int""'");
   34070             :   } 
   34071          22 :   arg2 = static_cast< int >(val2);
   34072          22 :   {
   34073          22 :     const int bLocalUseExceptions = GetUseExceptions();
   34074          22 :     if ( bLocalUseExceptions ) {
   34075           4 :       pushErrorHandler();
   34076             :     }
   34077          22 :     {
   34078          22 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34079          44 :       CPL_IGNORE_RET_VAL(result = (CPLErr)GDALAttributeHS_WriteInt(arg1,arg2));
   34080          22 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34081             :     }
   34082          22 :     if ( bLocalUseExceptions ) {
   34083           4 :       popErrorHandler();
   34084             :     }
   34085             : #ifndef SED_HACKS
   34086             :     if ( bLocalUseExceptions ) {
   34087             :       CPLErr eclass = CPLGetLastErrorType();
   34088             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34089             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34090             :       }
   34091             :     }
   34092             : #endif
   34093             :   }
   34094          22 :   resultobj = SWIG_From_int(static_cast< int >(result));
   34095          23 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   34096             :   return resultobj;
   34097             : fail:
   34098             :   return NULL;
   34099             : }
   34100             : 
   34101             : 
   34102          16 : SWIGINTERN PyObject *_wrap_Attribute_WriteDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34103          16 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34104          16 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   34105          16 :   double arg2 ;
   34106          16 :   void *argp1 = 0 ;
   34107          16 :   int res1 = 0 ;
   34108          16 :   double val2 ;
   34109          16 :   int ecode2 = 0 ;
   34110          16 :   PyObject *swig_obj[2] ;
   34111          16 :   CPLErr result;
   34112             :   
   34113          16 :   if (!SWIG_Python_UnpackTuple(args, "Attribute_WriteDouble", 2, 2, swig_obj)) SWIG_fail;
   34114          16 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   34115          16 :   if (!SWIG_IsOK(res1)) {
   34116           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_WriteDouble" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   34117             :   }
   34118          16 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   34119          16 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   34120          16 :   if (!SWIG_IsOK(ecode2)) {
   34121           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Attribute_WriteDouble" "', argument " "2"" of type '" "double""'");
   34122             :   } 
   34123          16 :   arg2 = static_cast< double >(val2);
   34124          16 :   {
   34125          16 :     const int bLocalUseExceptions = GetUseExceptions();
   34126          16 :     if ( bLocalUseExceptions ) {
   34127           1 :       pushErrorHandler();
   34128             :     }
   34129          16 :     {
   34130          16 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34131          32 :       CPL_IGNORE_RET_VAL(result = (CPLErr)GDALAttributeHS_WriteDouble(arg1,arg2));
   34132          16 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34133             :     }
   34134          16 :     if ( bLocalUseExceptions ) {
   34135           1 :       popErrorHandler();
   34136             :     }
   34137             : #ifndef SED_HACKS
   34138             :     if ( bLocalUseExceptions ) {
   34139             :       CPLErr eclass = CPLGetLastErrorType();
   34140             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34141             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34142             :       }
   34143             :     }
   34144             : #endif
   34145             :   }
   34146          16 :   resultobj = SWIG_From_int(static_cast< int >(result));
   34147          16 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   34148             :   return resultobj;
   34149             : fail:
   34150             :   return NULL;
   34151             : }
   34152             : 
   34153             : 
   34154          17 : SWIGINTERN PyObject *_wrap_Attribute_WriteDoubleArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34155          17 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34156          17 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   34157          17 :   int arg2 ;
   34158          17 :   double *arg3 = (double *) 0 ;
   34159          17 :   void *argp1 = 0 ;
   34160          17 :   int res1 = 0 ;
   34161          17 :   PyObject *swig_obj[2] ;
   34162          17 :   CPLErr result;
   34163             :   
   34164          17 :   if (!SWIG_Python_UnpackTuple(args, "Attribute_WriteDoubleArray", 2, 2, swig_obj)) SWIG_fail;
   34165          17 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   34166          17 :   if (!SWIG_IsOK(res1)) {
   34167           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_WriteDoubleArray" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   34168             :   }
   34169          17 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   34170          17 :   {
   34171             :     /* %typemap(in,numinputs=1) (int nList, double* pList)*/
   34172          17 :     arg3 = CreateCDoubleListFromSequence(swig_obj[1], &arg2);
   34173          17 :     if( arg2 < 0 ) {
   34174           0 :       SWIG_fail;
   34175             :     }
   34176             :   }
   34177          17 :   {
   34178          17 :     const int bLocalUseExceptions = GetUseExceptions();
   34179          17 :     if ( bLocalUseExceptions ) {
   34180           1 :       pushErrorHandler();
   34181             :     }
   34182          17 :     {
   34183          17 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34184          34 :       CPL_IGNORE_RET_VAL(result = (CPLErr)GDALAttributeHS_WriteDoubleArray(arg1,arg2,arg3));
   34185          17 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34186             :     }
   34187          17 :     if ( bLocalUseExceptions ) {
   34188           1 :       popErrorHandler();
   34189             :     }
   34190             : #ifndef SED_HACKS
   34191             :     if ( bLocalUseExceptions ) {
   34192             :       CPLErr eclass = CPLGetLastErrorType();
   34193             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34194             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34195             :       }
   34196             :     }
   34197             : #endif
   34198             :   }
   34199          17 :   resultobj = SWIG_From_int(static_cast< int >(result));
   34200          17 :   {
   34201             :     /* %typemap(freearg) (int nList, double* pList) */
   34202          17 :     free(arg3);
   34203             :   }
   34204          17 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   34205             :   return resultobj;
   34206           0 : fail:
   34207           0 :   {
   34208             :     /* %typemap(freearg) (int nList, double* pList) */
   34209           0 :     free(arg3);
   34210             :   }
   34211           0 :   return NULL;
   34212             : }
   34213             : 
   34214             : 
   34215          27 : SWIGINTERN PyObject *_wrap_Attribute_Rename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34216          27 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34217          27 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   34218          27 :   char *arg2 = (char *) 0 ;
   34219          27 :   void *argp1 = 0 ;
   34220          27 :   int res1 = 0 ;
   34221          27 :   int res2 ;
   34222          27 :   char *buf2 = 0 ;
   34223          27 :   int alloc2 = 0 ;
   34224          27 :   PyObject *swig_obj[2] ;
   34225          27 :   CPLErr result;
   34226             :   
   34227          27 :   if (!SWIG_Python_UnpackTuple(args, "Attribute_Rename", 2, 2, swig_obj)) SWIG_fail;
   34228          27 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   34229          27 :   if (!SWIG_IsOK(res1)) {
   34230           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_Rename" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   34231             :   }
   34232          27 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   34233          27 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   34234          27 :   if (!SWIG_IsOK(res2)) {
   34235           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Attribute_Rename" "', argument " "2"" of type '" "char const *""'");
   34236             :   }
   34237          27 :   arg2 = reinterpret_cast< char * >(buf2);
   34238          27 :   {
   34239          27 :     const int bLocalUseExceptions = GetUseExceptions();
   34240          27 :     if ( bLocalUseExceptions ) {
   34241          27 :       pushErrorHandler();
   34242             :     }
   34243          27 :     {
   34244          27 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34245          54 :       CPL_IGNORE_RET_VAL(result = (CPLErr)GDALAttributeHS_Rename(arg1,(char const *)arg2));
   34246          27 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34247             :     }
   34248          27 :     if ( bLocalUseExceptions ) {
   34249          27 :       popErrorHandler();
   34250             :     }
   34251             : #ifndef SED_HACKS
   34252             :     if ( bLocalUseExceptions ) {
   34253             :       CPLErr eclass = CPLGetLastErrorType();
   34254             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34255             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34256             :       }
   34257             :     }
   34258             : #endif
   34259             :   }
   34260          27 :   resultobj = SWIG_From_int(static_cast< int >(result));
   34261          27 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   34262          44 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   34263             :   return resultobj;
   34264           0 : fail:
   34265           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   34266             :   return NULL;
   34267             : }
   34268             : 
   34269             : 
   34270         271 : SWIGINTERN PyObject *Attribute_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34271         271 :   PyObject *obj;
   34272         271 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   34273         271 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALAttributeHS, SWIG_NewClientData(obj));
   34274         271 :   return SWIG_Py_Void();
   34275             : }
   34276             : 
   34277        4732 : SWIGINTERN PyObject *_wrap_delete_Dimension(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34278        4732 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34279        4732 :   GDALDimensionHS *arg1 = (GDALDimensionHS *) 0 ;
   34280        4732 :   void *argp1 = 0 ;
   34281        4732 :   int res1 = 0 ;
   34282        4732 :   PyObject *swig_obj[1] ;
   34283             :   
   34284        4732 :   if (!args) SWIG_fail;
   34285        4732 :   swig_obj[0] = args;
   34286        4732 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDimensionHS, SWIG_POINTER_DISOWN |  0 );
   34287        4732 :   if (!SWIG_IsOK(res1)) {
   34288           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Dimension" "', argument " "1"" of type '" "GDALDimensionHS *""'"); 
   34289             :   }
   34290        4732 :   arg1 = reinterpret_cast< GDALDimensionHS * >(argp1);
   34291        4732 :   {
   34292        4732 :     const int bLocalUseExceptions = GetUseExceptions();
   34293        4732 :     if ( bLocalUseExceptions ) {
   34294         591 :       pushErrorHandler();
   34295             :     }
   34296        4732 :     {
   34297        4732 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34298        4732 :       delete_GDALDimensionHS(arg1);
   34299        4732 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34300             :     }
   34301        4732 :     if ( bLocalUseExceptions ) {
   34302         591 :       popErrorHandler();
   34303             :     }
   34304             : #ifndef SED_HACKS
   34305             :     if ( bLocalUseExceptions ) {
   34306             :       CPLErr eclass = CPLGetLastErrorType();
   34307             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34308             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34309             :       }
   34310             :     }
   34311             : #endif
   34312             :   }
   34313        4732 :   resultobj = SWIG_Py_Void();
   34314        4732 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   34315             :   return resultobj;
   34316             : fail:
   34317             :   return NULL;
   34318             : }
   34319             : 
   34320             : 
   34321         274 : SWIGINTERN PyObject *_wrap_Dimension_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34322         274 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34323         274 :   GDALDimensionHS *arg1 = (GDALDimensionHS *) 0 ;
   34324         274 :   void *argp1 = 0 ;
   34325         274 :   int res1 = 0 ;
   34326         274 :   PyObject *swig_obj[1] ;
   34327         274 :   char *result = 0 ;
   34328             :   
   34329         274 :   if (!args) SWIG_fail;
   34330         274 :   swig_obj[0] = args;
   34331         274 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDimensionHS, 0 |  0 );
   34332         274 :   if (!SWIG_IsOK(res1)) {
   34333           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dimension_GetName" "', argument " "1"" of type '" "GDALDimensionHS *""'"); 
   34334             :   }
   34335         274 :   arg1 = reinterpret_cast< GDALDimensionHS * >(argp1);
   34336         274 :   {
   34337         274 :     const int bLocalUseExceptions = GetUseExceptions();
   34338         274 :     if ( bLocalUseExceptions ) {
   34339         132 :       pushErrorHandler();
   34340             :     }
   34341         274 :     {
   34342         274 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34343         274 :       result = (char *)GDALDimensionHS_GetName(arg1);
   34344         274 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34345             :     }
   34346         274 :     if ( bLocalUseExceptions ) {
   34347         132 :       popErrorHandler();
   34348             :     }
   34349             : #ifndef SED_HACKS
   34350             :     if ( bLocalUseExceptions ) {
   34351             :       CPLErr eclass = CPLGetLastErrorType();
   34352             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34353             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34354             :       }
   34355             :     }
   34356             : #endif
   34357             :   }
   34358         274 :   resultobj = SWIG_FromCharPtr((const char *)result);
   34359         274 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   34360             :   return resultobj;
   34361             : fail:
   34362             :   return NULL;
   34363             : }
   34364             : 
   34365             : 
   34366          80 : SWIGINTERN PyObject *_wrap_Dimension_GetFullName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34367          80 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34368          80 :   GDALDimensionHS *arg1 = (GDALDimensionHS *) 0 ;
   34369          80 :   void *argp1 = 0 ;
   34370          80 :   int res1 = 0 ;
   34371          80 :   PyObject *swig_obj[1] ;
   34372          80 :   char *result = 0 ;
   34373             :   
   34374          80 :   if (!args) SWIG_fail;
   34375          80 :   swig_obj[0] = args;
   34376          80 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDimensionHS, 0 |  0 );
   34377          80 :   if (!SWIG_IsOK(res1)) {
   34378           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dimension_GetFullName" "', argument " "1"" of type '" "GDALDimensionHS *""'"); 
   34379             :   }
   34380          80 :   arg1 = reinterpret_cast< GDALDimensionHS * >(argp1);
   34381          80 :   {
   34382          80 :     const int bLocalUseExceptions = GetUseExceptions();
   34383          80 :     if ( bLocalUseExceptions ) {
   34384          49 :       pushErrorHandler();
   34385             :     }
   34386          80 :     {
   34387          80 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34388          80 :       result = (char *)GDALDimensionHS_GetFullName(arg1);
   34389          80 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34390             :     }
   34391          80 :     if ( bLocalUseExceptions ) {
   34392          49 :       popErrorHandler();
   34393             :     }
   34394             : #ifndef SED_HACKS
   34395             :     if ( bLocalUseExceptions ) {
   34396             :       CPLErr eclass = CPLGetLastErrorType();
   34397             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34398             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34399             :       }
   34400             :     }
   34401             : #endif
   34402             :   }
   34403          80 :   resultobj = SWIG_FromCharPtr((const char *)result);
   34404          80 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   34405             :   return resultobj;
   34406             : fail:
   34407             :   return NULL;
   34408             : }
   34409             : 
   34410             : 
   34411          52 : SWIGINTERN PyObject *_wrap_Dimension_GetType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34412          52 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34413          52 :   GDALDimensionHS *arg1 = (GDALDimensionHS *) 0 ;
   34414          52 :   void *argp1 = 0 ;
   34415          52 :   int res1 = 0 ;
   34416          52 :   PyObject *swig_obj[1] ;
   34417          52 :   char *result = 0 ;
   34418             :   
   34419          52 :   if (!args) SWIG_fail;
   34420          52 :   swig_obj[0] = args;
   34421          52 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDimensionHS, 0 |  0 );
   34422          52 :   if (!SWIG_IsOK(res1)) {
   34423           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dimension_GetType" "', argument " "1"" of type '" "GDALDimensionHS *""'"); 
   34424             :   }
   34425          52 :   arg1 = reinterpret_cast< GDALDimensionHS * >(argp1);
   34426          52 :   {
   34427          52 :     const int bLocalUseExceptions = GetUseExceptions();
   34428          52 :     if ( bLocalUseExceptions ) {
   34429           6 :       pushErrorHandler();
   34430             :     }
   34431          52 :     {
   34432          52 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34433          52 :       result = (char *)GDALDimensionHS_GetType(arg1);
   34434          52 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34435             :     }
   34436          52 :     if ( bLocalUseExceptions ) {
   34437           6 :       popErrorHandler();
   34438             :     }
   34439             : #ifndef SED_HACKS
   34440             :     if ( bLocalUseExceptions ) {
   34441             :       CPLErr eclass = CPLGetLastErrorType();
   34442             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34443             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34444             :       }
   34445             :     }
   34446             : #endif
   34447             :   }
   34448          52 :   resultobj = SWIG_FromCharPtr((const char *)result);
   34449          52 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   34450             :   return resultobj;
   34451             : fail:
   34452             :   return NULL;
   34453             : }
   34454             : 
   34455             : 
   34456          22 : SWIGINTERN PyObject *_wrap_Dimension_GetDirection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34457          22 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34458          22 :   GDALDimensionHS *arg1 = (GDALDimensionHS *) 0 ;
   34459          22 :   void *argp1 = 0 ;
   34460          22 :   int res1 = 0 ;
   34461          22 :   PyObject *swig_obj[1] ;
   34462          22 :   char *result = 0 ;
   34463             :   
   34464          22 :   if (!args) SWIG_fail;
   34465          22 :   swig_obj[0] = args;
   34466          22 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDimensionHS, 0 |  0 );
   34467          22 :   if (!SWIG_IsOK(res1)) {
   34468           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dimension_GetDirection" "', argument " "1"" of type '" "GDALDimensionHS *""'"); 
   34469             :   }
   34470          22 :   arg1 = reinterpret_cast< GDALDimensionHS * >(argp1);
   34471          22 :   {
   34472          22 :     const int bLocalUseExceptions = GetUseExceptions();
   34473          22 :     if ( bLocalUseExceptions ) {
   34474           2 :       pushErrorHandler();
   34475             :     }
   34476          22 :     {
   34477          22 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34478          22 :       result = (char *)GDALDimensionHS_GetDirection(arg1);
   34479          22 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34480             :     }
   34481          22 :     if ( bLocalUseExceptions ) {
   34482           2 :       popErrorHandler();
   34483             :     }
   34484             : #ifndef SED_HACKS
   34485             :     if ( bLocalUseExceptions ) {
   34486             :       CPLErr eclass = CPLGetLastErrorType();
   34487             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34488             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34489             :       }
   34490             :     }
   34491             : #endif
   34492             :   }
   34493          22 :   resultobj = SWIG_FromCharPtr((const char *)result);
   34494          22 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   34495             :   return resultobj;
   34496             : fail:
   34497             :   return NULL;
   34498             : }
   34499             : 
   34500             : 
   34501        3493 : SWIGINTERN PyObject *_wrap_Dimension_GetSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34502        3493 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34503        3493 :   GDALDimensionHS *arg1 = (GDALDimensionHS *) 0 ;
   34504        3493 :   void *argp1 = 0 ;
   34505        3493 :   int res1 = 0 ;
   34506        3493 :   PyObject *swig_obj[1] ;
   34507        3493 :   GUIntBig result;
   34508             :   
   34509        3493 :   if (!args) SWIG_fail;
   34510        3493 :   swig_obj[0] = args;
   34511        3493 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDimensionHS, 0 |  0 );
   34512        3493 :   if (!SWIG_IsOK(res1)) {
   34513           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dimension_GetSize" "', argument " "1"" of type '" "GDALDimensionHS *""'"); 
   34514             :   }
   34515        3493 :   arg1 = reinterpret_cast< GDALDimensionHS * >(argp1);
   34516        3493 :   {
   34517        3493 :     const int bLocalUseExceptions = GetUseExceptions();
   34518        3493 :     if ( bLocalUseExceptions ) {
   34519         334 :       pushErrorHandler();
   34520             :     }
   34521        3493 :     {
   34522        3493 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34523        3493 :       result = GDALDimensionHS_GetSize(arg1);
   34524        3493 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34525             :     }
   34526        3493 :     if ( bLocalUseExceptions ) {
   34527         334 :       popErrorHandler();
   34528             :     }
   34529             : #ifndef SED_HACKS
   34530             :     if ( bLocalUseExceptions ) {
   34531             :       CPLErr eclass = CPLGetLastErrorType();
   34532             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34533             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34534             :       }
   34535             :     }
   34536             : #endif
   34537             :   }
   34538        3493 :   {
   34539        3493 :     resultobj = PyLong_FromUnsignedLongLong(result);
   34540             :   }
   34541        3493 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   34542             :   return resultobj;
   34543             : fail:
   34544             :   return NULL;
   34545             : }
   34546             : 
   34547             : 
   34548         118 : SWIGINTERN PyObject *_wrap_Dimension_GetIndexingVariable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34549         118 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34550         118 :   GDALDimensionHS *arg1 = (GDALDimensionHS *) 0 ;
   34551         118 :   void *argp1 = 0 ;
   34552         118 :   int res1 = 0 ;
   34553         118 :   PyObject *swig_obj[1] ;
   34554         118 :   GDALMDArrayHS *result = 0 ;
   34555             :   
   34556         118 :   if (!args) SWIG_fail;
   34557         118 :   swig_obj[0] = args;
   34558         118 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDimensionHS, 0 |  0 );
   34559         118 :   if (!SWIG_IsOK(res1)) {
   34560           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dimension_GetIndexingVariable" "', argument " "1"" of type '" "GDALDimensionHS *""'"); 
   34561             :   }
   34562         118 :   arg1 = reinterpret_cast< GDALDimensionHS * >(argp1);
   34563         118 :   {
   34564         118 :     const int bLocalUseExceptions = GetUseExceptions();
   34565         118 :     if ( bLocalUseExceptions ) {
   34566          44 :       pushErrorHandler();
   34567             :     }
   34568         118 :     {
   34569         118 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34570         118 :       result = (GDALMDArrayHS *)GDALDimensionHS_GetIndexingVariable(arg1);
   34571         118 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34572             :     }
   34573         118 :     if ( bLocalUseExceptions ) {
   34574          44 :       popErrorHandler();
   34575             :     }
   34576             : #ifndef SED_HACKS
   34577             :     if ( bLocalUseExceptions ) {
   34578             :       CPLErr eclass = CPLGetLastErrorType();
   34579             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34580             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34581             :       }
   34582             :     }
   34583             : #endif
   34584             :   }
   34585         118 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_OWN |  0 );
   34586         118 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   34587             :   return resultobj;
   34588             : fail:
   34589             :   return NULL;
   34590             : }
   34591             : 
   34592             : 
   34593          22 : SWIGINTERN PyObject *_wrap_Dimension_SetIndexingVariable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34594          22 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34595          22 :   GDALDimensionHS *arg1 = (GDALDimensionHS *) 0 ;
   34596          22 :   GDALMDArrayHS *arg2 = (GDALMDArrayHS *) 0 ;
   34597          22 :   void *argp1 = 0 ;
   34598          22 :   int res1 = 0 ;
   34599          22 :   void *argp2 = 0 ;
   34600          22 :   int res2 = 0 ;
   34601          22 :   PyObject *swig_obj[2] ;
   34602          22 :   bool result;
   34603             :   
   34604          22 :   if (!SWIG_Python_UnpackTuple(args, "Dimension_SetIndexingVariable", 2, 2, swig_obj)) SWIG_fail;
   34605          22 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDimensionHS, 0 |  0 );
   34606          22 :   if (!SWIG_IsOK(res1)) {
   34607           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dimension_SetIndexingVariable" "', argument " "1"" of type '" "GDALDimensionHS *""'"); 
   34608             :   }
   34609          22 :   arg1 = reinterpret_cast< GDALDimensionHS * >(argp1);
   34610          22 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   34611          22 :   if (!SWIG_IsOK(res2)) {
   34612           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dimension_SetIndexingVariable" "', argument " "2"" of type '" "GDALMDArrayHS *""'"); 
   34613             :   }
   34614          22 :   arg2 = reinterpret_cast< GDALMDArrayHS * >(argp2);
   34615          22 :   {
   34616          22 :     const int bLocalUseExceptions = GetUseExceptions();
   34617          22 :     if ( bLocalUseExceptions ) {
   34618           8 :       pushErrorHandler();
   34619             :     }
   34620          22 :     {
   34621          22 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34622          22 :       result = (bool)GDALDimensionHS_SetIndexingVariable(arg1,arg2);
   34623          22 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34624             :     }
   34625          22 :     if ( bLocalUseExceptions ) {
   34626           8 :       popErrorHandler();
   34627             :     }
   34628             : #ifndef SED_HACKS
   34629             :     if ( bLocalUseExceptions ) {
   34630             :       CPLErr eclass = CPLGetLastErrorType();
   34631             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34632             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34633             :       }
   34634             :     }
   34635             : #endif
   34636             :   }
   34637          22 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   34638          22 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   34639             :   return resultobj;
   34640             : fail:
   34641             :   return NULL;
   34642             : }
   34643             : 
   34644             : 
   34645          31 : SWIGINTERN PyObject *_wrap_Dimension_Rename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34646          31 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34647          31 :   GDALDimensionHS *arg1 = (GDALDimensionHS *) 0 ;
   34648          31 :   char *arg2 = (char *) 0 ;
   34649          31 :   void *argp1 = 0 ;
   34650          31 :   int res1 = 0 ;
   34651          31 :   int res2 ;
   34652          31 :   char *buf2 = 0 ;
   34653          31 :   int alloc2 = 0 ;
   34654          31 :   PyObject *swig_obj[2] ;
   34655          31 :   CPLErr result;
   34656             :   
   34657          31 :   if (!SWIG_Python_UnpackTuple(args, "Dimension_Rename", 2, 2, swig_obj)) SWIG_fail;
   34658          31 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDimensionHS, 0 |  0 );
   34659          31 :   if (!SWIG_IsOK(res1)) {
   34660           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dimension_Rename" "', argument " "1"" of type '" "GDALDimensionHS *""'"); 
   34661             :   }
   34662          31 :   arg1 = reinterpret_cast< GDALDimensionHS * >(argp1);
   34663          31 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   34664          31 :   if (!SWIG_IsOK(res2)) {
   34665           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dimension_Rename" "', argument " "2"" of type '" "char const *""'");
   34666             :   }
   34667          31 :   arg2 = reinterpret_cast< char * >(buf2);
   34668          31 :   {
   34669          31 :     const int bLocalUseExceptions = GetUseExceptions();
   34670          31 :     if ( bLocalUseExceptions ) {
   34671          31 :       pushErrorHandler();
   34672             :     }
   34673          31 :     {
   34674          31 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34675          62 :       CPL_IGNORE_RET_VAL(result = (CPLErr)GDALDimensionHS_Rename(arg1,(char const *)arg2));
   34676          31 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34677             :     }
   34678          31 :     if ( bLocalUseExceptions ) {
   34679          31 :       popErrorHandler();
   34680             :     }
   34681             : #ifndef SED_HACKS
   34682             :     if ( bLocalUseExceptions ) {
   34683             :       CPLErr eclass = CPLGetLastErrorType();
   34684             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34685             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34686             :       }
   34687             :     }
   34688             : #endif
   34689             :   }
   34690          31 :   resultobj = SWIG_From_int(static_cast< int >(result));
   34691          31 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   34692          54 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   34693             :   return resultobj;
   34694           0 : fail:
   34695           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   34696             :   return NULL;
   34697             : }
   34698             : 
   34699             : 
   34700         271 : SWIGINTERN PyObject *Dimension_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34701         271 :   PyObject *obj;
   34702         271 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   34703         271 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALDimensionHS, SWIG_NewClientData(obj));
   34704         271 :   return SWIG_Py_Void();
   34705             : }
   34706             : 
   34707        4398 : SWIGINTERN PyObject *_wrap_delete_ExtendedDataType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34708        4398 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34709        4398 :   GDALExtendedDataTypeHS *arg1 = (GDALExtendedDataTypeHS *) 0 ;
   34710        4398 :   void *argp1 = 0 ;
   34711        4398 :   int res1 = 0 ;
   34712        4398 :   PyObject *swig_obj[1] ;
   34713             :   
   34714        4398 :   if (!args) SWIG_fail;
   34715        4398 :   swig_obj[0] = args;
   34716        4398 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALExtendedDataTypeHS, SWIG_POINTER_DISOWN |  0 );
   34717        4398 :   if (!SWIG_IsOK(res1)) {
   34718           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ExtendedDataType" "', argument " "1"" of type '" "GDALExtendedDataTypeHS *""'"); 
   34719             :   }
   34720        4398 :   arg1 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp1);
   34721        4398 :   {
   34722        4398 :     const int bLocalUseExceptions = GetUseExceptions();
   34723        4398 :     if ( bLocalUseExceptions ) {
   34724         989 :       pushErrorHandler();
   34725             :     }
   34726        4398 :     {
   34727        4398 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34728        4398 :       delete_GDALExtendedDataTypeHS(arg1);
   34729        4398 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34730             :     }
   34731        4398 :     if ( bLocalUseExceptions ) {
   34732         989 :       popErrorHandler();
   34733             :     }
   34734             : #ifndef SED_HACKS
   34735             :     if ( bLocalUseExceptions ) {
   34736             :       CPLErr eclass = CPLGetLastErrorType();
   34737             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34738             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34739             :       }
   34740             :     }
   34741             : #endif
   34742             :   }
   34743        4398 :   resultobj = SWIG_Py_Void();
   34744        4398 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   34745             :   return resultobj;
   34746             : fail:
   34747             :   return NULL;
   34748             : }
   34749             : 
   34750             : 
   34751        1900 : SWIGINTERN PyObject *_wrap_ExtendedDataType_Create(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34752        1900 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34753        1900 :   GDALDataType arg1 ;
   34754        1900 :   PyObject *swig_obj[1] ;
   34755        1900 :   GDALExtendedDataTypeHS *result = 0 ;
   34756             :   
   34757        1900 :   if (!args) SWIG_fail;
   34758        1900 :   swig_obj[0] = args;
   34759        1900 :   {
   34760             :     // %typemap(in) GDALDataType
   34761        1900 :     int val = 0;
   34762        1900 :     int ecode = SWIG_AsVal_int(swig_obj[0], &val);
   34763        1900 :     if (!SWIG_IsOK(ecode)) {
   34764           0 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   34765             :     }
   34766        1900 :     if( val < GDT_Unknown || val >= GDT_TypeCount )
   34767             :     {
   34768           0 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   34769             :     }
   34770        1900 :     arg1 = static_cast<GDALDataType>(val);
   34771             :   }
   34772        1900 :   {
   34773        1900 :     const int bLocalUseExceptions = GetUseExceptions();
   34774        1900 :     if ( bLocalUseExceptions ) {
   34775         343 :       pushErrorHandler();
   34776             :     }
   34777        1900 :     {
   34778        1900 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34779        1900 :       result = (GDALExtendedDataTypeHS *)GDALExtendedDataTypeHS_Create(arg1);
   34780        1900 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34781             :     }
   34782        1900 :     if ( bLocalUseExceptions ) {
   34783         343 :       popErrorHandler();
   34784             :     }
   34785             : #ifndef SED_HACKS
   34786             :     if ( bLocalUseExceptions ) {
   34787             :       CPLErr eclass = CPLGetLastErrorType();
   34788             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34789             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34790             :       }
   34791             :     }
   34792             : #endif
   34793             :   }
   34794        1900 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALExtendedDataTypeHS, SWIG_POINTER_OWN |  0 );
   34795        1900 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   34796             :   return resultobj;
   34797             : fail:
   34798             :   return NULL;
   34799             : }
   34800             : 
   34801             : 
   34802         185 : SWIGINTERN PyObject *_wrap_ExtendedDataType_CreateString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34803         185 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34804         185 :   size_t arg1 = (size_t) 0 ;
   34805         185 :   GDALExtendedDataTypeSubType arg2 = (GDALExtendedDataTypeSubType) GEDTST_NONE ;
   34806         185 :   size_t val1 ;
   34807         185 :   int ecode1 = 0 ;
   34808         185 :   int val2 ;
   34809         185 :   int ecode2 = 0 ;
   34810         185 :   PyObject *swig_obj[2] ;
   34811         185 :   GDALExtendedDataTypeHS *result = 0 ;
   34812             :   
   34813         185 :   if (!SWIG_Python_UnpackTuple(args, "ExtendedDataType_CreateString", 0, 2, swig_obj)) SWIG_fail;
   34814         185 :   if (swig_obj[0]) {
   34815          11 :     ecode1 = SWIG_AsVal_size_t(swig_obj[0], &val1);
   34816          11 :     if (!SWIG_IsOK(ecode1)) {
   34817           0 :       SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "ExtendedDataType_CreateString" "', argument " "1"" of type '" "size_t""'");
   34818             :     } 
   34819             :     arg1 = static_cast< size_t >(val1);
   34820             :   }
   34821         185 :   if (swig_obj[1]) {
   34822           4 :     ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   34823           4 :     if (!SWIG_IsOK(ecode2)) {
   34824           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ExtendedDataType_CreateString" "', argument " "2"" of type '" "GDALExtendedDataTypeSubType""'");
   34825             :     } 
   34826           4 :     arg2 = static_cast< GDALExtendedDataTypeSubType >(val2);
   34827             :   }
   34828         185 :   {
   34829         185 :     const int bLocalUseExceptions = GetUseExceptions();
   34830         185 :     if ( bLocalUseExceptions ) {
   34831         111 :       pushErrorHandler();
   34832             :     }
   34833         185 :     {
   34834         185 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34835         185 :       result = (GDALExtendedDataTypeHS *)GDALExtendedDataTypeHS_CreateString(arg1,arg2);
   34836         185 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34837             :     }
   34838         185 :     if ( bLocalUseExceptions ) {
   34839         111 :       popErrorHandler();
   34840             :     }
   34841             : #ifndef SED_HACKS
   34842             :     if ( bLocalUseExceptions ) {
   34843             :       CPLErr eclass = CPLGetLastErrorType();
   34844             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34845             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34846             :       }
   34847             :     }
   34848             : #endif
   34849             :   }
   34850         185 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALExtendedDataTypeHS, SWIG_POINTER_OWN |  0 );
   34851         185 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   34852             :   return resultobj;
   34853             : fail:
   34854             :   return NULL;
   34855             : }
   34856             : 
   34857             : 
   34858          22 : SWIGINTERN PyObject *_wrap_ExtendedDataType_CreateCompound(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34859          22 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34860          22 :   char *arg1 = (char *) 0 ;
   34861          22 :   size_t arg2 ;
   34862          22 :   int arg3 ;
   34863          22 :   GDALEDTComponentHS **arg4 = (GDALEDTComponentHS **) 0 ;
   34864          22 :   int res1 ;
   34865          22 :   char *buf1 = 0 ;
   34866          22 :   int alloc1 = 0 ;
   34867          22 :   size_t val2 ;
   34868          22 :   int ecode2 = 0 ;
   34869          22 :   PyObject *swig_obj[3] ;
   34870          22 :   GDALExtendedDataTypeHS *result = 0 ;
   34871             :   
   34872          22 :   if (!SWIG_Python_UnpackTuple(args, "ExtendedDataType_CreateCompound", 3, 3, swig_obj)) SWIG_fail;
   34873          22 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   34874          22 :   if (!SWIG_IsOK(res1)) {
   34875           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExtendedDataType_CreateCompound" "', argument " "1"" of type '" "char const *""'");
   34876             :   }
   34877          22 :   arg1 = reinterpret_cast< char * >(buf1);
   34878          22 :   ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2);
   34879          22 :   if (!SWIG_IsOK(ecode2)) {
   34880           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ExtendedDataType_CreateCompound" "', argument " "2"" of type '" "size_t""'");
   34881             :   } 
   34882          22 :   arg2 = static_cast< size_t >(val2);
   34883          22 :   {
   34884             :     /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALEDTComponentHS *optional_##GDALEDTComponentHS)*/
   34885          22 :     if ( !PySequence_Check(swig_obj[2]) ) {
   34886           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   34887           0 :       SWIG_fail;
   34888             :     }
   34889          22 :     Py_ssize_t size = PySequence_Size(swig_obj[2]);
   34890          22 :     if( size > (Py_ssize_t)INT_MAX ) {
   34891           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   34892           0 :       SWIG_fail;
   34893             :     }
   34894          22 :     if( (size_t)size > SIZE_MAX / sizeof(GDALEDTComponentHS*) ) {
   34895           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   34896           0 :       SWIG_fail;
   34897             :     }
   34898          22 :     arg3 = (int)size;
   34899          22 :     arg4 = (GDALEDTComponentHS**) VSIMalloc(arg3*sizeof(GDALEDTComponentHS*));
   34900          22 :     if( !arg4) {
   34901           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   34902           0 :       SWIG_fail;
   34903             :     }
   34904             :     
   34905          54 :     for( int i = 0; i<arg3; i++ ) {
   34906          32 :       PyObject *o = PySequence_GetItem(swig_obj[2],i);
   34907          32 :       GDALEDTComponentHS* rawobjectpointer = NULL;
   34908          32 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALEDTComponentHS, SWIG_POINTER_EXCEPTION | 0 ));
   34909          32 :       if (!rawobjectpointer) {
   34910           0 :         Py_DECREF(o);
   34911           0 :         PyErr_SetString(PyExc_TypeError, "object of wrong GDALEDTComponentHS");
   34912           0 :         SWIG_fail;
   34913             :       }
   34914          32 :       arg4[i] = rawobjectpointer;
   34915          32 :       Py_DECREF(o);
   34916             :       
   34917             :     }
   34918             :   }
   34919          22 :   {
   34920          22 :     if (!arg1) {
   34921           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   34922             :     }
   34923             :   }
   34924          22 :   {
   34925          22 :     const int bLocalUseExceptions = GetUseExceptions();
   34926          22 :     if ( bLocalUseExceptions ) {
   34927           6 :       pushErrorHandler();
   34928             :     }
   34929          22 :     {
   34930          22 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34931          22 :       result = (GDALExtendedDataTypeHS *)GDALExtendedDataTypeHS_CreateCompound((char const *)arg1,arg2,arg3,arg4);
   34932          22 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34933             :     }
   34934          22 :     if ( bLocalUseExceptions ) {
   34935           6 :       popErrorHandler();
   34936             :     }
   34937             : #ifndef SED_HACKS
   34938             :     if ( bLocalUseExceptions ) {
   34939             :       CPLErr eclass = CPLGetLastErrorType();
   34940             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34941             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34942             :       }
   34943             :     }
   34944             : #endif
   34945             :   }
   34946          22 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALExtendedDataTypeHS, SWIG_POINTER_OWN |  0 );
   34947          22 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   34948          22 :   {
   34949             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALEDTComponentHS **poObjects)*/
   34950          22 :     CPLFree( arg4 );
   34951             :   }
   34952          22 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   34953             :   return resultobj;
   34954           0 : fail:
   34955           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   34956           0 :   {
   34957             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALEDTComponentHS **poObjects)*/
   34958           0 :     CPLFree( arg4 );
   34959             :   }
   34960             :   return NULL;
   34961             : }
   34962             : 
   34963             : 
   34964           7 : SWIGINTERN PyObject *_wrap_ExtendedDataType_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34965           7 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34966           7 :   GDALExtendedDataTypeHS *arg1 = (GDALExtendedDataTypeHS *) 0 ;
   34967           7 :   void *argp1 = 0 ;
   34968           7 :   int res1 = 0 ;
   34969           7 :   PyObject *swig_obj[1] ;
   34970           7 :   char *result = 0 ;
   34971             :   
   34972           7 :   if (!args) SWIG_fail;
   34973           7 :   swig_obj[0] = args;
   34974           7 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   34975           7 :   if (!SWIG_IsOK(res1)) {
   34976           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExtendedDataType_GetName" "', argument " "1"" of type '" "GDALExtendedDataTypeHS *""'"); 
   34977             :   }
   34978           7 :   arg1 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp1);
   34979           7 :   {
   34980           7 :     const int bLocalUseExceptions = GetUseExceptions();
   34981           7 :     if ( bLocalUseExceptions ) {
   34982           1 :       pushErrorHandler();
   34983             :     }
   34984           7 :     {
   34985           7 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34986           7 :       result = (char *)GDALExtendedDataTypeHS_GetName(arg1);
   34987           7 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34988             :     }
   34989           7 :     if ( bLocalUseExceptions ) {
   34990           1 :       popErrorHandler();
   34991             :     }
   34992             : #ifndef SED_HACKS
   34993             :     if ( bLocalUseExceptions ) {
   34994             :       CPLErr eclass = CPLGetLastErrorType();
   34995             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34996             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34997             :       }
   34998             :     }
   34999             : #endif
   35000             :   }
   35001           7 :   resultobj = SWIG_FromCharPtr((const char *)result);
   35002           7 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   35003             :   return resultobj;
   35004             : fail:
   35005             :   return NULL;
   35006             : }
   35007             : 
   35008             : 
   35009        1304 : SWIGINTERN PyObject *_wrap_ExtendedDataType_GetClass(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   35010        1304 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   35011        1304 :   GDALExtendedDataTypeHS *arg1 = (GDALExtendedDataTypeHS *) 0 ;
   35012        1304 :   void *argp1 = 0 ;
   35013        1304 :   int res1 = 0 ;
   35014        1304 :   PyObject *swig_obj[1] ;
   35015        1304 :   GDALExtendedDataTypeClass result;
   35016             :   
   35017        1304 :   if (!args) SWIG_fail;
   35018        1304 :   swig_obj[0] = args;
   35019        1304 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   35020        1304 :   if (!SWIG_IsOK(res1)) {
   35021           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExtendedDataType_GetClass" "', argument " "1"" of type '" "GDALExtendedDataTypeHS *""'"); 
   35022             :   }
   35023        1304 :   arg1 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp1);
   35024        1304 :   {
   35025        1304 :     const int bLocalUseExceptions = GetUseExceptions();
   35026        1304 :     if ( bLocalUseExceptions ) {
   35027         316 :       pushErrorHandler();
   35028             :     }
   35029        1304 :     {
   35030        1304 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   35031        1304 :       result = (GDALExtendedDataTypeClass)GDALExtendedDataTypeHS_GetClass(arg1);
   35032        1304 :       SWIG_PYTHON_THREAD_END_ALLOW;
   35033             :     }
   35034        1304 :     if ( bLocalUseExceptions ) {
   35035         316 :       popErrorHandler();
   35036             :     }
   35037             : #ifndef SED_HACKS
   35038             :     if ( bLocalUseExceptions ) {
   35039             :       CPLErr eclass = CPLGetLastErrorType();
   35040             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   35041             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   35042             :       }
   35043             :     }
   35044             : #endif
   35045             :   }
   35046        1304 :   resultobj = SWIG_From_int(static_cast< int >(result));
   35047        1304 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   35048             :   return resultobj;
   35049             : fail:
   35050             :   return NULL;
   35051             : }
   35052             : 
   35053             : 
   35054         510 : SWIGINTERN PyObject *_wrap_ExtendedDataType_GetNumericDataType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   35055         510 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   35056         510 :   GDALExtendedDataTypeHS *arg1 = (GDALExtendedDataTypeHS *) 0 ;
   35057         510 :   void *argp1 = 0 ;
   35058         510 :   int res1 = 0 ;
   35059         510 :   PyObject *swig_obj[1] ;
   35060         510 :   GDALDataType result;
   35061             :   
   35062         510 :   if (!args) SWIG_fail;
   35063         510 :   swig_obj[0] = args;
   35064         510 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   35065         510 :   if (!SWIG_IsOK(res1)) {
   35066           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExtendedDataType_GetNumericDataType" "', argument " "1"" of type '" "GDALExtendedDataTypeHS *""'"); 
   35067             :   }
   35068         510 :   arg1 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp1);
   35069         510 :   {
   35070         510 :     const int bLocalUseExceptions = GetUseExceptions();
   35071         510 :     if ( bLocalUseExceptions ) {
   35072         130 :       pushErrorHandler();
   35073             :     }
   35074         510 :     {
   35075         510 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   35076         510 :       result = (GDALDataType)GDALExtendedDataTypeHS_GetNumericDataType(arg1);
   35077         510 :       SWIG_PYTHON_THREAD_END_ALLOW;
   35078             :     }
   35079         510 :     if ( bLocalUseExceptions ) {
   35080         130 :       popErrorHandler();
   35081             :     }
   35082             : #ifndef SED_HACKS
   35083             :     if ( bLocalUseExceptions ) {
   35084             :       CPLErr eclass = CPLGetLastErrorType();
   35085             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   35086             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   35087             :       }
   35088             :     }
   35089             : #endif
   35090             :   }
   35091         510 :   resultobj = SWIG_From_int(static_cast< int >(result));
   35092         510 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   35093             :   return resultobj;
   35094             : fail:
   35095             :   return NULL;
   35096             : }
   35097             : 
   35098             : 
   35099          51 : SWIGINTERN PyObject *_wrap_ExtendedDataType_GetSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   35100          51 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   35101          51 :   GDALExtendedDataTypeHS *arg1 = (GDALExtendedDataTypeHS *) 0 ;
   35102          51 :   void *argp1 = 0 ;
   35103          51 :   int res1 = 0 ;
   35104          51 :   PyObject *swig_obj[1] ;
   35105          51 :   size_t result;
   35106             :   
   35107          51 :   if (!args) SWIG_fail;
   35108          51 :   swig_obj[0] = args;
   35109          51 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   35110          51 :   if (!SWIG_IsOK(res1)) {
   35111           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExtendedDataType_GetSize" "', argument " "1"" of type '" "GDALExtendedDataTypeHS *""'"); 
   35112             :   }
   35113          51 :   arg1 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp1);
   35114          51 :   {
   35115          51 :     const int bLocalUseExceptions = GetUseExceptions();
   35116          51 :     if ( bLocalUseExceptions ) {
   35117          34 :       pushErrorHandler();
   35118             :     }
   35119          51 :     {
   35120          51 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   35121          51 :       result = GDALExtendedDataTypeHS_GetSize(arg1);
   35122          51 :       SWIG_PYTHON_THREAD_END_ALLOW;
   35123             :     }
   35124          51 :     if ( bLocalUseExceptions ) {
   35125          34 :       popErrorHandler();
   35126             :     }
   35127             : #ifndef SED_HACKS
   35128             :     if ( bLocalUseExceptions ) {
   35129             :       CPLErr eclass = CPLGetLastErrorType();
   35130             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   35131             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   35132             :       }
   35133             :     }
   35134             : #endif
   35135             :   }
   35136          51 :   resultobj = SWIG_From_size_t(static_cast< size_t >(result));
   35137          51 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   35138             :   return resultobj;
   35139             : fail:
   35140             :   return NULL;
   35141             : }
   35142             : 
   35143             : 
   35144           3 : SWIGINTERN PyObject *_wrap_ExtendedDataType_GetMaxStringLength(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   35145           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   35146           3 :   GDALExtendedDataTypeHS *arg1 = (GDALExtendedDataTypeHS *) 0 ;
   35147           3 :   void *argp1 = 0 ;
   35148           3 :   int res1 = 0 ;
   35149           3 :   PyObject *swig_obj[1] ;
   35150           3 :   size_t result;
   35151             :   
   35152           3 :   if (!args) SWIG_fail;
   35153           3 :   swig_obj[0] = args;
   35154           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   35155           3 :   if (!SWIG_IsOK(res1)) {
   35156           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExtendedDataType_GetMaxStringLength" "', argument " "1"" of type '" "GDALExtendedDataTypeHS *""'"); 
   35157             :   }
   35158           3 :   arg1 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp1);
   35159           3 :   {
   35160           3 :     const int bLocalUseExceptions = GetUseExceptions();
   35161           3 :     if ( bLocalUseExceptions ) {
   35162           0 :       pushErrorHandler();
   35163             :     }
   35164           3 :     {
   35165           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   35166           3 :       result = GDALExtendedDataTypeHS_GetMaxStringLength(arg1);
   35167           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   35168             :     }
   35169           3 :     if ( bLocalUseExceptions ) {
   35170           0 :       popErrorHandler();
   35171             :     }
   35172             : #ifndef SED_HACKS
   35173             :     if ( bLocalUseExceptions ) {
   35174             :       CPLErr eclass = CPLGetLastErrorType();
   35175             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   35176             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   35177             :       }
   35178             :     }
   35179             : #endif
   35180             :   }
   35181           3 :   resultobj = SWIG_From_size_t(static_cast< size_t >(result));
   35182           3 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   35183             :   return resultobj;
   35184             : fail:
   35185             :   return NULL;
   35186             : }
   35187             : 
   35188             : 
   35189         104 : SWIGINTERN PyObject *_wrap_ExtendedDataType_GetSubType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   35190         104 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   35191         104 :   GDALExtendedDataTypeHS *arg1 = (GDALExtendedDataTypeHS *) 0 ;
   35192         104 :   void *argp1 = 0 ;
   35193         104 :   int res1 = 0 ;
   35194         104 :   PyObject *swig_obj[1] ;
   35195         104 :   GDALExtendedDataTypeSubType result;
   35196             :   
   35197         104 :   if (!args) SWIG_fail;
   35198         104 :   swig_obj[0] = args;
   35199         104 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   35200         104 :   if (!SWIG_IsOK(res1)) {
   35201           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExtendedDataType_GetSubType" "', argument " "1"" of type '" "GDALExtendedDataTypeHS *""'"); 
   35202             :   }
   35203         104 :   arg1 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp1);
   35204         104 :   {
   35205         104 :     const int bLocalUseExceptions = GetUseExceptions();
   35206         104 :     if ( bLocalUseExceptions ) {
   35207          29 :       pushErrorHandler();
   35208             :     }
   35209         104 :     {
   35210         104 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   35211         104 :       result = (GDALExtendedDataTypeSubType)GDALExtendedDataTypeHS_GetSubType(arg1);
   35212         104 :       SWIG_PYTHON_THREAD_END_ALLOW;
   35213             :     }
   35214         104 :     if ( bLocalUseExceptions ) {
   35215          29 :       popErrorHandler();
   35216             :     }
   35217             : #ifndef SED_HACKS
   35218             :     if ( bLocalUseExceptions ) {
   35219             :       CPLErr eclass = CPLGetLastErrorType();
   35220             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   35221             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   35222             :       }
   35223             :     }
   35224             : #endif
   35225             :   }
   35226         104 :   resultobj = SWIG_From_int(static_cast< int >(result));
   35227         104 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   35228             :   return resultobj;
   35229             : fail:
   35230             :   return NULL;
   35231             : }
   35232             : 
   35233             : 
   35234          21 : SWIGINTERN PyObject *_wrap_ExtendedDataType_GetComponents(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   35235          21 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   35236          21 :   GDALExtendedDataTypeHS *arg1 = (GDALExtendedDataTypeHS *) 0 ;
   35237          21 :   GDALEDTComponentHS ***arg2 = (GDALEDTComponentHS ***) 0 ;
   35238          21 :   size_t *arg3 = (size_t *) 0 ;
   35239          21 :   void *argp1 = 0 ;
   35240          21 :   int res1 = 0 ;
   35241          21 :   GDALEDTComponentHS **comps2 = 0 ;
   35242          21 :   size_t nCount2 = 0 ;
   35243          21 :   PyObject *swig_obj[1] ;
   35244             :   
   35245          21 :   {
   35246             :     /* %typemap(in,numinputs=0) (GDALEDTComponentHS*** pcomps, size_t* pnCount) */
   35247          21 :     arg2 = &comps2;
   35248          21 :     arg3 = &nCount2;
   35249             :   }
   35250          21 :   if (!args) SWIG_fail;
   35251          21 :   swig_obj[0] = args;
   35252          21 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   35253          21 :   if (!SWIG_IsOK(res1)) {
   35254           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExtendedDataType_GetComponents" "', argument " "1"" of type '" "GDALExtendedDataTypeHS *""'"); 
   35255             :   }
   35256          21 :   arg1 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp1);
   35257          21 :   {
   35258          21 :     const int bLocalUseExceptions = GetUseExceptions();
   35259          21 :     if ( bLocalUseExceptions ) {
   35260           6 :       pushErrorHandler();
   35261             :     }
   35262          21 :     {
   35263          21 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   35264          21 :       GDALExtendedDataTypeHS_GetComponents(arg1,arg2,arg3);
   35265          21 :       SWIG_PYTHON_THREAD_END_ALLOW;
   35266             :     }
   35267          21 :     if ( bLocalUseExceptions ) {
   35268           6 :       popErrorHandler();
   35269             :     }
   35270             : #ifndef SED_HACKS
   35271             :     if ( bLocalUseExceptions ) {
   35272             :       CPLErr eclass = CPLGetLastErrorType();
   35273             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   35274             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   35275             :       }
   35276             :     }
   35277             : #endif
   35278             :   }
   35279          21 :   resultobj = SWIG_Py_Void();
   35280          21 :   {
   35281             :     /* %typemap(argout) (GDALEDTComponentHS*** pcomps, size_t* pnCount) */
   35282          21 :     Py_DECREF(resultobj);
   35283          21 :     resultobj = PyList_New( *arg3 );
   35284          21 :     if( !resultobj ) {
   35285           0 :       SWIG_fail;
   35286             :     }
   35287          62 :     for( size_t i = 0; i < *arg3; i++ ) {
   35288          41 :       PyList_SetItem(resultobj, i,
   35289          41 :         SWIG_NewPointerObj((void*)(*arg2)[i],SWIGTYPE_p_GDALEDTComponentHS,SWIG_POINTER_OWN) );
   35290             :       /* We have borrowed the GDALEDTComponentHS */
   35291          41 :       (*arg2)[i] = NULL;
   35292             :     }
   35293             :   }
   35294          21 :   {
   35295             :     /* %typemap(freearg) (GDALEDTComponentHS*** pcomps, size_t* pnCount) */
   35296          21 :     GDALExtendedDataTypeFreeComponents(*arg2, *arg3);
   35297             :   }
   35298          21 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   35299             :   return resultobj;
   35300           0 : fail:
   35301           0 :   {
   35302             :     /* %typemap(freearg) (GDALEDTComponentHS*** pcomps, size_t* pnCount) */
   35303           0 :     GDALExtendedDataTypeFreeComponents(*arg2, *arg3);
   35304             :   }
   35305             :   return NULL;
   35306             : }
   35307             : 
   35308             : 
   35309           8 : SWIGINTERN PyObject *_wrap_ExtendedDataType_CanConvertTo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   35310           8 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   35311           8 :   GDALExtendedDataTypeHS *arg1 = (GDALExtendedDataTypeHS *) 0 ;
   35312           8 :   GDALExtendedDataTypeHS *arg2 = (GDALExtendedDataTypeHS *) 0 ;
   35313           8 :   void *argp1 = 0 ;
   35314           8 :   int res1 = 0 ;
   35315           8 :   void *argp2 = 0 ;
   35316           8 :   int res2 = 0 ;
   35317           8 :   PyObject *swig_obj[2] ;
   35318           8 :   bool result;
   35319             :   
   35320           8 :   if (!SWIG_Python_UnpackTuple(args, "ExtendedDataType_CanConvertTo", 2, 2, swig_obj)) SWIG_fail;
   35321           8 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   35322           8 :   if (!SWIG_IsOK(res1)) {
   35323           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExtendedDataType_CanConvertTo" "', argument " "1"" of type '" "GDALExtendedDataTypeHS *""'"); 
   35324             :   }
   35325           8 :   arg1 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp1);
   35326           8 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   35327           8 :   if (!SWIG_IsOK(res2)) {
   35328           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ExtendedDataType_CanConvertTo" "', argument " "2"" of type '" "GDALExtendedDataTypeHS *""'"); 
   35329             :   }
   35330           8 :   arg2 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp2);
   35331           8 :   {
   35332           8 :     if (!arg2) {
   35333           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   35334             :     }
   35335             :   }
   35336           7 :   {
   35337           7 :     const int bLocalUseExceptions = GetUseExceptions();
   35338           7 :     if ( bLocalUseExceptions ) {
   35339           0 :       pushErrorHandler();
   35340             :     }
   35341           7 :     {
   35342           7 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   35343           7 :       result = (bool)GDALExtendedDataTypeHS_CanConvertTo(arg1,arg2);
   35344           7 :       SWIG_PYTHON_THREAD_END_ALLOW;
   35345             :     }
   35346           7 :     if ( bLocalUseExceptions ) {
   35347           0 :       popErrorHandler();
   35348             :     }
   35349             : #ifndef SED_HACKS
   35350             :     if ( bLocalUseExceptions ) {
   35351             :       CPLErr eclass = CPLGetLastErrorType();
   35352             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   35353             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   35354             :       }
   35355             :     }
   35356             : #endif
   35357             :   }
   35358           7 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   35359           8 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   35360             :   return resultobj;
   35361             : fail:
   35362             :   return NULL;
   35363             : }
   35364             : 
   35365             : 
   35366          99 : SWIGINTERN PyObject *_wrap_ExtendedDataType_Equals(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   35367          99 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   35368          99 :   GDALExtendedDataTypeHS *arg1 = (GDALExtendedDataTypeHS *) 0 ;
   35369          99 :   GDALExtendedDataTypeHS *arg2 = (GDALExtendedDataTypeHS *) 0 ;
   35370          99 :   void *argp1 = 0 ;
   35371          99 :   int res1 = 0 ;
   35372          99 :   void *argp2 = 0 ;
   35373          99 :   int res2 = 0 ;
   35374          99 :   PyObject *swig_obj[2] ;
   35375          99 :   bool result;
   35376             :   
   35377          99 :   if (!SWIG_Python_UnpackTuple(args, "ExtendedDataType_Equals", 2, 2, swig_obj)) SWIG_fail;
   35378          99 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   35379          99 :   if (!SWIG_IsOK(res1)) {
   35380           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExtendedDataType_Equals" "', argument " "1"" of type '" "GDALExtendedDataTypeHS *""'"); 
   35381             :   }
   35382          99 :   arg1 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp1);
   35383          99 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   35384          99 :   if (!SWIG_IsOK(res2)) {
   35385           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ExtendedDataType_Equals" "', argument " "2"" of type '" "GDALExtendedDataTypeHS *""'"); 
   35386             :   }
   35387          99 :   arg2 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp2);
   35388          99 :   {
   35389          99 :     if (!arg2) {
   35390           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   35391             :     }
   35392             :   }
   35393          98 :   {
   35394          98 :     const int bLocalUseExceptions = GetUseExceptions();
   35395          98 :     if ( bLocalUseExceptions ) {
   35396          38 :       pushErrorHandler();
   35397             :     }
   35398          98 :     {
   35399          98 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   35400          98 :       result = (bool)GDALExtendedDataTypeHS_Equals(arg1,arg2);
   35401          98 :       SWIG_PYTHON_THREAD_END_ALLOW;
   35402             :     }
   35403          98 :     if ( bLocalUseExceptions ) {
   35404          38 :       popErrorHandler();
   35405             :     }
   35406             : #ifndef SED_HACKS
   35407             :     if ( bLocalUseExceptions ) {
   35408             :       CPLErr eclass = CPLGetLastErrorType();
   35409             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   35410             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   35411             :       }
   35412             :     }
   35413             : #endif
   35414             :   }
   35415          98 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   35416          99 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   35417             :   return resultobj;
   35418             : fail:
   35419             :   return NULL;
   35420             : }
   35421             : 
   35422             : 
   35423         271 : SWIGINTERN PyObject *ExtendedDataType_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   35424         271 :   PyObject *obj;
   35425         271 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   35426         271 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALExtendedDataTypeHS, SWIG_NewClientData(obj));
   35427         271 :   return SWIG_Py_Void();
   35428             : }
   35429             : 
   35430          61 : SWIGINTERN PyObject *_wrap_delete_EDTComponent(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   35431          61 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   35432          61 :   GDALEDTComponentHS *arg1 = (GDALEDTComponentHS *) 0 ;
   35433          61 :   void *argp1 = 0 ;
   35434          61 :   int res1 = 0 ;
   35435          61 :   PyObject *swig_obj[1] ;
   35436             :   
   35437          61 :   if (!args) SWIG_fail;
   35438          61 :   swig_obj[0] = args;
   35439          61 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALEDTComponentHS, SWIG_POINTER_DISOWN |  0 );
   35440          61 :   if (!SWIG_IsOK(res1)) {
   35441           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_EDTComponent" "', argument " "1"" of type '" "GDALEDTComponentHS *""'"); 
   35442             :   }
   35443          61 :   arg1 = reinterpret_cast< GDALEDTComponentHS * >(argp1);
   35444          61 :   {
   35445          61 :     const int bLocalUseExceptions = GetUseExceptions();
   35446          61 :     if ( bLocalUseExceptions ) {
   35447          23 :       pushErrorHandler();
   35448             :     }
   35449          61 :     {
   35450          61 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   35451          61 :       delete_GDALEDTComponentHS(arg1);
   35452          61 :       SWIG_PYTHON_THREAD_END_ALLOW;
   35453             :     }
   35454          61 :     if ( bLocalUseExceptions ) {
   35455          23 :       popErrorHandler();
   35456             :     }
   35457             : #ifndef SED_HACKS
   35458             :     if ( bLocalUseExceptions ) {
   35459             :       CPLErr eclass = CPLGetLastErrorType();
   35460             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   35461             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   35462             :       }
   35463             :     }
   35464             : #endif
   35465             :   }
   35466          61 :   resultobj = SWIG_Py_Void();
   35467          61 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   35468             :   return resultobj;
   35469             : fail:
   35470             :   return NULL;
   35471             : }
   35472             : 
   35473             : 
   35474          20 : SWIGINTERN PyObject *_wrap_EDTComponent_Create(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   35475          20 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   35476          20 :   char *arg1 = (char *) 0 ;
   35477          20 :   size_t arg2 ;
   35478          20 :   GDALExtendedDataTypeHS *arg3 = (GDALExtendedDataTypeHS *) 0 ;
   35479          20 :   int res1 ;
   35480          20 :   char *buf1 = 0 ;
   35481          20 :   int alloc1 = 0 ;
   35482          20 :   size_t val2 ;
   35483          20 :   int ecode2 = 0 ;
   35484          20 :   void *argp3 = 0 ;
   35485          20 :   int res3 = 0 ;
   35486          20 :   PyObject *swig_obj[3] ;
   35487          20 :   GDALEDTComponentHS *result = 0 ;
   35488             :   
   35489          20 :   if (!SWIG_Python_UnpackTuple(args, "EDTComponent_Create", 3, 3, swig_obj)) SWIG_fail;
   35490          20 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   35491          20 :   if (!SWIG_IsOK(res1)) {
   35492           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EDTComponent_Create" "', argument " "1"" of type '" "char const *""'");
   35493             :   }
   35494          20 :   arg1 = reinterpret_cast< char * >(buf1);
   35495          20 :   ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2);
   35496          20 :   if (!SWIG_IsOK(ecode2)) {
   35497           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "EDTComponent_Create" "', argument " "2"" of type '" "size_t""'");
   35498             :   } 
   35499          20 :   arg2 = static_cast< size_t >(val2);
   35500          20 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   35501          20 :   if (!SWIG_IsOK(res3)) {
   35502           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "EDTComponent_Create" "', argument " "3"" of type '" "GDALExtendedDataTypeHS *""'"); 
   35503             :   }
   35504          20 :   arg3 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp3);
   35505          20 :   {
   35506          20 :     if (!arg1) {
   35507           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   35508             :     }
   35509             :   }
   35510          20 :   {
   35511          20 :     if (!arg3) {
   35512           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   35513             :     }
   35514             :   }
   35515          20 :   {
   35516          20 :     const int bLocalUseExceptions = GetUseExceptions();
   35517          20 :     if ( bLocalUseExceptions ) {
   35518          10 :       pushErrorHandler();
   35519             :     }
   35520          20 :     {
   35521          20 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   35522          20 :       result = (GDALEDTComponentHS *)GDALEDTComponentHS_Create((char const *)arg1,arg2,arg3);
   35523          20 :       SWIG_PYTHON_THREAD_END_ALLOW;
   35524             :     }
   35525          20 :     if ( bLocalUseExceptions ) {
   35526          10 :       popErrorHandler();
   35527             :     }
   35528             : #ifndef SED_HACKS
   35529             :     if ( bLocalUseExceptions ) {
   35530             :       CPLErr eclass = CPLGetLastErrorType();
   35531             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   35532             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   35533             :       }
   35534             :     }
   35535             : #endif
   35536             :   }
   35537          20 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALEDTComponentHS, SWIG_POINTER_OWN |  0 );
   35538          20 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   35539          20 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   35540             :   return resultobj;
   35541           0 : fail:
   35542           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   35543             :   return NULL;
   35544             : }
   35545             : 
   35546             : 
   35547          33 : SWIGINTERN PyObject *_wrap_EDTComponent_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   35548          33 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   35549          33 :   GDALEDTComponentHS *arg1 = (GDALEDTComponentHS *) 0 ;
   35550          33 :   void *argp1 = 0 ;
   35551          33 :   int res1 = 0 ;
   35552          33 :   PyObject *swig_obj[1] ;
   35553          33 :   char *result = 0 ;
   35554             :   
   35555          33 :   if (!args) SWIG_fail;
   35556          33 :   swig_obj[0] = args;
   35557          33 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALEDTComponentHS, 0 |  0 );
   35558          33 :   if (!SWIG_IsOK(res1)) {
   35559           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EDTComponent_GetName" "', argument " "1"" of type '" "GDALEDTComponentHS *""'"); 
   35560             :   }
   35561          33 :   arg1 = reinterpret_cast< GDALEDTComponentHS * >(argp1);
   35562          33 :   {
   35563          33 :     const int bLocalUseExceptions = GetUseExceptions();
   35564          33 :     if ( bLocalUseExceptions ) {
   35565          13 :       pushErrorHandler();
   35566             :     }
   35567          33 :     {
   35568          33 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   35569          33 :       result = (char *)GDALEDTComponentHS_GetName(arg1);
   35570          33 :       SWIG_PYTHON_THREAD_END_ALLOW;
   35571             :     }
   35572          33 :     if ( bLocalUseExceptions ) {
   35573          13 :       popErrorHandler();
   35574             :     }
   35575             : #ifndef SED_HACKS
   35576             :     if ( bLocalUseExceptions ) {
   35577             :       CPLErr eclass = CPLGetLastErrorType();
   35578             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   35579             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   35580             :       }
   35581             :     }
   35582             : #endif
   35583             :   }
   35584          33 :   resultobj = SWIG_FromCharPtr((const char *)result);
   35585          33 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   35586             :   return resultobj;
   35587             : fail:
   35588             :   return NULL;
   35589             : }
   35590             : 
   35591             : 
   35592          31 : SWIGINTERN PyObject *_wrap_EDTComponent_GetOffset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   35593          31 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   35594          31 :   GDALEDTComponentHS *arg1 = (GDALEDTComponentHS *) 0 ;
   35595          31 :   void *argp1 = 0 ;
   35596          31 :   int res1 = 0 ;
   35597          31 :   PyObject *swig_obj[1] ;
   35598          31 :   size_t result;
   35599             :   
   35600          31 :   if (!args) SWIG_fail;
   35601          31 :   swig_obj[0] = args;
   35602          31 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALEDTComponentHS, 0 |  0 );
   35603          31 :   if (!SWIG_IsOK(res1)) {
   35604           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EDTComponent_GetOffset" "', argument " "1"" of type '" "GDALEDTComponentHS *""'"); 
   35605             :   }
   35606          31 :   arg1 = reinterpret_cast< GDALEDTComponentHS * >(argp1);
   35607          31 :   {
   35608          31 :     const int bLocalUseExceptions = GetUseExceptions();
   35609          31 :     if ( bLocalUseExceptions ) {
   35610          13 :       pushErrorHandler();
   35611             :     }
   35612          31 :     {
   35613          31 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   35614          31 :       result = GDALEDTComponentHS_GetOffset(arg1);
   35615          31 :       SWIG_PYTHON_THREAD_END_ALLOW;
   35616             :     }
   35617          31 :     if ( bLocalUseExceptions ) {
   35618          13 :       popErrorHandler();
   35619             :     }
   35620             : #ifndef SED_HACKS
   35621             :     if ( bLocalUseExceptions ) {
   35622             :       CPLErr eclass = CPLGetLastErrorType();
   35623             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   35624             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   35625             :       }
   35626             :     }
   35627             : #endif
   35628             :   }
   35629          31 :   resultobj = SWIG_From_size_t(static_cast< size_t >(result));
   35630          31 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   35631             :   return resultobj;
   35632             : fail:
   35633             :   return NULL;
   35634             : }
   35635             : 
   35636             : 
   35637          49 : SWIGINTERN PyObject *_wrap_EDTComponent_GetType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   35638          49 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   35639          49 :   GDALEDTComponentHS *arg1 = (GDALEDTComponentHS *) 0 ;
   35640          49 :   void *argp1 = 0 ;
   35641          49 :   int res1 = 0 ;
   35642          49 :   PyObject *swig_obj[1] ;
   35643          49 :   GDALExtendedDataTypeHS *result = 0 ;
   35644             :   
   35645          49 :   if (!args) SWIG_fail;
   35646          49 :   swig_obj[0] = args;
   35647          49 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALEDTComponentHS, 0 |  0 );
   35648          49 :   if (!SWIG_IsOK(res1)) {
   35649           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EDTComponent_GetType" "', argument " "1"" of type '" "GDALEDTComponentHS *""'"); 
   35650             :   }
   35651          49 :   arg1 = reinterpret_cast< GDALEDTComponentHS * >(argp1);
   35652          49 :   {
   35653          49 :     const int bLocalUseExceptions = GetUseExceptions();
   35654          49 :     if ( bLocalUseExceptions ) {
   35655          21 :       pushErrorHandler();
   35656             :     }
   35657          49 :     {
   35658          49 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   35659          49 :       result = (GDALExtendedDataTypeHS *)GDALEDTComponentHS_GetType(arg1);
   35660          49 :       SWIG_PYTHON_THREAD_END_ALLOW;
   35661             :     }
   35662          49 :     if ( bLocalUseExceptions ) {
   35663          21 :       popErrorHandler();
   35664             :     }
   35665             : #ifndef SED_HACKS
   35666             :     if ( bLocalUseExceptions ) {
   35667             :       CPLErr eclass = CPLGetLastErrorType();
   35668             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   35669             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   35670             :       }
   35671             :     }
   35672             : #endif
   35673             :   }
   35674          49 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALExtendedDataTypeHS, SWIG_POINTER_OWN |  0 );
   35675          49 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   35676             :   return resultobj;
   35677             : fail:
   35678             :   return NULL;
   35679             : }
   35680             : 
   35681             : 
   35682         271 : SWIGINTERN PyObject *EDTComponent_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   35683         271 :   PyObject *obj;
   35684         271 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   35685         271 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALEDTComponentHS, SWIG_NewClientData(obj));
   35686         271 :   return SWIG_Py_Void();
   35687             : }
   35688             : 
   35689          13 : SWIGINTERN PyObject *_wrap_CreateRasterAttributeTableFromMDArrays(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   35690          13 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   35691          13 :   GDALRATTableType arg1 ;
   35692          13 :   int arg2 ;
   35693          13 :   GDALMDArrayHS **arg3 = (GDALMDArrayHS **) 0 ;
   35694          13 :   int arg4 = (int) 0 ;
   35695          13 :   GDALRATFieldUsage *arg5 = (GDALRATFieldUsage *) NULL ;
   35696          13 :   int val1 ;
   35697          13 :   int ecode1 = 0 ;
   35698          13 :   PyObject *swig_obj[3] ;
   35699          13 :   GDALRasterAttributeTableShadow *result = 0 ;
   35700             :   
   35701          13 :   if (!SWIG_Python_UnpackTuple(args, "CreateRasterAttributeTableFromMDArrays", 2, 3, swig_obj)) SWIG_fail;
   35702          13 :   ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
   35703          13 :   if (!SWIG_IsOK(ecode1)) {
   35704           0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "CreateRasterAttributeTableFromMDArrays" "', argument " "1"" of type '" "GDALRATTableType""'");
   35705             :   } 
   35706          13 :   arg1 = static_cast< GDALRATTableType >(val1);
   35707          13 :   {
   35708             :     /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALMDArrayHS *optional_##GDALMDArrayHS)*/
   35709          13 :     if ( !PySequence_Check(swig_obj[1]) ) {
   35710           1 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   35711           1 :       SWIG_fail;
   35712             :     }
   35713          12 :     Py_ssize_t size = PySequence_Size(swig_obj[1]);
   35714          12 :     if( size > (Py_ssize_t)INT_MAX ) {
   35715           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   35716           0 :       SWIG_fail;
   35717             :     }
   35718          12 :     if( (size_t)size > SIZE_MAX / sizeof(GDALMDArrayHS*) ) {
   35719           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   35720           0 :       SWIG_fail;
   35721             :     }
   35722          12 :     arg2 = (int)size;
   35723          12 :     arg3 = (GDALMDArrayHS**) VSIMalloc(arg2*sizeof(GDALMDArrayHS*));
   35724          12 :     if( !arg3) {
   35725           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   35726           0 :       SWIG_fail;
   35727             :     }
   35728             :     
   35729          26 :     for( int i = 0; i<arg2; i++ ) {
   35730          16 :       PyObject *o = PySequence_GetItem(swig_obj[1],i);
   35731          16 :       GDALMDArrayHS* rawobjectpointer = NULL;
   35732          16 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_EXCEPTION | 0 ));
   35733          16 :       if (!rawobjectpointer) {
   35734           2 :         Py_DECREF(o);
   35735           2 :         PyErr_SetString(PyExc_TypeError, "object of wrong GDALMDArrayHS");
   35736           2 :         SWIG_fail;
   35737             :       }
   35738          14 :       arg3[i] = rawobjectpointer;
   35739          14 :       Py_DECREF(o);
   35740             :       
   35741             :     }
   35742             :   }
   35743          10 :   if (swig_obj[2]) {
   35744           6 :     {
   35745             :       /*  %typemap(in) (int nUsages, GDALRATFieldUsage *paeUsages)*/
   35746           6 :       if ( !PySequence_Check(swig_obj[2]) ) {
   35747           1 :         PyErr_SetString(PyExc_TypeError, "not a sequence");
   35748           1 :         SWIG_fail;
   35749             :       }
   35750           5 :       Py_ssize_t size = PySequence_Size(swig_obj[2]);
   35751           5 :       if( size > (Py_ssize_t)INT_MAX ) {
   35752           0 :         PyErr_SetString(PyExc_TypeError, "too big sequence");
   35753           0 :         SWIG_fail;
   35754             :       }
   35755           5 :       if( (size_t)size > SIZE_MAX / sizeof(int) ) {
   35756           0 :         PyErr_SetString(PyExc_TypeError, "too big sequence");
   35757           0 :         SWIG_fail;
   35758             :       }
   35759           5 :       arg4 = (int)size;
   35760           5 :       arg5 = (GDALRATFieldUsage*) VSIMalloc(arg4*sizeof(GDALRATFieldUsage));
   35761           5 :       if( !arg5) {
   35762           0 :         PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   35763           0 :         SWIG_fail;
   35764             :       }
   35765             :       
   35766          10 :       for( int i = 0; i<arg4; i++ ) {
   35767           8 :         PyObject *o = PySequence_GetItem(swig_obj[2],i);
   35768           8 :         int nVal = 0;
   35769           8 :         if ( !PyArg_Parse(o,"i",&nVal) ) {
   35770           1 :           PyErr_SetString(PyExc_TypeError, "not a valid GDALRATFieldUsage");
   35771           1 :           Py_DECREF(o);
   35772           3 :           SWIG_fail;
   35773             :         }
   35774           7 :         Py_DECREF(o);
   35775           7 :         if( nVal < 0 || nVal >= GFU_MaxCount )
   35776             :         {
   35777           2 :           PyErr_SetString(PyExc_TypeError, "not a valid GDALRATFieldUsage");
   35778           2 :           SWIG_fail;
   35779             :         }
   35780           5 :         (arg5)[i] = static_cast<GDALRATFieldUsage>(nVal);
   35781             :       }
   35782             :     }
   35783             :   }
   35784           6 :   {
   35785           6 :     const int bLocalUseExceptions = GetUseExceptions();
   35786           6 :     if ( bLocalUseExceptions ) {
   35787           6 :       pushErrorHandler();
   35788             :     }
   35789           6 :     {
   35790           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   35791           6 :       result = (GDALRasterAttributeTableShadow *)CreateRasterAttributeTableFromMDArrays(arg1,arg2,arg3,arg4,arg5);
   35792           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   35793             :     }
   35794           6 :     if ( bLocalUseExceptions ) {
   35795           6 :       popErrorHandler();
   35796             :     }
   35797             : #ifndef SED_HACKS
   35798             :     if ( bLocalUseExceptions ) {
   35799             :       CPLErr eclass = CPLGetLastErrorType();
   35800             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   35801             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   35802             :       }
   35803             :     }
   35804             : #endif
   35805             :   }
   35806           6 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterAttributeTableShadow, SWIG_POINTER_OWN |  0 );
   35807           6 :   {
   35808             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALMDArrayHS **poObjects)*/
   35809           6 :     CPLFree( arg3 );
   35810             :   }
   35811           6 :   {
   35812             :     /* %typemap(freearg) (int nUsages, GDALRATFieldUsage *paeUsages)*/
   35813           6 :     CPLFree( arg5 );
   35814             :   }
   35815          17 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   35816             :   return resultobj;
   35817           7 : fail:
   35818           7 :   {
   35819             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALMDArrayHS **poObjects)*/
   35820           7 :     CPLFree( arg3 );
   35821             :   }
   35822           7 :   {
   35823             :     /* %typemap(freearg) (int nUsages, GDALRATFieldUsage *paeUsages)*/
   35824           7 :     CPLFree( arg5 );
   35825             :   }
   35826             :   return NULL;
   35827             : }
   35828             : 
   35829             : 
   35830       14118 : SWIGINTERN PyObject *_wrap_Band_XSize_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   35831       14118 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   35832       14118 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   35833       14118 :   void *argp1 = 0 ;
   35834       14118 :   int res1 = 0 ;
   35835       14118 :   PyObject *swig_obj[1] ;
   35836       14118 :   int result;
   35837             :   
   35838       14118 :   if (!args) SWIG_fail;
   35839       14118 :   swig_obj[0] = args;
   35840       14118 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   35841       14118 :   if (!SWIG_IsOK(res1)) {
   35842           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_XSize_get" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   35843             :   }
   35844       14118 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   35845       14118 :   {
   35846       14118 :     const int bLocalUseExceptions = GetUseExceptions();
   35847       14118 :     if ( bLocalUseExceptions ) {
   35848       12792 :       pushErrorHandler();
   35849             :     }
   35850       14118 :     {
   35851       14118 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   35852       14118 :       result = (int)GDALRasterBandShadow_XSize_get(arg1);
   35853       14118 :       SWIG_PYTHON_THREAD_END_ALLOW;
   35854             :     }
   35855       14118 :     if ( bLocalUseExceptions ) {
   35856       12792 :       popErrorHandler();
   35857             :     }
   35858             : #ifndef SED_HACKS
   35859             :     if ( bLocalUseExceptions ) {
   35860             :       CPLErr eclass = CPLGetLastErrorType();
   35861             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   35862             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   35863             :       }
   35864             :     }
   35865             : #endif
   35866             :   }
   35867       14118 :   resultobj = SWIG_From_int(static_cast< int >(result));
   35868       14118 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   35869             :   return resultobj;
   35870             : fail:
   35871             :   return NULL;
   35872             : }
   35873             : 
   35874             : 
   35875       13497 : SWIGINTERN PyObject *_wrap_Band_YSize_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   35876       13497 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   35877       13497 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   35878       13497 :   void *argp1 = 0 ;
   35879       13497 :   int res1 = 0 ;
   35880       13497 :   PyObject *swig_obj[1] ;
   35881       13497 :   int result;
   35882             :   
   35883       13497 :   if (!args) SWIG_fail;
   35884       13497 :   swig_obj[0] = args;
   35885       13497 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   35886       13497 :   if (!SWIG_IsOK(res1)) {
   35887           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_YSize_get" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   35888             :   }
   35889       13497 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   35890       13497 :   {
   35891       13497 :     const int bLocalUseExceptions = GetUseExceptions();
   35892       13497 :     if ( bLocalUseExceptions ) {
   35893       12227 :       pushErrorHandler();
   35894             :     }
   35895       13497 :     {
   35896       13497 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   35897       13497 :       result = (int)GDALRasterBandShadow_YSize_get(arg1);
   35898       13497 :       SWIG_PYTHON_THREAD_END_ALLOW;
   35899             :     }
   35900       13497 :     if ( bLocalUseExceptions ) {
   35901       12227 :       popErrorHandler();
   35902             :     }
   35903             : #ifndef SED_HACKS
   35904             :     if ( bLocalUseExceptions ) {
   35905             :       CPLErr eclass = CPLGetLastErrorType();
   35906             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   35907             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   35908             :       }
   35909             :     }
   35910             : #endif
   35911             :   }
   35912       13497 :   resultobj = SWIG_From_int(static_cast< int >(result));
   35913       13497 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   35914             :   return resultobj;
   35915             : fail:
   35916             :   return NULL;
   35917             : }
   35918             : 
   35919             : 
   35920      846402 : SWIGINTERN PyObject *_wrap_Band_DataType_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   35921      846402 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   35922      846402 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   35923      846402 :   void *argp1 = 0 ;
   35924      846402 :   int res1 = 0 ;
   35925      846402 :   PyObject *swig_obj[1] ;
   35926      846402 :   GDALDataType result;
   35927             :   
   35928      846402 :   if (!args) SWIG_fail;
   35929      846402 :   swig_obj[0] = args;
   35930      846402 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   35931      846402 :   if (!SWIG_IsOK(res1)) {
   35932           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_DataType_get" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   35933             :   }
   35934      846402 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   35935      846402 :   {
   35936      846402 :     const int bLocalUseExceptions = GetUseExceptions();
   35937      846402 :     if ( bLocalUseExceptions ) {
   35938      835608 :       pushErrorHandler();
   35939             :     }
   35940      846402 :     {
   35941      846402 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   35942      846402 :       result = (GDALDataType)GDALRasterBandShadow_DataType_get(arg1);
   35943      846402 :       SWIG_PYTHON_THREAD_END_ALLOW;
   35944             :     }
   35945      846402 :     if ( bLocalUseExceptions ) {
   35946      835608 :       popErrorHandler();
   35947             :     }
   35948             : #ifndef SED_HACKS
   35949             :     if ( bLocalUseExceptions ) {
   35950             :       CPLErr eclass = CPLGetLastErrorType();
   35951             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   35952             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   35953             :       }
   35954             :     }
   35955             : #endif
   35956             :   }
   35957      846402 :   resultobj = SWIG_From_int(static_cast< int >(result));
   35958      846402 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   35959             :   return resultobj;
   35960             : fail:
   35961             :   return NULL;
   35962             : }
   35963             : 
   35964             : 
   35965          59 : SWIGINTERN PyObject *_wrap_Band_GetDataset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   35966          59 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   35967          59 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   35968          59 :   void *argp1 = 0 ;
   35969          59 :   int res1 = 0 ;
   35970          59 :   PyObject *swig_obj[1] ;
   35971          59 :   GDALDatasetShadow *result = 0 ;
   35972             :   
   35973          59 :   if (!args) SWIG_fail;
   35974          59 :   swig_obj[0] = args;
   35975          59 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   35976          59 :   if (!SWIG_IsOK(res1)) {
   35977           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetDataset" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   35978             :   }
   35979          59 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   35980          59 :   {
   35981          59 :     const int bLocalUseExceptions = GetUseExceptions();
   35982          59 :     if ( bLocalUseExceptions ) {
   35983           0 :       pushErrorHandler();
   35984             :     }
   35985          59 :     {
   35986          59 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   35987          59 :       result = (GDALDatasetShadow *)GDALRasterBandShadow_GetDataset(arg1);
   35988          59 :       SWIG_PYTHON_THREAD_END_ALLOW;
   35989             :     }
   35990          59 :     if ( bLocalUseExceptions ) {
   35991           0 :       popErrorHandler();
   35992             :     }
   35993             : #ifndef SED_HACKS
   35994             :     if ( bLocalUseExceptions ) {
   35995             :       CPLErr eclass = CPLGetLastErrorType();
   35996             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   35997             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   35998             :       }
   35999             :     }
   36000             : #endif
   36001             :   }
   36002          59 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   36003          59 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   36004             :   return resultobj;
   36005             : fail:
   36006             :   return NULL;
   36007             : }
   36008             : 
   36009             : 
   36010           8 : SWIGINTERN PyObject *_wrap_Band_GetBand(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36011           8 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36012           8 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   36013           8 :   void *argp1 = 0 ;
   36014           8 :   int res1 = 0 ;
   36015           8 :   PyObject *swig_obj[1] ;
   36016           8 :   int result;
   36017             :   
   36018           8 :   if (!args) SWIG_fail;
   36019           8 :   swig_obj[0] = args;
   36020           8 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   36021           8 :   if (!SWIG_IsOK(res1)) {
   36022           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetBand" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   36023             :   }
   36024           8 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   36025           8 :   {
   36026           8 :     const int bLocalUseExceptions = GetUseExceptions();
   36027           8 :     if ( bLocalUseExceptions ) {
   36028           8 :       pushErrorHandler();
   36029             :     }
   36030           8 :     {
   36031           8 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36032           8 :       result = (int)GDALRasterBandShadow_GetBand(arg1);
   36033           8 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36034             :     }
   36035           8 :     if ( bLocalUseExceptions ) {
   36036           8 :       popErrorHandler();
   36037             :     }
   36038             : #ifndef SED_HACKS
   36039             :     if ( bLocalUseExceptions ) {
   36040             :       CPLErr eclass = CPLGetLastErrorType();
   36041             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36042             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36043             :       }
   36044             :     }
   36045             : #endif
   36046             :   }
   36047           8 :   resultobj = SWIG_From_int(static_cast< int >(result));
   36048           8 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   36049             :   return resultobj;
   36050             : fail:
   36051             :   return NULL;
   36052             : }
   36053             : 
   36054             : 
   36055         373 : SWIGINTERN PyObject *_wrap_Band_GetBlockSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36056         373 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36057         373 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   36058         373 :   int *arg2 = (int *) 0 ;
   36059         373 :   int *arg3 = (int *) 0 ;
   36060         373 :   void *argp1 = 0 ;
   36061         373 :   int res1 = 0 ;
   36062         373 :   int temp2 ;
   36063         373 :   int res2 = SWIG_TMPOBJ ;
   36064         373 :   int temp3 ;
   36065         373 :   int res3 = SWIG_TMPOBJ ;
   36066         373 :   PyObject *swig_obj[1] ;
   36067             :   
   36068         373 :   arg2 = &temp2;
   36069         373 :   arg3 = &temp3;
   36070         373 :   if (!args) SWIG_fail;
   36071         373 :   swig_obj[0] = args;
   36072         373 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   36073         373 :   if (!SWIG_IsOK(res1)) {
   36074           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetBlockSize" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   36075             :   }
   36076         373 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   36077         373 :   {
   36078         373 :     const int bLocalUseExceptions = GetUseExceptions();
   36079         373 :     if ( bLocalUseExceptions ) {
   36080          87 :       pushErrorHandler();
   36081             :     }
   36082         373 :     {
   36083         373 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36084         373 :       GDALRasterBandShadow_GetBlockSize(arg1,arg2,arg3);
   36085         373 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36086             :     }
   36087         373 :     if ( bLocalUseExceptions ) {
   36088          87 :       popErrorHandler();
   36089             :     }
   36090             : #ifndef SED_HACKS
   36091             :     if ( bLocalUseExceptions ) {
   36092             :       CPLErr eclass = CPLGetLastErrorType();
   36093             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36094             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36095             :       }
   36096             :     }
   36097             : #endif
   36098             :   }
   36099         373 :   resultobj = SWIG_Py_Void();
   36100         373 :   if (ReturnSame(SWIG_IsTmpObj(res2))) {
   36101         373 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg2)));
   36102             :   } else {
   36103           0 :     int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   36104           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_int, new_flags));
   36105             :   }
   36106         373 :   if (ReturnSame(SWIG_IsTmpObj(res3))) {
   36107         373 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3)));
   36108             :   } else {
   36109           0 :     int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   36110           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags));
   36111             :   }
   36112         373 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   36113             :   return resultobj;
   36114             : fail:
   36115             :   return NULL;
   36116             : }
   36117             : 
   36118             : 
   36119           6 : SWIGINTERN PyObject *_wrap_Band_GetActualBlockSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36120           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36121           6 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   36122           6 :   int arg2 ;
   36123           6 :   int arg3 ;
   36124           6 :   int *arg4 = (int *) 0 ;
   36125           6 :   int *arg5 = (int *) 0 ;
   36126           6 :   int *arg6 = (int *) 0 ;
   36127           6 :   void *argp1 = 0 ;
   36128           6 :   int res1 = 0 ;
   36129           6 :   int val2 ;
   36130           6 :   int ecode2 = 0 ;
   36131           6 :   int val3 ;
   36132           6 :   int ecode3 = 0 ;
   36133           6 :   int nxvalid4 = 0 ;
   36134           6 :   int nyvalid4 = 0 ;
   36135           6 :   int isvalid4 = 0 ;
   36136           6 :   PyObject *swig_obj[3] ;
   36137             :   
   36138           6 :   {
   36139             :     /* %typemap(in) (int *pnxvalid, int *pnyvalid, int* pisvalid) */
   36140           6 :     arg4 = &nxvalid4;
   36141           6 :     arg5 = &nyvalid4;
   36142           6 :     arg6 = &isvalid4;
   36143             :   }
   36144           6 :   if (!SWIG_Python_UnpackTuple(args, "Band_GetActualBlockSize", 3, 3, swig_obj)) SWIG_fail;
   36145           6 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   36146           6 :   if (!SWIG_IsOK(res1)) {
   36147           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetActualBlockSize" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   36148             :   }
   36149           6 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   36150           6 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   36151           6 :   if (!SWIG_IsOK(ecode2)) {
   36152           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_GetActualBlockSize" "', argument " "2"" of type '" "int""'");
   36153             :   } 
   36154           6 :   arg2 = static_cast< int >(val2);
   36155           6 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   36156           6 :   if (!SWIG_IsOK(ecode3)) {
   36157           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_GetActualBlockSize" "', argument " "3"" of type '" "int""'");
   36158             :   } 
   36159           6 :   arg3 = static_cast< int >(val3);
   36160           6 :   {
   36161           6 :     const int bLocalUseExceptions = GetUseExceptions();
   36162           6 :     if ( bLocalUseExceptions ) {
   36163           0 :       pushErrorHandler();
   36164             :     }
   36165           6 :     {
   36166           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36167           6 :       GDALRasterBandShadow_GetActualBlockSize(arg1,arg2,arg3,arg4,arg5,arg6);
   36168           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36169             :     }
   36170           6 :     if ( bLocalUseExceptions ) {
   36171           0 :       popErrorHandler();
   36172             :     }
   36173             : #ifndef SED_HACKS
   36174             :     if ( bLocalUseExceptions ) {
   36175             :       CPLErr eclass = CPLGetLastErrorType();
   36176             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36177             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36178             :       }
   36179             :     }
   36180             : #endif
   36181             :   }
   36182           6 :   resultobj = SWIG_Py_Void();
   36183           6 :   {
   36184             :     /* %typemap(argout) (int *pnxvalid, int *pnyvalid, int* pisvalid)  */
   36185           6 :     PyObject *r;
   36186           6 :     if ( !*arg6 ) {
   36187           4 :       Py_INCREF(Py_None);
   36188           4 :       r = Py_None;
   36189             :     }
   36190             :     else {
   36191           2 :       r = PyTuple_New( 2 );
   36192           2 :       PyTuple_SetItem( r, 0, PyLong_FromLong(*arg4) );
   36193           2 :       PyTuple_SetItem( r, 1, PyLong_FromLong(*arg5) );
   36194             :     }
   36195           6 :     resultobj = t_output_helper(resultobj,r);
   36196             :   }
   36197           6 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   36198             :   return resultobj;
   36199             : fail:
   36200             :   return NULL;
   36201             : }
   36202             : 
   36203             : 
   36204         765 : SWIGINTERN PyObject *_wrap_Band_GetColorInterpretation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36205         765 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36206         765 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   36207         765 :   void *argp1 = 0 ;
   36208         765 :   int res1 = 0 ;
   36209         765 :   PyObject *swig_obj[1] ;
   36210         765 :   GDALColorInterp result;
   36211             :   
   36212         765 :   if (!args) SWIG_fail;
   36213         765 :   swig_obj[0] = args;
   36214         765 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   36215         765 :   if (!SWIG_IsOK(res1)) {
   36216           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetColorInterpretation" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   36217             :   }
   36218         765 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   36219         765 :   {
   36220         765 :     const int bLocalUseExceptions = GetUseExceptions();
   36221         765 :     if ( bLocalUseExceptions ) {
   36222         223 :       pushErrorHandler();
   36223             :     }
   36224         765 :     {
   36225         765 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36226         765 :       result = (GDALColorInterp)GDALRasterBandShadow_GetColorInterpretation(arg1);
   36227         765 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36228             :     }
   36229         765 :     if ( bLocalUseExceptions ) {
   36230         223 :       popErrorHandler();
   36231             :     }
   36232             : #ifndef SED_HACKS
   36233             :     if ( bLocalUseExceptions ) {
   36234             :       CPLErr eclass = CPLGetLastErrorType();
   36235             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36236             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36237             :       }
   36238             :     }
   36239             : #endif
   36240             :   }
   36241         765 :   resultobj = SWIG_From_int(static_cast< int >(result));
   36242         765 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   36243             :   return resultobj;
   36244             : fail:
   36245             :   return NULL;
   36246             : }
   36247             : 
   36248             : 
   36249         171 : SWIGINTERN PyObject *_wrap_Band_GetRasterColorInterpretation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36250         171 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36251         171 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   36252         171 :   void *argp1 = 0 ;
   36253         171 :   int res1 = 0 ;
   36254         171 :   PyObject *swig_obj[1] ;
   36255         171 :   GDALColorInterp result;
   36256             :   
   36257         171 :   if (!args) SWIG_fail;
   36258         171 :   swig_obj[0] = args;
   36259         171 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   36260         171 :   if (!SWIG_IsOK(res1)) {
   36261           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetRasterColorInterpretation" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   36262             :   }
   36263         171 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   36264         171 :   {
   36265         171 :     const int bLocalUseExceptions = GetUseExceptions();
   36266         171 :     if ( bLocalUseExceptions ) {
   36267          64 :       pushErrorHandler();
   36268             :     }
   36269         171 :     {
   36270         171 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36271         171 :       result = (GDALColorInterp)GDALRasterBandShadow_GetRasterColorInterpretation(arg1);
   36272         171 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36273             :     }
   36274         171 :     if ( bLocalUseExceptions ) {
   36275          64 :       popErrorHandler();
   36276             :     }
   36277             : #ifndef SED_HACKS
   36278             :     if ( bLocalUseExceptions ) {
   36279             :       CPLErr eclass = CPLGetLastErrorType();
   36280             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36281             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36282             :       }
   36283             :     }
   36284             : #endif
   36285             :   }
   36286         171 :   resultobj = SWIG_From_int(static_cast< int >(result));
   36287         171 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   36288             :   return resultobj;
   36289             : fail:
   36290             :   return NULL;
   36291             : }
   36292             : 
   36293             : 
   36294         665 : SWIGINTERN PyObject *_wrap_Band_SetColorInterpretation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36295         665 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36296         665 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   36297         665 :   GDALColorInterp arg2 ;
   36298         665 :   void *argp1 = 0 ;
   36299         665 :   int res1 = 0 ;
   36300         665 :   int val2 ;
   36301         665 :   int ecode2 = 0 ;
   36302         665 :   PyObject *swig_obj[2] ;
   36303         665 :   CPLErr result;
   36304             :   
   36305         665 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetColorInterpretation", 2, 2, swig_obj)) SWIG_fail;
   36306         665 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   36307         665 :   if (!SWIG_IsOK(res1)) {
   36308           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetColorInterpretation" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   36309             :   }
   36310         665 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   36311         665 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   36312         665 :   if (!SWIG_IsOK(ecode2)) {
   36313           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_SetColorInterpretation" "', argument " "2"" of type '" "GDALColorInterp""'");
   36314             :   } 
   36315         665 :   arg2 = static_cast< GDALColorInterp >(val2);
   36316         665 :   {
   36317         665 :     const int bLocalUseExceptions = GetUseExceptions();
   36318         665 :     if ( bLocalUseExceptions ) {
   36319         305 :       pushErrorHandler();
   36320             :     }
   36321         665 :     {
   36322         665 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36323         665 :       CPL_IGNORE_RET_VAL(result = (CPLErr)GDALRasterBandShadow_SetColorInterpretation(arg1,arg2));
   36324         665 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36325             :     }
   36326         665 :     if ( bLocalUseExceptions ) {
   36327         305 :       popErrorHandler();
   36328             :     }
   36329             : #ifndef SED_HACKS
   36330             :     if ( bLocalUseExceptions ) {
   36331             :       CPLErr eclass = CPLGetLastErrorType();
   36332             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36333             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36334             :       }
   36335             :     }
   36336             : #endif
   36337             :   }
   36338         665 :   resultobj = SWIG_From_int(static_cast< int >(result));
   36339         665 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   36340             :   return resultobj;
   36341             : fail:
   36342             :   return NULL;
   36343             : }
   36344             : 
   36345             : 
   36346         381 : SWIGINTERN PyObject *_wrap_Band_SetRasterColorInterpretation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36347         381 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36348         381 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   36349         381 :   GDALColorInterp arg2 ;
   36350         381 :   void *argp1 = 0 ;
   36351         381 :   int res1 = 0 ;
   36352         381 :   int val2 ;
   36353         381 :   int ecode2 = 0 ;
   36354         381 :   PyObject *swig_obj[2] ;
   36355         381 :   CPLErr result;
   36356             :   
   36357         381 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetRasterColorInterpretation", 2, 2, swig_obj)) SWIG_fail;
   36358         381 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   36359         381 :   if (!SWIG_IsOK(res1)) {
   36360           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetRasterColorInterpretation" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   36361             :   }
   36362         381 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   36363         381 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   36364         381 :   if (!SWIG_IsOK(ecode2)) {
   36365           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_SetRasterColorInterpretation" "', argument " "2"" of type '" "GDALColorInterp""'");
   36366             :   } 
   36367         381 :   arg2 = static_cast< GDALColorInterp >(val2);
   36368         381 :   {
   36369         381 :     const int bLocalUseExceptions = GetUseExceptions();
   36370         381 :     if ( bLocalUseExceptions ) {
   36371         355 :       pushErrorHandler();
   36372             :     }
   36373         381 :     {
   36374         381 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36375         381 :       CPL_IGNORE_RET_VAL(result = (CPLErr)GDALRasterBandShadow_SetRasterColorInterpretation(arg1,arg2));
   36376         381 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36377             :     }
   36378         381 :     if ( bLocalUseExceptions ) {
   36379         355 :       popErrorHandler();
   36380             :     }
   36381             : #ifndef SED_HACKS
   36382             :     if ( bLocalUseExceptions ) {
   36383             :       CPLErr eclass = CPLGetLastErrorType();
   36384             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36385             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36386             :       }
   36387             :     }
   36388             : #endif
   36389             :   }
   36390         381 :   resultobj = SWIG_From_int(static_cast< int >(result));
   36391         381 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   36392             :   return resultobj;
   36393             : fail:
   36394             :   return NULL;
   36395             : }
   36396             : 
   36397             : 
   36398      409964 : SWIGINTERN PyObject *_wrap_Band_GetNoDataValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36399      409964 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36400      409964 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   36401      409964 :   double *arg2 = (double *) 0 ;
   36402      409964 :   int *arg3 = (int *) 0 ;
   36403      409964 :   void *argp1 = 0 ;
   36404      409964 :   int res1 = 0 ;
   36405      409964 :   double tmpval2 ;
   36406      409964 :   int tmphasval2 ;
   36407      409964 :   PyObject *swig_obj[1] ;
   36408             :   
   36409      409964 :   {
   36410             :     /* %typemap(python,in,numinputs=0) (double *val, int *hasval) */
   36411      409964 :     arg2 = &tmpval2;
   36412      409964 :     arg3 = &tmphasval2;
   36413             :   }
   36414      409964 :   if (!args) SWIG_fail;
   36415      409964 :   swig_obj[0] = args;
   36416      409964 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   36417      409964 :   if (!SWIG_IsOK(res1)) {
   36418           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetNoDataValue" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   36419             :   }
   36420      409964 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   36421      409964 :   {
   36422      409964 :     const int bLocalUseExceptions = GetUseExceptions();
   36423      409964 :     if ( bLocalUseExceptions ) {
   36424      409778 :       pushErrorHandler();
   36425             :     }
   36426      409964 :     {
   36427      409964 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36428      409964 :       GDALRasterBandShadow_GetNoDataValue(arg1,arg2,arg3);
   36429      409964 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36430             :     }
   36431      409964 :     if ( bLocalUseExceptions ) {
   36432      409778 :       popErrorHandler();
   36433             :     }
   36434             : #ifndef SED_HACKS
   36435             :     if ( bLocalUseExceptions ) {
   36436             :       CPLErr eclass = CPLGetLastErrorType();
   36437             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36438             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36439             :       }
   36440             :     }
   36441             : #endif
   36442             :   }
   36443      409964 :   resultobj = SWIG_Py_Void();
   36444      409964 :   {
   36445             :     /* %typemap(python,argout) (double *val, int *hasval) */
   36446      409964 :     PyObject *r;
   36447      409964 :     if ( !*arg3 ) {
   36448         416 :       Py_INCREF(Py_None);
   36449         416 :       r = Py_None;
   36450         416 :       resultobj = t_output_helper(resultobj,r);
   36451             :     }
   36452             :     else {
   36453      409548 :       r = PyFloat_FromDouble( *arg2 );
   36454      409548 :       resultobj = t_output_helper(resultobj,r);
   36455             :     }
   36456             :   }
   36457      409964 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   36458             :   return resultobj;
   36459             : fail:
   36460             :   return NULL;
   36461             : }
   36462             : 
   36463             : 
   36464          21 : SWIGINTERN PyObject *_wrap_Band_GetNoDataValueAsInt64(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36465          21 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36466          21 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   36467          21 :   GIntBig *arg2 = (GIntBig *) 0 ;
   36468          21 :   int *arg3 = (int *) 0 ;
   36469          21 :   void *argp1 = 0 ;
   36470          21 :   int res1 = 0 ;
   36471          21 :   GIntBig tmpval2 ;
   36472          21 :   int tmphasval2 ;
   36473          21 :   PyObject *swig_obj[1] ;
   36474             :   
   36475          21 :   {
   36476             :     /* %typemap(python,in,numinputs=0) (GIntBig *val, int *hasval) */
   36477          21 :     arg2 = &tmpval2;
   36478          21 :     arg3 = &tmphasval2;
   36479             :   }
   36480          21 :   if (!args) SWIG_fail;
   36481          21 :   swig_obj[0] = args;
   36482          21 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   36483          21 :   if (!SWIG_IsOK(res1)) {
   36484           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetNoDataValueAsInt64" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   36485             :   }
   36486          21 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   36487          21 :   {
   36488          21 :     const int bLocalUseExceptions = GetUseExceptions();
   36489          21 :     if ( bLocalUseExceptions ) {
   36490          16 :       pushErrorHandler();
   36491             :     }
   36492          21 :     {
   36493          21 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36494          21 :       GDALRasterBandShadow_GetNoDataValueAsInt64(arg1,arg2,arg3);
   36495          21 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36496             :     }
   36497          21 :     if ( bLocalUseExceptions ) {
   36498          16 :       popErrorHandler();
   36499             :     }
   36500             : #ifndef SED_HACKS
   36501             :     if ( bLocalUseExceptions ) {
   36502             :       CPLErr eclass = CPLGetLastErrorType();
   36503             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36504             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36505             :       }
   36506             :     }
   36507             : #endif
   36508             :   }
   36509          21 :   resultobj = SWIG_Py_Void();
   36510          21 :   {
   36511             :     /* %typemap(python,argout) (GIntBig *val, int *hasval) */
   36512          21 :     PyObject *r;
   36513          21 :     if ( !*arg3 ) {
   36514           6 :       Py_INCREF(Py_None);
   36515           6 :       r = Py_None;
   36516           6 :       resultobj = t_output_helper(resultobj,r);
   36517             :     }
   36518             :     else {
   36519          15 :       r = PyLong_FromLongLong( *arg2 );
   36520          15 :       resultobj = t_output_helper(resultobj,r);
   36521             :     }
   36522             :   }
   36523          21 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   36524             :   return resultobj;
   36525             : fail:
   36526             :   return NULL;
   36527             : }
   36528             : 
   36529             : 
   36530          17 : SWIGINTERN PyObject *_wrap_Band_GetNoDataValueAsUInt64(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36531          17 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36532          17 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   36533          17 :   GUIntBig *arg2 = (GUIntBig *) 0 ;
   36534          17 :   int *arg3 = (int *) 0 ;
   36535          17 :   void *argp1 = 0 ;
   36536          17 :   int res1 = 0 ;
   36537          17 :   GUIntBig tmpval2 ;
   36538          17 :   int tmphasval2 ;
   36539          17 :   PyObject *swig_obj[1] ;
   36540             :   
   36541          17 :   {
   36542             :     /* %typemap(python,in,numinputs=0) (GUIntBig *val, int *hasval) */
   36543          17 :     arg2 = &tmpval2;
   36544          17 :     arg3 = &tmphasval2;
   36545             :   }
   36546          17 :   if (!args) SWIG_fail;
   36547          17 :   swig_obj[0] = args;
   36548          17 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   36549          17 :   if (!SWIG_IsOK(res1)) {
   36550           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetNoDataValueAsUInt64" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   36551             :   }
   36552          17 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   36553          17 :   {
   36554          17 :     const int bLocalUseExceptions = GetUseExceptions();
   36555          17 :     if ( bLocalUseExceptions ) {
   36556          12 :       pushErrorHandler();
   36557             :     }
   36558          17 :     {
   36559          17 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36560          17 :       GDALRasterBandShadow_GetNoDataValueAsUInt64(arg1,arg2,arg3);
   36561          17 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36562             :     }
   36563          17 :     if ( bLocalUseExceptions ) {
   36564          12 :       popErrorHandler();
   36565             :     }
   36566             : #ifndef SED_HACKS
   36567             :     if ( bLocalUseExceptions ) {
   36568             :       CPLErr eclass = CPLGetLastErrorType();
   36569             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36570             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36571             :       }
   36572             :     }
   36573             : #endif
   36574             :   }
   36575          17 :   resultobj = SWIG_Py_Void();
   36576          17 :   {
   36577             :     /* %typemap(python,argout) (GUIntBig *val, int *hasval) */
   36578          17 :     PyObject *r;
   36579          17 :     if ( !*arg3 ) {
   36580           4 :       Py_INCREF(Py_None);
   36581           4 :       r = Py_None;
   36582           4 :       resultobj = t_output_helper(resultobj,r);
   36583             :     }
   36584             :     else {
   36585          13 :       r = PyLong_FromUnsignedLongLong( *arg2 );
   36586          13 :       resultobj = t_output_helper(resultobj,r);
   36587             :     }
   36588             :   }
   36589          17 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   36590             :   return resultobj;
   36591             : fail:
   36592             :   return NULL;
   36593             : }
   36594             : 
   36595             : 
   36596         421 : SWIGINTERN PyObject *_wrap_Band_SetNoDataValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36597         421 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36598         421 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   36599         421 :   double arg2 ;
   36600         421 :   void *argp1 = 0 ;
   36601         421 :   int res1 = 0 ;
   36602         421 :   double val2 ;
   36603         421 :   int ecode2 = 0 ;
   36604         421 :   PyObject *swig_obj[2] ;
   36605         421 :   CPLErr result;
   36606             :   
   36607         421 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetNoDataValue", 2, 2, swig_obj)) SWIG_fail;
   36608         421 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   36609         421 :   if (!SWIG_IsOK(res1)) {
   36610           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetNoDataValue" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   36611             :   }
   36612         421 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   36613         421 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   36614         421 :   if (!SWIG_IsOK(ecode2)) {
   36615           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_SetNoDataValue" "', argument " "2"" of type '" "double""'");
   36616             :   } 
   36617         421 :   arg2 = static_cast< double >(val2);
   36618         421 :   {
   36619         421 :     const int bLocalUseExceptions = GetUseExceptions();
   36620         421 :     if ( bLocalUseExceptions ) {
   36621         261 :       pushErrorHandler();
   36622             :     }
   36623         421 :     {
   36624         421 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36625         421 :       CPL_IGNORE_RET_VAL(result = (CPLErr)GDALRasterBandShadow_SetNoDataValue(arg1,arg2));
   36626         421 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36627             :     }
   36628         421 :     if ( bLocalUseExceptions ) {
   36629         261 :       popErrorHandler();
   36630             :     }
   36631             : #ifndef SED_HACKS
   36632             :     if ( bLocalUseExceptions ) {
   36633             :       CPLErr eclass = CPLGetLastErrorType();
   36634             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36635             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36636             :       }
   36637             :     }
   36638             : #endif
   36639             :   }
   36640         421 :   resultobj = SWIG_From_int(static_cast< int >(result));
   36641         422 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   36642             :   return resultobj;
   36643             : fail:
   36644             :   return NULL;
   36645             : }
   36646             : 
   36647             : 
   36648          11 : SWIGINTERN PyObject *_wrap_Band_SetNoDataValueAsInt64(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36649          11 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36650          11 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   36651          11 :   GIntBig arg2 ;
   36652          11 :   void *argp1 = 0 ;
   36653          11 :   int res1 = 0 ;
   36654          11 :   PyObject *swig_obj[2] ;
   36655          11 :   CPLErr result;
   36656             :   
   36657          11 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetNoDataValueAsInt64", 2, 2, swig_obj)) SWIG_fail;
   36658          11 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   36659          11 :   if (!SWIG_IsOK(res1)) {
   36660           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetNoDataValueAsInt64" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   36661             :   }
   36662          11 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   36663          11 :   {
   36664          11 :     arg2 = (GIntBig)PyLong_AsLongLong(swig_obj[1]);
   36665             :   }
   36666          11 :   {
   36667          11 :     const int bLocalUseExceptions = GetUseExceptions();
   36668          11 :     if ( bLocalUseExceptions ) {
   36669           6 :       pushErrorHandler();
   36670             :     }
   36671          11 :     {
   36672          11 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36673          11 :       CPL_IGNORE_RET_VAL(result = (CPLErr)GDALRasterBandShadow_SetNoDataValueAsInt64(arg1,arg2));
   36674          11 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36675             :     }
   36676          11 :     if ( bLocalUseExceptions ) {
   36677           6 :       popErrorHandler();
   36678             :     }
   36679             : #ifndef SED_HACKS
   36680             :     if ( bLocalUseExceptions ) {
   36681             :       CPLErr eclass = CPLGetLastErrorType();
   36682             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36683             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36684             :       }
   36685             :     }
   36686             : #endif
   36687             :   }
   36688          11 :   resultobj = SWIG_From_int(static_cast< int >(result));
   36689          11 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   36690             :   return resultobj;
   36691             : fail:
   36692             :   return NULL;
   36693             : }
   36694             : 
   36695             : 
   36696          10 : SWIGINTERN PyObject *_wrap_Band_SetNoDataValueAsUInt64(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36697          10 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36698          10 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   36699          10 :   GUIntBig arg2 ;
   36700          10 :   void *argp1 = 0 ;
   36701          10 :   int res1 = 0 ;
   36702          10 :   PyObject *swig_obj[2] ;
   36703          10 :   CPLErr result;
   36704             :   
   36705          10 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetNoDataValueAsUInt64", 2, 2, swig_obj)) SWIG_fail;
   36706          10 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   36707          10 :   if (!SWIG_IsOK(res1)) {
   36708           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetNoDataValueAsUInt64" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   36709             :   }
   36710          10 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   36711          10 :   {
   36712          10 :     arg2 = (GIntBig)PyLong_AsUnsignedLongLong(swig_obj[1]);
   36713             :   }
   36714          10 :   {
   36715          10 :     const int bLocalUseExceptions = GetUseExceptions();
   36716          10 :     if ( bLocalUseExceptions ) {
   36717           5 :       pushErrorHandler();
   36718             :     }
   36719          10 :     {
   36720          10 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36721          10 :       CPL_IGNORE_RET_VAL(result = (CPLErr)GDALRasterBandShadow_SetNoDataValueAsUInt64(arg1,arg2));
   36722          10 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36723             :     }
   36724          10 :     if ( bLocalUseExceptions ) {
   36725           5 :       popErrorHandler();
   36726             :     }
   36727             : #ifndef SED_HACKS
   36728             :     if ( bLocalUseExceptions ) {
   36729             :       CPLErr eclass = CPLGetLastErrorType();
   36730             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36731             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36732             :       }
   36733             :     }
   36734             : #endif
   36735             :   }
   36736          10 :   resultobj = SWIG_From_int(static_cast< int >(result));
   36737          10 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   36738             :   return resultobj;
   36739             : fail:
   36740             :   return NULL;
   36741             : }
   36742             : 
   36743             : 
   36744          35 : SWIGINTERN PyObject *_wrap_Band_DeleteNoDataValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36745          35 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36746          35 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   36747          35 :   void *argp1 = 0 ;
   36748          35 :   int res1 = 0 ;
   36749          35 :   PyObject *swig_obj[1] ;
   36750          35 :   CPLErr result;
   36751             :   
   36752          35 :   if (!args) SWIG_fail;
   36753          35 :   swig_obj[0] = args;
   36754          35 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   36755          35 :   if (!SWIG_IsOK(res1)) {
   36756           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_DeleteNoDataValue" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   36757             :   }
   36758          35 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   36759          35 :   {
   36760          35 :     const int bLocalUseExceptions = GetUseExceptions();
   36761          35 :     if ( bLocalUseExceptions ) {
   36762          30 :       pushErrorHandler();
   36763             :     }
   36764          35 :     {
   36765          35 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36766          35 :       CPL_IGNORE_RET_VAL(result = (CPLErr)GDALRasterBandShadow_DeleteNoDataValue(arg1));
   36767          35 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36768             :     }
   36769          35 :     if ( bLocalUseExceptions ) {
   36770          30 :       popErrorHandler();
   36771             :     }
   36772             : #ifndef SED_HACKS
   36773             :     if ( bLocalUseExceptions ) {
   36774             :       CPLErr eclass = CPLGetLastErrorType();
   36775             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36776             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36777             :       }
   36778             :     }
   36779             : #endif
   36780             :   }
   36781          35 :   resultobj = SWIG_From_int(static_cast< int >(result));
   36782          35 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   36783             :   return resultobj;
   36784             : fail:
   36785             :   return NULL;
   36786             : }
   36787             : 
   36788             : 
   36789          66 : SWIGINTERN PyObject *_wrap_Band_GetUnitType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36790          66 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36791          66 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   36792          66 :   void *argp1 = 0 ;
   36793          66 :   int res1 = 0 ;
   36794          66 :   PyObject *swig_obj[1] ;
   36795          66 :   char *result = 0 ;
   36796             :   
   36797          66 :   if (!args) SWIG_fail;
   36798          66 :   swig_obj[0] = args;
   36799          66 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   36800          66 :   if (!SWIG_IsOK(res1)) {
   36801           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetUnitType" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   36802             :   }
   36803          66 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   36804          66 :   {
   36805          66 :     const int bLocalUseExceptions = GetUseExceptions();
   36806          66 :     if ( bLocalUseExceptions ) {
   36807          35 :       pushErrorHandler();
   36808             :     }
   36809          66 :     {
   36810          66 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36811          66 :       result = (char *)GDALRasterBandShadow_GetUnitType(arg1);
   36812          66 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36813             :     }
   36814          66 :     if ( bLocalUseExceptions ) {
   36815          35 :       popErrorHandler();
   36816             :     }
   36817             : #ifndef SED_HACKS
   36818             :     if ( bLocalUseExceptions ) {
   36819             :       CPLErr eclass = CPLGetLastErrorType();
   36820             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36821             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36822             :       }
   36823             :     }
   36824             : #endif
   36825             :   }
   36826          66 :   resultobj = SWIG_FromCharPtr((const char *)result);
   36827          66 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   36828             :   return resultobj;
   36829             : fail:
   36830             :   return NULL;
   36831             : }
   36832             : 
   36833             : 
   36834          18 : SWIGINTERN PyObject *_wrap_Band_SetUnitType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36835          18 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36836          18 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   36837          18 :   char *arg2 = (char *) 0 ;
   36838          18 :   void *argp1 = 0 ;
   36839          18 :   int res1 = 0 ;
   36840          18 :   int res2 ;
   36841          18 :   char *buf2 = 0 ;
   36842          18 :   int alloc2 = 0 ;
   36843          18 :   PyObject *swig_obj[2] ;
   36844          18 :   CPLErr result;
   36845             :   
   36846          18 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetUnitType", 2, 2, swig_obj)) SWIG_fail;
   36847          18 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   36848          18 :   if (!SWIG_IsOK(res1)) {
   36849           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetUnitType" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   36850             :   }
   36851          18 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   36852          18 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   36853          18 :   if (!SWIG_IsOK(res2)) {
   36854           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Band_SetUnitType" "', argument " "2"" of type '" "char const *""'");
   36855             :   }
   36856          18 :   arg2 = reinterpret_cast< char * >(buf2);
   36857          18 :   {
   36858          18 :     const int bLocalUseExceptions = GetUseExceptions();
   36859          18 :     if ( bLocalUseExceptions ) {
   36860           9 :       pushErrorHandler();
   36861             :     }
   36862          18 :     {
   36863          18 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36864          18 :       CPL_IGNORE_RET_VAL(result = (CPLErr)GDALRasterBandShadow_SetUnitType(arg1,(char const *)arg2));
   36865          18 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36866             :     }
   36867          18 :     if ( bLocalUseExceptions ) {
   36868           9 :       popErrorHandler();
   36869             :     }
   36870             : #ifndef SED_HACKS
   36871             :     if ( bLocalUseExceptions ) {
   36872             :       CPLErr eclass = CPLGetLastErrorType();
   36873             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36874             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36875             :       }
   36876             :     }
   36877             : #endif
   36878             :   }
   36879          18 :   resultobj = SWIG_From_int(static_cast< int >(result));
   36880          18 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   36881          18 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   36882             :   return resultobj;
   36883           0 : fail:
   36884           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   36885             :   return NULL;
   36886             : }
   36887             : 
   36888             : 
   36889          17 : SWIGINTERN PyObject *_wrap_Band_GetRasterCategoryNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36890          17 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36891          17 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   36892          17 :   void *argp1 = 0 ;
   36893          17 :   int res1 = 0 ;
   36894          17 :   PyObject *swig_obj[1] ;
   36895          17 :   char **result = 0 ;
   36896             :   
   36897          17 :   if (!args) SWIG_fail;
   36898          17 :   swig_obj[0] = args;
   36899          17 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   36900          17 :   if (!SWIG_IsOK(res1)) {
   36901           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetRasterCategoryNames" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   36902             :   }
   36903          17 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   36904          17 :   {
   36905          17 :     const int bLocalUseExceptions = GetUseExceptions();
   36906          17 :     if ( bLocalUseExceptions ) {
   36907           0 :       pushErrorHandler();
   36908             :     }
   36909          17 :     {
   36910          17 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36911          17 :       result = (char **)GDALRasterBandShadow_GetRasterCategoryNames(arg1);
   36912          17 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36913             :     }
   36914          17 :     if ( bLocalUseExceptions ) {
   36915           0 :       popErrorHandler();
   36916             :     }
   36917             : #ifndef SED_HACKS
   36918             :     if ( bLocalUseExceptions ) {
   36919             :       CPLErr eclass = CPLGetLastErrorType();
   36920             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36921             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36922             :       }
   36923             :     }
   36924             : #endif
   36925             :   }
   36926          17 :   {
   36927             :     /* %typemap(out) char **options -> ( string ) */
   36928          17 :     bool bErr = false;
   36929          17 :     resultobj = CSLToList(result, &bErr);
   36930          17 :     if( bErr ) {
   36931           0 :       SWIG_fail;
   36932             :     }
   36933             :   }
   36934          17 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   36935             :   return resultobj;
   36936             : fail:
   36937             :   return NULL;
   36938             : }
   36939             : 
   36940             : 
   36941           0 : SWIGINTERN PyObject *_wrap_Band_SetRasterCategoryNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36942           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36943           0 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   36944           0 :   char **arg2 = (char **) 0 ;
   36945           0 :   void *argp1 = 0 ;
   36946           0 :   int res1 = 0 ;
   36947           0 :   PyObject *swig_obj[2] ;
   36948           0 :   CPLErr result;
   36949             :   
   36950           0 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetRasterCategoryNames", 2, 2, swig_obj)) SWIG_fail;
   36951           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   36952           0 :   if (!SWIG_IsOK(res1)) {
   36953           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetRasterCategoryNames" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   36954             :   }
   36955           0 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   36956           0 :   {
   36957             :     /* %typemap(in) char **dict */
   36958           0 :     arg2 = NULL;
   36959           0 :     if ( PySequence_Check( swig_obj[1] ) ) {
   36960           0 :       int bErr = FALSE;
   36961           0 :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   36962           0 :       if ( bErr )
   36963             :       {
   36964           0 :         SWIG_fail;
   36965             :       }
   36966             :     }
   36967           0 :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   36968           0 :       int bErr = FALSE;
   36969           0 :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   36970           0 :       if ( bErr )
   36971             :       {
   36972           0 :         SWIG_fail;
   36973             :       }
   36974             :     }
   36975             :     else {
   36976           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   36977           0 :       SWIG_fail;
   36978             :     }
   36979             :   }
   36980           0 :   {
   36981           0 :     const int bLocalUseExceptions = GetUseExceptions();
   36982           0 :     if ( bLocalUseExceptions ) {
   36983           0 :       pushErrorHandler();
   36984             :     }
   36985           0 :     {
   36986           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36987           0 :       CPL_IGNORE_RET_VAL(result = (CPLErr)GDALRasterBandShadow_SetRasterCategoryNames(arg1,arg2));
   36988           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36989             :     }
   36990           0 :     if ( bLocalUseExceptions ) {
   36991           0 :       popErrorHandler();
   36992             :     }
   36993             : #ifndef SED_HACKS
   36994             :     if ( bLocalUseExceptions ) {
   36995             :       CPLErr eclass = CPLGetLastErrorType();
   36996             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36997             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36998             :       }
   36999             :     }
   37000             : #endif
   37001             :   }
   37002           0 :   resultobj = SWIG_From_int(static_cast< int >(result));
   37003           0 :   {
   37004             :     /* %typemap(freearg) char **dict */
   37005           0 :     CSLDestroy( arg2 );
   37006             :   }
   37007           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   37008             :   return resultobj;
   37009           0 : fail:
   37010           0 :   {
   37011             :     /* %typemap(freearg) char **dict */
   37012           0 :     CSLDestroy( arg2 );
   37013             :   }
   37014             :   return NULL;
   37015             : }
   37016             : 
   37017             : 
   37018          54 : SWIGINTERN PyObject *_wrap_Band_GetMinimum(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37019          54 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37020          54 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   37021          54 :   double *arg2 = (double *) 0 ;
   37022          54 :   int *arg3 = (int *) 0 ;
   37023          54 :   void *argp1 = 0 ;
   37024          54 :   int res1 = 0 ;
   37025          54 :   double tmpval2 ;
   37026          54 :   int tmphasval2 ;
   37027          54 :   PyObject *swig_obj[1] ;
   37028             :   
   37029          54 :   {
   37030             :     /* %typemap(python,in,numinputs=0) (double *val, int *hasval) */
   37031          54 :     arg2 = &tmpval2;
   37032          54 :     arg3 = &tmphasval2;
   37033             :   }
   37034          54 :   if (!args) SWIG_fail;
   37035          54 :   swig_obj[0] = args;
   37036          54 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   37037          54 :   if (!SWIG_IsOK(res1)) {
   37038           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetMinimum" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   37039             :   }
   37040          54 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   37041          54 :   {
   37042          54 :     const int bLocalUseExceptions = GetUseExceptions();
   37043          54 :     if ( bLocalUseExceptions ) {
   37044          20 :       pushErrorHandler();
   37045             :     }
   37046          54 :     {
   37047          54 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37048          54 :       GDALRasterBandShadow_GetMinimum(arg1,arg2,arg3);
   37049          54 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37050             :     }
   37051          54 :     if ( bLocalUseExceptions ) {
   37052          20 :       popErrorHandler();
   37053             :     }
   37054             : #ifndef SED_HACKS
   37055             :     if ( bLocalUseExceptions ) {
   37056             :       CPLErr eclass = CPLGetLastErrorType();
   37057             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37058             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37059             :       }
   37060             :     }
   37061             : #endif
   37062             :   }
   37063          54 :   resultobj = SWIG_Py_Void();
   37064          54 :   {
   37065             :     /* %typemap(python,argout) (double *val, int *hasval) */
   37066          54 :     PyObject *r;
   37067          54 :     if ( !*arg3 ) {
   37068          22 :       Py_INCREF(Py_None);
   37069          22 :       r = Py_None;
   37070          22 :       resultobj = t_output_helper(resultobj,r);
   37071             :     }
   37072             :     else {
   37073          32 :       r = PyFloat_FromDouble( *arg2 );
   37074          32 :       resultobj = t_output_helper(resultobj,r);
   37075             :     }
   37076             :   }
   37077          54 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   37078             :   return resultobj;
   37079             : fail:
   37080             :   return NULL;
   37081             : }
   37082             : 
   37083             : 
   37084          46 : SWIGINTERN PyObject *_wrap_Band_GetMaximum(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37085          46 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37086          46 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   37087          46 :   double *arg2 = (double *) 0 ;
   37088          46 :   int *arg3 = (int *) 0 ;
   37089          46 :   void *argp1 = 0 ;
   37090          46 :   int res1 = 0 ;
   37091          46 :   double tmpval2 ;
   37092          46 :   int tmphasval2 ;
   37093          46 :   PyObject *swig_obj[1] ;
   37094             :   
   37095          46 :   {
   37096             :     /* %typemap(python,in,numinputs=0) (double *val, int *hasval) */
   37097          46 :     arg2 = &tmpval2;
   37098          46 :     arg3 = &tmphasval2;
   37099             :   }
   37100          46 :   if (!args) SWIG_fail;
   37101          46 :   swig_obj[0] = args;
   37102          46 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   37103          46 :   if (!SWIG_IsOK(res1)) {
   37104           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetMaximum" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   37105             :   }
   37106          46 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   37107          46 :   {
   37108          46 :     const int bLocalUseExceptions = GetUseExceptions();
   37109          46 :     if ( bLocalUseExceptions ) {
   37110          16 :       pushErrorHandler();
   37111             :     }
   37112          46 :     {
   37113          46 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37114          46 :       GDALRasterBandShadow_GetMaximum(arg1,arg2,arg3);
   37115          46 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37116             :     }
   37117          46 :     if ( bLocalUseExceptions ) {
   37118          16 :       popErrorHandler();
   37119             :     }
   37120             : #ifndef SED_HACKS
   37121             :     if ( bLocalUseExceptions ) {
   37122             :       CPLErr eclass = CPLGetLastErrorType();
   37123             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37124             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37125             :       }
   37126             :     }
   37127             : #endif
   37128             :   }
   37129          46 :   resultobj = SWIG_Py_Void();
   37130          46 :   {
   37131             :     /* %typemap(python,argout) (double *val, int *hasval) */
   37132          46 :     PyObject *r;
   37133          46 :     if ( !*arg3 ) {
   37134          20 :       Py_INCREF(Py_None);
   37135          20 :       r = Py_None;
   37136          20 :       resultobj = t_output_helper(resultobj,r);
   37137             :     }
   37138             :     else {
   37139          26 :       r = PyFloat_FromDouble( *arg2 );
   37140          26 :       resultobj = t_output_helper(resultobj,r);
   37141             :     }
   37142             :   }
   37143          46 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   37144             :   return resultobj;
   37145             : fail:
   37146             :   return NULL;
   37147             : }
   37148             : 
   37149             : 
   37150         120 : SWIGINTERN PyObject *_wrap_Band_GetOffset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37151         120 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37152         120 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   37153         120 :   double *arg2 = (double *) 0 ;
   37154         120 :   int *arg3 = (int *) 0 ;
   37155         120 :   void *argp1 = 0 ;
   37156         120 :   int res1 = 0 ;
   37157         120 :   double tmpval2 ;
   37158         120 :   int tmphasval2 ;
   37159         120 :   PyObject *swig_obj[1] ;
   37160             :   
   37161         120 :   {
   37162             :     /* %typemap(python,in,numinputs=0) (double *val, int *hasval) */
   37163         120 :     arg2 = &tmpval2;
   37164         120 :     arg3 = &tmphasval2;
   37165             :   }
   37166         120 :   if (!args) SWIG_fail;
   37167         120 :   swig_obj[0] = args;
   37168         120 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   37169         120 :   if (!SWIG_IsOK(res1)) {
   37170           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetOffset" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   37171             :   }
   37172         120 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   37173         120 :   {
   37174         120 :     const int bLocalUseExceptions = GetUseExceptions();
   37175         120 :     if ( bLocalUseExceptions ) {
   37176          67 :       pushErrorHandler();
   37177             :     }
   37178         120 :     {
   37179         120 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37180         120 :       GDALRasterBandShadow_GetOffset(arg1,arg2,arg3);
   37181         120 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37182             :     }
   37183         120 :     if ( bLocalUseExceptions ) {
   37184          67 :       popErrorHandler();
   37185             :     }
   37186             : #ifndef SED_HACKS
   37187             :     if ( bLocalUseExceptions ) {
   37188             :       CPLErr eclass = CPLGetLastErrorType();
   37189             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37190             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37191             :       }
   37192             :     }
   37193             : #endif
   37194             :   }
   37195         120 :   resultobj = SWIG_Py_Void();
   37196         120 :   {
   37197             :     /* %typemap(python,argout) (double *val, int *hasval) */
   37198         120 :     PyObject *r;
   37199         120 :     if ( !*arg3 ) {
   37200          46 :       Py_INCREF(Py_None);
   37201          46 :       r = Py_None;
   37202          46 :       resultobj = t_output_helper(resultobj,r);
   37203             :     }
   37204             :     else {
   37205          74 :       r = PyFloat_FromDouble( *arg2 );
   37206          74 :       resultobj = t_output_helper(resultobj,r);
   37207             :     }
   37208             :   }
   37209         120 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   37210             :   return resultobj;
   37211             : fail:
   37212             :   return NULL;
   37213             : }
   37214             : 
   37215             : 
   37216         119 : SWIGINTERN PyObject *_wrap_Band_GetScale(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37217         119 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37218         119 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   37219         119 :   double *arg2 = (double *) 0 ;
   37220         119 :   int *arg3 = (int *) 0 ;
   37221         119 :   void *argp1 = 0 ;
   37222         119 :   int res1 = 0 ;
   37223         119 :   double tmpval2 ;
   37224         119 :   int tmphasval2 ;
   37225         119 :   PyObject *swig_obj[1] ;
   37226             :   
   37227         119 :   {
   37228             :     /* %typemap(python,in,numinputs=0) (double *val, int *hasval) */
   37229         119 :     arg2 = &tmpval2;
   37230         119 :     arg3 = &tmphasval2;
   37231             :   }
   37232         119 :   if (!args) SWIG_fail;
   37233         119 :   swig_obj[0] = args;
   37234         119 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   37235         119 :   if (!SWIG_IsOK(res1)) {
   37236           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetScale" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   37237             :   }
   37238         119 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   37239         119 :   {
   37240         119 :     const int bLocalUseExceptions = GetUseExceptions();
   37241         119 :     if ( bLocalUseExceptions ) {
   37242          67 :       pushErrorHandler();
   37243             :     }
   37244         119 :     {
   37245         119 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37246         119 :       GDALRasterBandShadow_GetScale(arg1,arg2,arg3);
   37247         119 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37248             :     }
   37249         119 :     if ( bLocalUseExceptions ) {
   37250          67 :       popErrorHandler();
   37251             :     }
   37252             : #ifndef SED_HACKS
   37253             :     if ( bLocalUseExceptions ) {
   37254             :       CPLErr eclass = CPLGetLastErrorType();
   37255             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37256             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37257             :       }
   37258             :     }
   37259             : #endif
   37260             :   }
   37261         119 :   resultobj = SWIG_Py_Void();
   37262         119 :   {
   37263             :     /* %typemap(python,argout) (double *val, int *hasval) */
   37264         119 :     PyObject *r;
   37265         119 :     if ( !*arg3 ) {
   37266          46 :       Py_INCREF(Py_None);
   37267          46 :       r = Py_None;
   37268          46 :       resultobj = t_output_helper(resultobj,r);
   37269             :     }
   37270             :     else {
   37271          73 :       r = PyFloat_FromDouble( *arg2 );
   37272          73 :       resultobj = t_output_helper(resultobj,r);
   37273             :     }
   37274             :   }
   37275         119 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   37276             :   return resultobj;
   37277             : fail:
   37278             :   return NULL;
   37279             : }
   37280             : 
   37281             : 
   37282          41 : SWIGINTERN PyObject *_wrap_Band_SetOffset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37283          41 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37284          41 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   37285          41 :   double arg2 ;
   37286          41 :   void *argp1 = 0 ;
   37287          41 :   int res1 = 0 ;
   37288          41 :   double val2 ;
   37289          41 :   int ecode2 = 0 ;
   37290          41 :   PyObject *swig_obj[2] ;
   37291          41 :   CPLErr result;
   37292             :   
   37293          41 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetOffset", 2, 2, swig_obj)) SWIG_fail;
   37294          41 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   37295          41 :   if (!SWIG_IsOK(res1)) {
   37296           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetOffset" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   37297             :   }
   37298          41 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   37299          41 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   37300          41 :   if (!SWIG_IsOK(ecode2)) {
   37301           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_SetOffset" "', argument " "2"" of type '" "double""'");
   37302             :   } 
   37303          41 :   arg2 = static_cast< double >(val2);
   37304          41 :   {
   37305          41 :     const int bLocalUseExceptions = GetUseExceptions();
   37306          41 :     if ( bLocalUseExceptions ) {
   37307          30 :       pushErrorHandler();
   37308             :     }
   37309          41 :     {
   37310          41 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37311          41 :       CPL_IGNORE_RET_VAL(result = (CPLErr)GDALRasterBandShadow_SetOffset(arg1,arg2));
   37312          41 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37313             :     }
   37314          41 :     if ( bLocalUseExceptions ) {
   37315          30 :       popErrorHandler();
   37316             :     }
   37317             : #ifndef SED_HACKS
   37318             :     if ( bLocalUseExceptions ) {
   37319             :       CPLErr eclass = CPLGetLastErrorType();
   37320             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37321             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37322             :       }
   37323             :     }
   37324             : #endif
   37325             :   }
   37326          41 :   resultobj = SWIG_From_int(static_cast< int >(result));
   37327          41 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   37328             :   return resultobj;
   37329             : fail:
   37330             :   return NULL;
   37331             : }
   37332             : 
   37333             : 
   37334          42 : SWIGINTERN PyObject *_wrap_Band_SetScale(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37335          42 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37336          42 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   37337          42 :   double arg2 ;
   37338          42 :   void *argp1 = 0 ;
   37339          42 :   int res1 = 0 ;
   37340          42 :   double val2 ;
   37341          42 :   int ecode2 = 0 ;
   37342          42 :   PyObject *swig_obj[2] ;
   37343          42 :   CPLErr result;
   37344             :   
   37345          42 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetScale", 2, 2, swig_obj)) SWIG_fail;
   37346          42 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   37347          42 :   if (!SWIG_IsOK(res1)) {
   37348           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetScale" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   37349             :   }
   37350          42 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   37351          42 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   37352          42 :   if (!SWIG_IsOK(ecode2)) {
   37353           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_SetScale" "', argument " "2"" of type '" "double""'");
   37354             :   } 
   37355          42 :   arg2 = static_cast< double >(val2);
   37356          42 :   {
   37357          42 :     const int bLocalUseExceptions = GetUseExceptions();
   37358          42 :     if ( bLocalUseExceptions ) {
   37359          30 :       pushErrorHandler();
   37360             :     }
   37361          42 :     {
   37362          42 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37363          42 :       CPL_IGNORE_RET_VAL(result = (CPLErr)GDALRasterBandShadow_SetScale(arg1,arg2));
   37364          42 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37365             :     }
   37366          42 :     if ( bLocalUseExceptions ) {
   37367          30 :       popErrorHandler();
   37368             :     }
   37369             : #ifndef SED_HACKS
   37370             :     if ( bLocalUseExceptions ) {
   37371             :       CPLErr eclass = CPLGetLastErrorType();
   37372             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37373             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37374             :       }
   37375             :     }
   37376             : #endif
   37377             :   }
   37378          42 :   resultobj = SWIG_From_int(static_cast< int >(result));
   37379          42 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   37380             :   return resultobj;
   37381             : fail:
   37382             :   return NULL;
   37383             : }
   37384             : 
   37385             : 
   37386         109 : SWIGINTERN PyObject *_wrap_Band_GetStatistics(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37387         109 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37388         109 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   37389         109 :   int arg2 ;
   37390         109 :   int arg3 ;
   37391         109 :   double *arg4 = (double *) 0 ;
   37392         109 :   double *arg5 = (double *) 0 ;
   37393         109 :   double *arg6 = (double *) 0 ;
   37394         109 :   double *arg7 = (double *) 0 ;
   37395         109 :   void *argp1 = 0 ;
   37396         109 :   int res1 = 0 ;
   37397         109 :   int val2 ;
   37398         109 :   int ecode2 = 0 ;
   37399         109 :   int val3 ;
   37400         109 :   int ecode3 = 0 ;
   37401         109 :   double temp4 ;
   37402         109 :   int res4 = SWIG_TMPOBJ ;
   37403         109 :   double temp5 ;
   37404         109 :   int res5 = SWIG_TMPOBJ ;
   37405         109 :   double temp6 ;
   37406         109 :   int res6 = SWIG_TMPOBJ ;
   37407         109 :   double temp7 ;
   37408         109 :   int res7 = SWIG_TMPOBJ ;
   37409         109 :   PyObject *swig_obj[3] ;
   37410         109 :   CPLErr result;
   37411             :   
   37412         109 :   arg4 = &temp4;
   37413         109 :   arg5 = &temp5;
   37414         109 :   arg6 = &temp6;
   37415         109 :   arg7 = &temp7;
   37416         109 :   if (!SWIG_Python_UnpackTuple(args, "Band_GetStatistics", 3, 3, swig_obj)) SWIG_fail;
   37417         109 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   37418         109 :   if (!SWIG_IsOK(res1)) {
   37419           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetStatistics" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   37420             :   }
   37421         109 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   37422         109 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   37423         109 :   if (!SWIG_IsOK(ecode2)) {
   37424           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_GetStatistics" "', argument " "2"" of type '" "int""'");
   37425             :   } 
   37426         109 :   arg2 = static_cast< int >(val2);
   37427         109 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   37428         109 :   if (!SWIG_IsOK(ecode3)) {
   37429           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_GetStatistics" "', argument " "3"" of type '" "int""'");
   37430             :   } 
   37431         109 :   arg3 = static_cast< int >(val3);
   37432         109 :   {
   37433         109 :     const int bLocalUseExceptions = GetUseExceptions();
   37434         109 :     if ( bLocalUseExceptions ) {
   37435          80 :       pushErrorHandler();
   37436             :     }
   37437         109 :     {
   37438         109 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37439         109 :       CPL_IGNORE_RET_VAL(result = (CPLErr)GDALRasterBandShadow_GetStatistics(arg1,arg2,arg3,arg4,arg5,arg6,arg7));
   37440         109 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37441             :     }
   37442         109 :     if ( bLocalUseExceptions ) {
   37443          80 :       popErrorHandler();
   37444             :     }
   37445             : #ifndef SED_HACKS
   37446             :     if ( bLocalUseExceptions ) {
   37447             :       CPLErr eclass = CPLGetLastErrorType();
   37448             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37449             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37450             :       }
   37451             :     }
   37452             : #endif
   37453             :   }
   37454         109 :   {
   37455             :     /* %typemap(out) IF_ERROR_RETURN_NONE */
   37456             :   }
   37457         109 :   if (ReturnSame(SWIG_IsTmpObj(res4))) {
   37458         109 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
   37459             :   } else {
   37460           0 :     int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   37461           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
   37462             :   }
   37463         109 :   if (ReturnSame(SWIG_IsTmpObj(res5))) {
   37464         109 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)));
   37465             :   } else {
   37466           0 :     int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   37467           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags));
   37468             :   }
   37469         109 :   if (ReturnSame(SWIG_IsTmpObj(res6))) {
   37470         109 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6)));
   37471             :   } else {
   37472           0 :     int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   37473           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags));
   37474             :   }
   37475         109 :   if (ReturnSame(SWIG_IsTmpObj(res7))) {
   37476         109 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg7)));
   37477             :   } else {
   37478           0 :     int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   37479           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_double, new_flags));
   37480             :   }
   37481         111 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   37482             :   return resultobj;
   37483             : fail:
   37484             :   return NULL;
   37485             : }
   37486             : 
   37487             : 
   37488         137 : SWIGINTERN PyObject *_wrap_Band_ComputeStatistics(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   37489         137 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37490         137 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   37491         137 :   bool arg2 ;
   37492         137 :   double *arg3 = (double *) 0 ;
   37493         137 :   double *arg4 = (double *) 0 ;
   37494         137 :   double *arg5 = (double *) 0 ;
   37495         137 :   double *arg6 = (double *) 0 ;
   37496         137 :   GDALProgressFunc arg7 = (GDALProgressFunc) NULL ;
   37497         137 :   void *arg8 = (void *) NULL ;
   37498         137 :   void *argp1 = 0 ;
   37499         137 :   int res1 = 0 ;
   37500         137 :   bool val2 ;
   37501         137 :   int ecode2 = 0 ;
   37502         137 :   double temp3 ;
   37503         137 :   int res3 = SWIG_TMPOBJ ;
   37504         137 :   double temp4 ;
   37505         137 :   int res4 = SWIG_TMPOBJ ;
   37506         137 :   double temp5 ;
   37507         137 :   int res5 = SWIG_TMPOBJ ;
   37508         137 :   double temp6 ;
   37509         137 :   int res6 = SWIG_TMPOBJ ;
   37510         137 :   PyObject * obj0 = 0 ;
   37511         137 :   PyObject * obj1 = 0 ;
   37512         137 :   PyObject * obj2 = 0 ;
   37513         137 :   PyObject * obj3 = 0 ;
   37514         137 :   char * kwnames[] = {
   37515             :     (char *)"self",  (char *)"approx_ok",  (char *)"callback",  (char *)"callback_data",  NULL 
   37516             :   };
   37517         137 :   CPLErr result;
   37518             :   
   37519             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   37520         137 :   PyProgressData *psProgressInfo;
   37521         137 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   37522         137 :   psProgressInfo->nLastReported = -1;
   37523         137 :   psProgressInfo->psPyCallback = NULL;
   37524         137 :   psProgressInfo->psPyCallbackData = NULL;
   37525         137 :   arg8 = psProgressInfo;
   37526         137 :   arg3 = &temp3;
   37527         137 :   arg4 = &temp4;
   37528         137 :   arg5 = &temp5;
   37529         137 :   arg6 = &temp6;
   37530         137 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OO:Band_ComputeStatistics", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
   37531         137 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   37532         137 :   if (!SWIG_IsOK(res1)) {
   37533           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_ComputeStatistics" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   37534             :   }
   37535         137 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   37536         137 :   ecode2 = SWIG_AsVal_bool(obj1, &val2);
   37537         137 :   if (!SWIG_IsOK(ecode2)) {
   37538           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_ComputeStatistics" "', argument " "2"" of type '" "bool""'");
   37539             :   } 
   37540         137 :   arg2 = static_cast< bool >(val2);
   37541         137 :   if (obj2) {
   37542           3 :     {
   37543             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   37544             :       /* callback_func typemap */
   37545             :       
   37546             :       /* In some cases 0 is passed instead of None. */
   37547             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   37548           3 :       if ( PyLong_Check(obj2) || PyInt_Check(obj2) )
   37549             :       {
   37550           0 :         if( PyLong_AsLong(obj2) == 0 )
   37551             :         {
   37552           0 :           obj2 = Py_None;
   37553             :         }
   37554             :       }
   37555             :       
   37556           3 :       if (obj2 && obj2 != Py_None ) {
   37557           3 :         void* cbfunction = NULL;
   37558           3 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj2,
   37559             :             (void**)&cbfunction,
   37560             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   37561             :             SWIG_POINTER_EXCEPTION | 0 ));
   37562             :         
   37563           3 :         if ( cbfunction == GDALTermProgress ) {
   37564             :           arg7 = GDALTermProgress;
   37565             :         } else {
   37566           3 :           if (!PyCallable_Check(obj2)) {
   37567           0 :             PyErr_SetString( PyExc_RuntimeError,
   37568             :               "Object given is not a Python function" );
   37569           0 :             SWIG_fail;
   37570             :           }
   37571           3 :           psProgressInfo->psPyCallback = obj2;
   37572           3 :           arg7 = PyProgressProxy;
   37573             :         }
   37574             :         
   37575             :       }
   37576             :       
   37577             :     }
   37578             :   }
   37579         137 :   if (obj3) {
   37580           3 :     {
   37581             :       /* %typemap(in) ( void* callback_data=NULL)  */
   37582           3 :       psProgressInfo->psPyCallbackData = obj3 ;
   37583             :     }
   37584             :   }
   37585         137 :   {
   37586         137 :     const int bLocalUseExceptions = GetUseExceptions();
   37587         137 :     if ( bLocalUseExceptions ) {
   37588          53 :       pushErrorHandler();
   37589             :     }
   37590         137 :     {
   37591         137 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37592         137 :       CPL_IGNORE_RET_VAL(result = (CPLErr)GDALRasterBandShadow_ComputeStatistics(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8));
   37593         137 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37594             :     }
   37595         137 :     if ( bLocalUseExceptions ) {
   37596          53 :       popErrorHandler();
   37597             :     }
   37598             : #ifndef SED_HACKS
   37599             :     if ( bLocalUseExceptions ) {
   37600             :       CPLErr eclass = CPLGetLastErrorType();
   37601             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37602             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37603             :       }
   37604             :     }
   37605             : #endif
   37606             :   }
   37607         137 :   {
   37608             :     /* %typemap(out) IF_ERROR_RETURN_NONE */
   37609             :   }
   37610         137 :   if (ReturnSame(SWIG_IsTmpObj(res3))) {
   37611         137 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3)));
   37612             :   } else {
   37613           0 :     int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   37614           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags));
   37615             :   }
   37616         137 :   if (ReturnSame(SWIG_IsTmpObj(res4))) {
   37617         137 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
   37618             :   } else {
   37619           0 :     int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   37620           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
   37621             :   }
   37622         137 :   if (ReturnSame(SWIG_IsTmpObj(res5))) {
   37623         137 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)));
   37624             :   } else {
   37625           0 :     int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   37626           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags));
   37627             :   }
   37628         137 :   if (ReturnSame(SWIG_IsTmpObj(res6))) {
   37629         137 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6)));
   37630             :   } else {
   37631           0 :     int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   37632           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags));
   37633             :   }
   37634         137 :   {
   37635             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   37636             :     
   37637         137 :     CPLFree(psProgressInfo);
   37638             :     
   37639             :   }
   37640         137 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   37641             :   return resultobj;
   37642           0 : fail:
   37643           0 :   {
   37644             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   37645             :     
   37646           0 :     CPLFree(psProgressInfo);
   37647             :     
   37648             :   }
   37649             :   return NULL;
   37650             : }
   37651             : 
   37652             : 
   37653           2 : SWIGINTERN PyObject *_wrap_Band_SetStatistics(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37654           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37655           2 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   37656           2 :   double arg2 ;
   37657           2 :   double arg3 ;
   37658           2 :   double arg4 ;
   37659           2 :   double arg5 ;
   37660           2 :   void *argp1 = 0 ;
   37661           2 :   int res1 = 0 ;
   37662           2 :   double val2 ;
   37663           2 :   int ecode2 = 0 ;
   37664           2 :   double val3 ;
   37665           2 :   int ecode3 = 0 ;
   37666           2 :   double val4 ;
   37667           2 :   int ecode4 = 0 ;
   37668           2 :   double val5 ;
   37669           2 :   int ecode5 = 0 ;
   37670           2 :   PyObject *swig_obj[5] ;
   37671           2 :   CPLErr result;
   37672             :   
   37673           2 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetStatistics", 5, 5, swig_obj)) SWIG_fail;
   37674           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   37675           2 :   if (!SWIG_IsOK(res1)) {
   37676           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetStatistics" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   37677             :   }
   37678           2 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   37679           2 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   37680           2 :   if (!SWIG_IsOK(ecode2)) {
   37681           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_SetStatistics" "', argument " "2"" of type '" "double""'");
   37682             :   } 
   37683           2 :   arg2 = static_cast< double >(val2);
   37684           2 :   ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
   37685           2 :   if (!SWIG_IsOK(ecode3)) {
   37686           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_SetStatistics" "', argument " "3"" of type '" "double""'");
   37687             :   } 
   37688           2 :   arg3 = static_cast< double >(val3);
   37689           2 :   ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
   37690           2 :   if (!SWIG_IsOK(ecode4)) {
   37691           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Band_SetStatistics" "', argument " "4"" of type '" "double""'");
   37692             :   } 
   37693           2 :   arg4 = static_cast< double >(val4);
   37694           2 :   ecode5 = SWIG_AsVal_double(swig_obj[4], &val5);
   37695           2 :   if (!SWIG_IsOK(ecode5)) {
   37696           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Band_SetStatistics" "', argument " "5"" of type '" "double""'");
   37697             :   } 
   37698           2 :   arg5 = static_cast< double >(val5);
   37699           2 :   {
   37700           2 :     const int bLocalUseExceptions = GetUseExceptions();
   37701           2 :     if ( bLocalUseExceptions ) {
   37702           2 :       pushErrorHandler();
   37703             :     }
   37704           2 :     {
   37705           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37706           2 :       CPL_IGNORE_RET_VAL(result = (CPLErr)GDALRasterBandShadow_SetStatistics(arg1,arg2,arg3,arg4,arg5));
   37707           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37708             :     }
   37709           2 :     if ( bLocalUseExceptions ) {
   37710           2 :       popErrorHandler();
   37711             :     }
   37712             : #ifndef SED_HACKS
   37713             :     if ( bLocalUseExceptions ) {
   37714             :       CPLErr eclass = CPLGetLastErrorType();
   37715             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37716             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37717             :       }
   37718             :     }
   37719             : #endif
   37720             :   }
   37721           2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   37722           2 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   37723             :   return resultobj;
   37724             : fail:
   37725             :   return NULL;
   37726             : }
   37727             : 
   37728             : 
   37729         475 : SWIGINTERN PyObject *_wrap_Band_GetOverviewCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37730         475 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37731         475 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   37732         475 :   void *argp1 = 0 ;
   37733         475 :   int res1 = 0 ;
   37734         475 :   PyObject *swig_obj[1] ;
   37735         475 :   int result;
   37736             :   
   37737         475 :   if (!args) SWIG_fail;
   37738         475 :   swig_obj[0] = args;
   37739         475 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   37740         475 :   if (!SWIG_IsOK(res1)) {
   37741           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetOverviewCount" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   37742             :   }
   37743         475 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   37744         475 :   {
   37745         475 :     const int bLocalUseExceptions = GetUseExceptions();
   37746         475 :     if ( bLocalUseExceptions ) {
   37747         283 :       pushErrorHandler();
   37748             :     }
   37749         475 :     {
   37750         475 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37751         475 :       result = (int)GDALRasterBandShadow_GetOverviewCount(arg1);
   37752         475 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37753             :     }
   37754         475 :     if ( bLocalUseExceptions ) {
   37755         283 :       popErrorHandler();
   37756             :     }
   37757             : #ifndef SED_HACKS
   37758             :     if ( bLocalUseExceptions ) {
   37759             :       CPLErr eclass = CPLGetLastErrorType();
   37760             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37761             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37762             :       }
   37763             :     }
   37764             : #endif
   37765             :   }
   37766         475 :   resultobj = SWIG_From_int(static_cast< int >(result));
   37767         480 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   37768             :   return resultobj;
   37769             : fail:
   37770             :   return NULL;
   37771             : }
   37772             : 
   37773             : 
   37774        1326 : SWIGINTERN PyObject *_wrap_Band_GetOverview(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37775        1326 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37776        1326 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   37777        1326 :   int arg2 ;
   37778        1326 :   void *argp1 = 0 ;
   37779        1326 :   int res1 = 0 ;
   37780        1326 :   int val2 ;
   37781        1326 :   int ecode2 = 0 ;
   37782        1326 :   PyObject *swig_obj[2] ;
   37783        1326 :   GDALRasterBandShadow *result = 0 ;
   37784             :   
   37785        1326 :   if (!SWIG_Python_UnpackTuple(args, "Band_GetOverview", 2, 2, swig_obj)) SWIG_fail;
   37786        1326 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   37787        1326 :   if (!SWIG_IsOK(res1)) {
   37788           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetOverview" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   37789             :   }
   37790        1326 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   37791        1326 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   37792        1326 :   if (!SWIG_IsOK(ecode2)) {
   37793           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_GetOverview" "', argument " "2"" of type '" "int""'");
   37794             :   } 
   37795        1326 :   arg2 = static_cast< int >(val2);
   37796        1326 :   {
   37797        1326 :     const int bLocalUseExceptions = GetUseExceptions();
   37798        1326 :     if ( bLocalUseExceptions ) {
   37799         326 :       pushErrorHandler();
   37800             :     }
   37801        1326 :     {
   37802        1326 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37803        1326 :       result = (GDALRasterBandShadow *)GDALRasterBandShadow_GetOverview(arg1,arg2);
   37804        1326 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37805             :     }
   37806        1326 :     if ( bLocalUseExceptions ) {
   37807         326 :       popErrorHandler();
   37808             :     }
   37809             : #ifndef SED_HACKS
   37810             :     if ( bLocalUseExceptions ) {
   37811             :       CPLErr eclass = CPLGetLastErrorType();
   37812             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37813             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37814             :       }
   37815             :     }
   37816             : #endif
   37817             :   }
   37818        1326 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   37819        1327 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   37820             :   return resultobj;
   37821             : fail:
   37822             :   return NULL;
   37823             : }
   37824             : 
   37825             : 
   37826        8896 : SWIGINTERN PyObject *_wrap_Band_Checksum(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   37827        8896 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37828        8896 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   37829        8896 :   int arg2 = (int) 0 ;
   37830        8896 :   int arg3 = (int) 0 ;
   37831        8896 :   int *arg4 = (int *) 0 ;
   37832        8896 :   int *arg5 = (int *) 0 ;
   37833        8896 :   void *argp1 = 0 ;
   37834        8896 :   int res1 = 0 ;
   37835        8896 :   int val2 ;
   37836        8896 :   int ecode2 = 0 ;
   37837        8896 :   int val3 ;
   37838        8896 :   int ecode3 = 0 ;
   37839        8896 :   int val4 ;
   37840        8896 :   int val5 ;
   37841        8896 :   PyObject * obj0 = 0 ;
   37842        8896 :   PyObject * obj1 = 0 ;
   37843        8896 :   PyObject * obj2 = 0 ;
   37844        8896 :   PyObject * obj3 = 0 ;
   37845        8896 :   PyObject * obj4 = 0 ;
   37846        8896 :   char * kwnames[] = {
   37847             :     (char *)"self",  (char *)"xoff",  (char *)"yoff",  (char *)"xsize",  (char *)"ysize",  NULL 
   37848             :   };
   37849        8896 :   int result;
   37850             :   
   37851        8896 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OOOO:Band_Checksum", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
   37852        8896 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   37853        8896 :   if (!SWIG_IsOK(res1)) {
   37854          10 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_Checksum" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   37855             :   }
   37856        8891 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   37857        8891 :   if (obj1) {
   37858         373 :     ecode2 = SWIG_AsVal_int(obj1, &val2);
   37859         373 :     if (!SWIG_IsOK(ecode2)) {
   37860           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_Checksum" "', argument " "2"" of type '" "int""'");
   37861             :     } 
   37862             :     arg2 = static_cast< int >(val2);
   37863             :   }
   37864        8891 :   if (obj2) {
   37865         373 :     ecode3 = SWIG_AsVal_int(obj2, &val3);
   37866         373 :     if (!SWIG_IsOK(ecode3)) {
   37867           0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_Checksum" "', argument " "3"" of type '" "int""'");
   37868             :     } 
   37869             :     arg3 = static_cast< int >(val3);
   37870             :   }
   37871        8891 :   if (obj3) {
   37872         373 :     {
   37873             :       /* %typemap(in) (int *optional_##int) */
   37874         373 :       if ( obj3 == Py_None ) {
   37875             :         arg4 = 0;
   37876             :       }
   37877         373 :       else if ( PyArg_Parse( obj3,"i" ,&val4 ) ) {
   37878             :         arg4 = (int *) &val4;
   37879             :       }
   37880             :       else {
   37881           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   37882           0 :         SWIG_fail;
   37883             :       }
   37884             :     }
   37885             :   }
   37886        8891 :   if (obj4) {
   37887         373 :     {
   37888             :       /* %typemap(in) (int *optional_##int) */
   37889         373 :       if ( obj4 == Py_None ) {
   37890             :         arg5 = 0;
   37891             :       }
   37892         373 :       else if ( PyArg_Parse( obj4,"i" ,&val5 ) ) {
   37893             :         arg5 = (int *) &val5;
   37894             :       }
   37895             :       else {
   37896           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   37897           0 :         SWIG_fail;
   37898             :       }
   37899             :     }
   37900             :   }
   37901        8891 :   {
   37902        8891 :     const int bLocalUseExceptions = GetUseExceptions();
   37903        8891 :     if ( bLocalUseExceptions ) {
   37904        5344 :       pushErrorHandler();
   37905             :     }
   37906        8891 :     {
   37907        8891 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37908        8891 :       result = (int)GDALRasterBandShadow_Checksum(arg1,arg2,arg3,arg4,arg5);
   37909        8891 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37910             :     }
   37911        8891 :     if ( bLocalUseExceptions ) {
   37912        5344 :       popErrorHandler();
   37913             :     }
   37914             : #ifndef SED_HACKS
   37915             :     if ( bLocalUseExceptions ) {
   37916             :       CPLErr eclass = CPLGetLastErrorType();
   37917             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37918             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37919             :       }
   37920             :     }
   37921             : #endif
   37922             :   }
   37923        8891 :   resultobj = SWIG_From_int(static_cast< int >(result));
   37924        8943 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   37925             :   return resultobj;
   37926             : fail:
   37927             :   return NULL;
   37928             : }
   37929             : 
   37930             : 
   37931        1369 : SWIGINTERN PyObject *_wrap_Band_ComputeRasterMinMax(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   37932        1369 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37933        1369 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   37934        1369 :   double *arg2 ;
   37935        1369 :   int *arg3 = (int *) 0 ;
   37936        1369 :   bool arg4 = (bool) false ;
   37937        1369 :   bool arg5 = (bool) false ;
   37938        1369 :   void *argp1 = 0 ;
   37939        1369 :   int res1 = 0 ;
   37940        1369 :   double argout2[2] ;
   37941        1369 :   int isvalid2 ;
   37942        1369 :   bool val4 ;
   37943        1369 :   int ecode4 = 0 ;
   37944        1369 :   bool val5 ;
   37945        1369 :   int ecode5 = 0 ;
   37946        1369 :   PyObject * obj0 = 0 ;
   37947        1369 :   PyObject * obj1 = 0 ;
   37948        1369 :   PyObject * obj2 = 0 ;
   37949        1369 :   char * kwnames[] = {
   37950             :     (char *)"self",  (char *)"approx_ok",  (char *)"can_return_none",  NULL 
   37951             :   };
   37952             :   
   37953        1369 :   {
   37954             :     /* %typemap(in,numinputs=0) (double argout2[2], int* isvalid2) */
   37955        1369 :     arg2 = argout2;
   37956        1369 :     arg3 = &isvalid2;
   37957             :   }
   37958        1369 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OO:Band_ComputeRasterMinMax", kwnames, &obj0, &obj1, &obj2)) SWIG_fail;
   37959        1369 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   37960        1369 :   if (!SWIG_IsOK(res1)) {
   37961           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_ComputeRasterMinMax" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   37962             :   }
   37963        1369 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   37964        1369 :   if (obj1) {
   37965          74 :     ecode4 = SWIG_AsVal_bool(obj1, &val4);
   37966          74 :     if (!SWIG_IsOK(ecode4)) {
   37967           0 :       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Band_ComputeRasterMinMax" "', argument " "4"" of type '" "bool""'");
   37968             :     } 
   37969             :     arg4 = static_cast< bool >(val4);
   37970             :   }
   37971        1369 :   if (obj2) {
   37972           2 :     ecode5 = SWIG_AsVal_bool(obj2, &val5);
   37973           2 :     if (!SWIG_IsOK(ecode5)) {
   37974           0 :       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Band_ComputeRasterMinMax" "', argument " "5"" of type '" "bool""'");
   37975             :     } 
   37976             :     arg5 = static_cast< bool >(val5);
   37977             :   }
   37978        1369 :   {
   37979        1369 :     const int bLocalUseExceptions = GetUseExceptions();
   37980        1369 :     if ( bLocalUseExceptions ) {
   37981         879 :       pushErrorHandler();
   37982             :     }
   37983        1369 :     {
   37984        1369 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37985        1369 :       GDALRasterBandShadow_ComputeRasterMinMax(arg1,arg2,arg3,arg4,arg5);
   37986        1369 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37987             :     }
   37988        1369 :     if ( bLocalUseExceptions ) {
   37989         879 :       popErrorHandler();
   37990             :     }
   37991             : #ifndef SED_HACKS
   37992             :     if ( bLocalUseExceptions ) {
   37993             :       CPLErr eclass = CPLGetLastErrorType();
   37994             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37995             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37996             :       }
   37997             :     }
   37998             : #endif
   37999             :   }
   38000        1369 :   resultobj = SWIG_Py_Void();
   38001        1369 :   {
   38002             :     /* %typemap(argout) (double argout[2], int* isvalid)  */
   38003        1369 :     PyObject *r;
   38004        1369 :     if ( !*arg3 ) {
   38005           2 :       Py_INCREF(Py_None);
   38006           2 :       r = Py_None;
   38007             :     }
   38008             :     else {
   38009        1367 :       r = CreateTupleFromDoubleArray(arg2, 2);
   38010             :     }
   38011        1369 :     resultobj = t_output_helper(resultobj,r);
   38012             :   }
   38013        1372 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   38014             :   return resultobj;
   38015             : fail:
   38016             :   return NULL;
   38017             : }
   38018             : 
   38019             : 
   38020          16 : SWIGINTERN PyObject *_wrap_Band_ComputeBandStats(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38021          16 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38022          16 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   38023          16 :   double *arg2 ;
   38024          16 :   int arg3 = (int) 1 ;
   38025          16 :   void *argp1 = 0 ;
   38026          16 :   int res1 = 0 ;
   38027          16 :   double argout2[2] ;
   38028          16 :   int val3 ;
   38029          16 :   int ecode3 = 0 ;
   38030          16 :   PyObject *swig_obj[2] ;
   38031             :   
   38032          16 :   {
   38033             :     /* %typemap(in,numinputs=0) (double argout2[ANY]) */
   38034          16 :     memset(argout2, 0, sizeof(argout2));
   38035          16 :     arg2 = argout2;
   38036             :   }
   38037          16 :   if (!SWIG_Python_UnpackTuple(args, "Band_ComputeBandStats", 1, 2, swig_obj)) SWIG_fail;
   38038          16 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   38039          16 :   if (!SWIG_IsOK(res1)) {
   38040           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_ComputeBandStats" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   38041             :   }
   38042          16 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   38043          16 :   if (swig_obj[1]) {
   38044           0 :     ecode3 = SWIG_AsVal_int(swig_obj[1], &val3);
   38045           0 :     if (!SWIG_IsOK(ecode3)) {
   38046           0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_ComputeBandStats" "', argument " "3"" of type '" "int""'");
   38047             :     } 
   38048             :     arg3 = static_cast< int >(val3);
   38049             :   }
   38050          16 :   {
   38051          16 :     const int bLocalUseExceptions = GetUseExceptions();
   38052          16 :     if ( bLocalUseExceptions ) {
   38053           9 :       pushErrorHandler();
   38054             :     }
   38055          16 :     {
   38056          16 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38057          16 :       GDALRasterBandShadow_ComputeBandStats(arg1,arg2,arg3);
   38058          16 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38059             :     }
   38060          16 :     if ( bLocalUseExceptions ) {
   38061           9 :       popErrorHandler();
   38062             :     }
   38063             : #ifndef SED_HACKS
   38064             :     if ( bLocalUseExceptions ) {
   38065             :       CPLErr eclass = CPLGetLastErrorType();
   38066             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38067             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38068             :       }
   38069             :     }
   38070             : #endif
   38071             :   }
   38072          16 :   resultobj = SWIG_Py_Void();
   38073          16 :   {
   38074             :     /* %typemap(argout) (double argout[ANY]) */
   38075          16 :     PyObject *out = CreateTupleFromDoubleArray( arg2, 2 );
   38076          16 :     resultobj = t_output_helper(resultobj,out);
   38077             :   }
   38078          16 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   38079             :   return resultobj;
   38080             : fail:
   38081             :   return NULL;
   38082             : }
   38083             : 
   38084             : 
   38085      169085 : SWIGINTERN PyObject *_wrap_Band_Fill(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38086      169085 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38087      169085 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   38088      169085 :   double arg2 ;
   38089      169085 :   double arg3 = (double) 0.0 ;
   38090      169085 :   void *argp1 = 0 ;
   38091      169085 :   int res1 = 0 ;
   38092      169085 :   double val2 ;
   38093      169085 :   int ecode2 = 0 ;
   38094      169085 :   double val3 ;
   38095      169085 :   int ecode3 = 0 ;
   38096      169085 :   PyObject *swig_obj[3] ;
   38097      169085 :   CPLErr result;
   38098             :   
   38099      169085 :   if (!SWIG_Python_UnpackTuple(args, "Band_Fill", 2, 3, swig_obj)) SWIG_fail;
   38100      169085 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   38101      169085 :   if (!SWIG_IsOK(res1)) {
   38102           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_Fill" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   38103             :   }
   38104      169085 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   38105      169085 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   38106      169085 :   if (!SWIG_IsOK(ecode2)) {
   38107           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_Fill" "', argument " "2"" of type '" "double""'");
   38108             :   } 
   38109      169085 :   arg2 = static_cast< double >(val2);
   38110      169085 :   if (swig_obj[2]) {
   38111         266 :     ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
   38112         266 :     if (!SWIG_IsOK(ecode3)) {
   38113           0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_Fill" "', argument " "3"" of type '" "double""'");
   38114             :     } 
   38115         266 :     arg3 = static_cast< double >(val3);
   38116             :   }
   38117      169085 :   {
   38118      169085 :     const int bLocalUseExceptions = GetUseExceptions();
   38119      169085 :     if ( bLocalUseExceptions ) {
   38120         799 :       pushErrorHandler();
   38121             :     }
   38122      169085 :     {
   38123      169085 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38124      169085 :       CPL_IGNORE_RET_VAL(result = (CPLErr)GDALRasterBandShadow_Fill(arg1,arg2,arg3));
   38125      169085 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38126             :     }
   38127      169085 :     if ( bLocalUseExceptions ) {
   38128         799 :       popErrorHandler();
   38129             :     }
   38130             : #ifndef SED_HACKS
   38131             :     if ( bLocalUseExceptions ) {
   38132             :       CPLErr eclass = CPLGetLastErrorType();
   38133             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38134             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38135             :       }
   38136             :     }
   38137             : #endif
   38138             :   }
   38139      169085 :   resultobj = SWIG_From_int(static_cast< int >(result));
   38140      169085 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   38141             :   return resultobj;
   38142             : fail:
   38143             :   return NULL;
   38144             : }
   38145             : 
   38146             : 
   38147        8724 : SWIGINTERN PyObject *_wrap_Band_WriteRaster(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   38148        8724 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38149        8724 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   38150        8724 :   int arg2 ;
   38151        8724 :   int arg3 ;
   38152        8724 :   int arg4 ;
   38153        8724 :   int arg5 ;
   38154        8724 :   GIntBig arg6 ;
   38155        8724 :   char *arg7 = (char *) 0 ;
   38156        8724 :   int *arg8 = (int *) 0 ;
   38157        8724 :   int *arg9 = (int *) 0 ;
   38158        8724 :   GDALDataType *arg10 = (GDALDataType *) 0 ;
   38159        8724 :   GIntBig *arg11 = (GIntBig *) 0 ;
   38160        8724 :   GIntBig *arg12 = (GIntBig *) 0 ;
   38161        8724 :   void *argp1 = 0 ;
   38162        8724 :   int res1 = 0 ;
   38163        8724 :   int val2 ;
   38164        8724 :   int ecode2 = 0 ;
   38165        8724 :   int val3 ;
   38166        8724 :   int ecode3 = 0 ;
   38167        8724 :   int val4 ;
   38168        8724 :   int ecode4 = 0 ;
   38169        8724 :   int val5 ;
   38170        8724 :   int ecode5 = 0 ;
   38171        8724 :   int alloc6 = 0 ;
   38172        8724 :   bool viewIsValid6 = false ;
   38173        8724 :   Py_buffer view6 ;
   38174        8724 :   int val8 ;
   38175        8724 :   int val9 ;
   38176        8724 :   GDALDataType val10 ;
   38177        8724 :   GIntBig val11 ;
   38178        8724 :   GIntBig val12 ;
   38179        8724 :   PyObject * obj0 = 0 ;
   38180        8724 :   PyObject * obj1 = 0 ;
   38181        8724 :   PyObject * obj2 = 0 ;
   38182        8724 :   PyObject * obj3 = 0 ;
   38183        8724 :   PyObject * obj4 = 0 ;
   38184        8724 :   PyObject * obj5 = 0 ;
   38185        8724 :   PyObject * obj6 = 0 ;
   38186        8724 :   PyObject * obj7 = 0 ;
   38187        8724 :   PyObject * obj8 = 0 ;
   38188        8724 :   PyObject * obj9 = 0 ;
   38189        8724 :   PyObject * obj10 = 0 ;
   38190        8724 :   char * kwnames[] = {
   38191             :     (char *)"self",  (char *)"xoff",  (char *)"yoff",  (char *)"xsize",  (char *)"ysize",  (char *)"buf_len",  (char *)"buf_xsize",  (char *)"buf_ysize",  (char *)"buf_type",  (char *)"buf_pixel_space",  (char *)"buf_line_space",  NULL 
   38192             :   };
   38193        8724 :   CPLErr result;
   38194             :   
   38195        8724 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO|OOOOO:Band_WriteRaster", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10)) SWIG_fail;
   38196        8724 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   38197        8724 :   if (!SWIG_IsOK(res1)) {
   38198           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_WriteRaster" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   38199             :   }
   38200        8724 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   38201        8724 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   38202        8724 :   if (!SWIG_IsOK(ecode2)) {
   38203           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_WriteRaster" "', argument " "2"" of type '" "int""'");
   38204             :   } 
   38205        8724 :   arg2 = static_cast< int >(val2);
   38206        8724 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   38207        8724 :   if (!SWIG_IsOK(ecode3)) {
   38208           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_WriteRaster" "', argument " "3"" of type '" "int""'");
   38209             :   } 
   38210        8724 :   arg3 = static_cast< int >(val3);
   38211        8724 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   38212        8724 :   if (!SWIG_IsOK(ecode4)) {
   38213           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Band_WriteRaster" "', argument " "4"" of type '" "int""'");
   38214             :   } 
   38215        8724 :   arg4 = static_cast< int >(val4);
   38216        8724 :   ecode5 = SWIG_AsVal_int(obj4, &val5);
   38217        8724 :   if (!SWIG_IsOK(ecode5)) {
   38218           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Band_WriteRaster" "', argument " "5"" of type '" "int""'");
   38219             :   } 
   38220        8724 :   arg5 = static_cast< int >(val5);
   38221        8724 :   {
   38222             :     /* %typemap(in,numinputs=1) (GIntBig nLen, char *pBuf ) */
   38223        8724 :     char* ptr = NULL;
   38224        8724 :     if( !GetBufferAsCharPtrGIntBigSize(obj5, &arg6, &ptr, &alloc6, &viewIsValid6, &view6) ) {
   38225           1 :       SWIG_fail;
   38226             :     }
   38227        8723 :     arg7 = (char *)ptr;
   38228             :   }
   38229        8723 :   if (obj6) {
   38230        8723 :     {
   38231             :       /* %typemap(in) (int *optional_##int) */
   38232        8723 :       if ( obj6 == Py_None ) {
   38233             :         arg8 = 0;
   38234             :       }
   38235        8723 :       else if ( PyArg_Parse( obj6,"i" ,&val8 ) ) {
   38236             :         arg8 = (int *) &val8;
   38237             :       }
   38238             :       else {
   38239           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   38240           0 :         SWIG_fail;
   38241             :       }
   38242             :     }
   38243             :   }
   38244        8723 :   if (obj7) {
   38245        8723 :     {
   38246             :       /* %typemap(in) (int *optional_##int) */
   38247        8723 :       if ( obj7 == Py_None ) {
   38248             :         arg9 = 0;
   38249             :       }
   38250        8723 :       else if ( PyArg_Parse( obj7,"i" ,&val9 ) ) {
   38251             :         arg9 = (int *) &val9;
   38252             :       }
   38253             :       else {
   38254           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   38255           0 :         SWIG_fail;
   38256             :       }
   38257             :     }
   38258             :   }
   38259        8723 :   if (obj8) {
   38260        8723 :     {
   38261             :       /* %typemap(in) (GDALDataType *optional_GDALDataType) */
   38262        8723 :       int intval = 0;
   38263        8723 :       if ( obj8 == Py_None ) {
   38264             :         arg10 = NULL;
   38265             :       }
   38266       17446 :       else if ( SWIG_IsOK(SWIG_AsVal_int(obj8, &intval)) ) {
   38267        8723 :         if( intval < GDT_Unknown || intval >= GDT_TypeCount )
   38268             :         {
   38269           0 :           SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   38270             :         }
   38271        8723 :         val10 = static_cast<GDALDataType>(intval);
   38272        8723 :         arg10 = &val10;
   38273             :       }
   38274             :       else {
   38275           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   38276           0 :         SWIG_fail;
   38277             :       }
   38278             :     }
   38279             :   }
   38280        8723 :   if (obj9) {
   38281        8723 :     {
   38282             :       /* %typemap(in) (GIntBig *optional_##GIntBig) */
   38283        8723 :       if ( obj9 == Py_None ) {
   38284             :         arg11 = 0;
   38285             :       }
   38286          16 :       else if ( PyArg_Parse( obj9,"L" ,&val11 ) ) {
   38287             :         arg11 = (GIntBig *) &val11;
   38288             :       }
   38289             :       else {
   38290           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   38291           0 :         SWIG_fail;
   38292             :       }
   38293             :     }
   38294             :   }
   38295        8723 :   if (obj10) {
   38296        8723 :     {
   38297             :       /* %typemap(in) (GIntBig *optional_##GIntBig) */
   38298        8723 :       if ( obj10 == Py_None ) {
   38299             :         arg12 = 0;
   38300             :       }
   38301          12 :       else if ( PyArg_Parse( obj10,"L" ,&val12 ) ) {
   38302             :         arg12 = (GIntBig *) &val12;
   38303             :       }
   38304             :       else {
   38305           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   38306           0 :         SWIG_fail;
   38307             :       }
   38308             :     }
   38309             :   }
   38310        8723 :   {
   38311        8723 :     const int bLocalUseExceptions = GetUseExceptions();
   38312        8723 :     if ( bLocalUseExceptions ) {
   38313        7981 :       pushErrorHandler();
   38314             :     }
   38315        8723 :     {
   38316        8723 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38317        8723 :       CPL_IGNORE_RET_VAL(result = (CPLErr)GDALRasterBandShadow_WriteRaster(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12));
   38318        8723 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38319             :     }
   38320        8723 :     if ( bLocalUseExceptions ) {
   38321        7981 :       popErrorHandler();
   38322             :     }
   38323             : #ifndef SED_HACKS
   38324             :     if ( bLocalUseExceptions ) {
   38325             :       CPLErr eclass = CPLGetLastErrorType();
   38326             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38327             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38328             :       }
   38329             :     }
   38330             : #endif
   38331             :   }
   38332        8723 :   resultobj = SWIG_From_int(static_cast< int >(result));
   38333        8723 :   {
   38334             :     /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
   38335        8723 :     if( viewIsValid6 ) {
   38336        2661 :       PyBuffer_Release(&view6);
   38337             :     }
   38338        6062 :     else if (ReturnSame(alloc6) == SWIG_NEWOBJ ) {
   38339        6062 :       delete[] arg7;
   38340             :     }
   38341             :   }
   38342        8723 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   38343             :   return resultobj;
   38344           1 : fail:
   38345           1 :   {
   38346             :     /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
   38347           1 :     if( viewIsValid6 ) {
   38348           0 :       PyBuffer_Release(&view6);
   38349             :     }
   38350        8724 :     else if (ReturnSame(alloc6) == SWIG_NEWOBJ ) {
   38351           0 :       delete[] arg7;
   38352             :     }
   38353             :   }
   38354             :   return NULL;
   38355             : }
   38356             : 
   38357             : 
   38358          36 : SWIGINTERN PyObject *_wrap_Band_FlushCache(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38359          36 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38360          36 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   38361          36 :   void *argp1 = 0 ;
   38362          36 :   int res1 = 0 ;
   38363          36 :   PyObject *swig_obj[1] ;
   38364             :   
   38365          36 :   if (!args) SWIG_fail;
   38366          36 :   swig_obj[0] = args;
   38367          36 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   38368          36 :   if (!SWIG_IsOK(res1)) {
   38369           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_FlushCache" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   38370             :   }
   38371          36 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   38372          36 :   {
   38373          36 :     const int bLocalUseExceptions = GetUseExceptions();
   38374          36 :     if ( bLocalUseExceptions ) {
   38375           4 :       pushErrorHandler();
   38376             :     }
   38377          36 :     {
   38378          36 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38379          36 :       GDALRasterBandShadow_FlushCache(arg1);
   38380          36 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38381             :     }
   38382          36 :     if ( bLocalUseExceptions ) {
   38383           4 :       popErrorHandler();
   38384             :     }
   38385             : #ifndef SED_HACKS
   38386             :     if ( bLocalUseExceptions ) {
   38387             :       CPLErr eclass = CPLGetLastErrorType();
   38388             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38389             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38390             :       }
   38391             :     }
   38392             : #endif
   38393             :   }
   38394          36 :   resultobj = SWIG_Py_Void();
   38395          36 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   38396             :   return resultobj;
   38397             : fail:
   38398             :   return NULL;
   38399             : }
   38400             : 
   38401             : 
   38402         129 : SWIGINTERN PyObject *_wrap_Band_GetRasterColorTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38403         129 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38404         129 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   38405         129 :   void *argp1 = 0 ;
   38406         129 :   int res1 = 0 ;
   38407         129 :   PyObject *swig_obj[1] ;
   38408         129 :   GDALColorTableShadow *result = 0 ;
   38409             :   
   38410         129 :   if (!args) SWIG_fail;
   38411         129 :   swig_obj[0] = args;
   38412         129 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   38413         129 :   if (!SWIG_IsOK(res1)) {
   38414           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetRasterColorTable" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   38415             :   }
   38416         129 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   38417         129 :   {
   38418         129 :     const int bLocalUseExceptions = GetUseExceptions();
   38419         129 :     if ( bLocalUseExceptions ) {
   38420          93 :       pushErrorHandler();
   38421             :     }
   38422         129 :     {
   38423         129 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38424         129 :       result = (GDALColorTableShadow *)GDALRasterBandShadow_GetRasterColorTable(arg1);
   38425         129 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38426             :     }
   38427         129 :     if ( bLocalUseExceptions ) {
   38428          93 :       popErrorHandler();
   38429             :     }
   38430             : #ifndef SED_HACKS
   38431             :     if ( bLocalUseExceptions ) {
   38432             :       CPLErr eclass = CPLGetLastErrorType();
   38433             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38434             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38435             :       }
   38436             :     }
   38437             : #endif
   38438             :   }
   38439         129 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   38440         129 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   38441             :   return resultobj;
   38442             : fail:
   38443             :   return NULL;
   38444             : }
   38445             : 
   38446             : 
   38447          62 : SWIGINTERN PyObject *_wrap_Band_GetColorTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38448          62 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38449          62 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   38450          62 :   void *argp1 = 0 ;
   38451          62 :   int res1 = 0 ;
   38452          62 :   PyObject *swig_obj[1] ;
   38453          62 :   GDALColorTableShadow *result = 0 ;
   38454             :   
   38455          62 :   if (!args) SWIG_fail;
   38456          62 :   swig_obj[0] = args;
   38457          62 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   38458          62 :   if (!SWIG_IsOK(res1)) {
   38459           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetColorTable" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   38460             :   }
   38461          62 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   38462          62 :   {
   38463          62 :     const int bLocalUseExceptions = GetUseExceptions();
   38464          62 :     if ( bLocalUseExceptions ) {
   38465          38 :       pushErrorHandler();
   38466             :     }
   38467          62 :     {
   38468          62 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38469          62 :       result = (GDALColorTableShadow *)GDALRasterBandShadow_GetColorTable(arg1);
   38470          62 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38471             :     }
   38472          62 :     if ( bLocalUseExceptions ) {
   38473          38 :       popErrorHandler();
   38474             :     }
   38475             : #ifndef SED_HACKS
   38476             :     if ( bLocalUseExceptions ) {
   38477             :       CPLErr eclass = CPLGetLastErrorType();
   38478             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38479             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38480             :       }
   38481             :     }
   38482             : #endif
   38483             :   }
   38484          62 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   38485          62 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   38486             :   return resultobj;
   38487             : fail:
   38488             :   return NULL;
   38489             : }
   38490             : 
   38491             : 
   38492          43 : SWIGINTERN PyObject *_wrap_Band_SetRasterColorTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38493          43 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38494          43 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   38495          43 :   GDALColorTableShadow *arg2 = (GDALColorTableShadow *) 0 ;
   38496          43 :   void *argp1 = 0 ;
   38497          43 :   int res1 = 0 ;
   38498          43 :   void *argp2 = 0 ;
   38499          43 :   int res2 = 0 ;
   38500          43 :   PyObject *swig_obj[2] ;
   38501          43 :   int result;
   38502             :   
   38503          43 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetRasterColorTable", 2, 2, swig_obj)) SWIG_fail;
   38504          43 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   38505          43 :   if (!SWIG_IsOK(res1)) {
   38506           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetRasterColorTable" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   38507             :   }
   38508          43 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   38509          43 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   38510          43 :   if (!SWIG_IsOK(res2)) {
   38511           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Band_SetRasterColorTable" "', argument " "2"" of type '" "GDALColorTableShadow *""'"); 
   38512             :   }
   38513          43 :   arg2 = reinterpret_cast< GDALColorTableShadow * >(argp2);
   38514          43 :   {
   38515          43 :     const int bLocalUseExceptions = GetUseExceptions();
   38516          43 :     if ( bLocalUseExceptions ) {
   38517          22 :       pushErrorHandler();
   38518             :     }
   38519          43 :     {
   38520          43 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38521          43 :       result = (int)GDALRasterBandShadow_SetRasterColorTable(arg1,arg2);
   38522          43 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38523             :     }
   38524          43 :     if ( bLocalUseExceptions ) {
   38525          22 :       popErrorHandler();
   38526             :     }
   38527             : #ifndef SED_HACKS
   38528             :     if ( bLocalUseExceptions ) {
   38529             :       CPLErr eclass = CPLGetLastErrorType();
   38530             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38531             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38532             :       }
   38533             :     }
   38534             : #endif
   38535             :   }
   38536          43 :   resultobj = SWIG_From_int(static_cast< int >(result));
   38537          43 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   38538             :   return resultobj;
   38539             : fail:
   38540             :   return NULL;
   38541             : }
   38542             : 
   38543             : 
   38544          28 : SWIGINTERN PyObject *_wrap_Band_SetColorTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38545          28 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38546          28 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   38547          28 :   GDALColorTableShadow *arg2 = (GDALColorTableShadow *) 0 ;
   38548          28 :   void *argp1 = 0 ;
   38549          28 :   int res1 = 0 ;
   38550          28 :   void *argp2 = 0 ;
   38551          28 :   int res2 = 0 ;
   38552          28 :   PyObject *swig_obj[2] ;
   38553          28 :   int result;
   38554             :   
   38555          28 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetColorTable", 2, 2, swig_obj)) SWIG_fail;
   38556          28 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   38557          28 :   if (!SWIG_IsOK(res1)) {
   38558           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetColorTable" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   38559             :   }
   38560          28 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   38561          28 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   38562          28 :   if (!SWIG_IsOK(res2)) {
   38563           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Band_SetColorTable" "', argument " "2"" of type '" "GDALColorTableShadow *""'"); 
   38564             :   }
   38565          28 :   arg2 = reinterpret_cast< GDALColorTableShadow * >(argp2);
   38566          28 :   {
   38567          28 :     const int bLocalUseExceptions = GetUseExceptions();
   38568          28 :     if ( bLocalUseExceptions ) {
   38569          13 :       pushErrorHandler();
   38570             :     }
   38571          28 :     {
   38572          28 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38573          28 :       result = (int)GDALRasterBandShadow_SetColorTable(arg1,arg2);
   38574          28 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38575             :     }
   38576          28 :     if ( bLocalUseExceptions ) {
   38577          13 :       popErrorHandler();
   38578             :     }
   38579             : #ifndef SED_HACKS
   38580             :     if ( bLocalUseExceptions ) {
   38581             :       CPLErr eclass = CPLGetLastErrorType();
   38582             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38583             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38584             :       }
   38585             :     }
   38586             : #endif
   38587             :   }
   38588          28 :   resultobj = SWIG_From_int(static_cast< int >(result));
   38589          28 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   38590             :   return resultobj;
   38591             : fail:
   38592             :   return NULL;
   38593             : }
   38594             : 
   38595             : 
   38596          45 : SWIGINTERN PyObject *_wrap_Band_GetDefaultRAT(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38597          45 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38598          45 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   38599          45 :   void *argp1 = 0 ;
   38600          45 :   int res1 = 0 ;
   38601          45 :   PyObject *swig_obj[1] ;
   38602          45 :   GDALRasterAttributeTableShadow *result = 0 ;
   38603             :   
   38604          45 :   if (!args) SWIG_fail;
   38605          45 :   swig_obj[0] = args;
   38606          45 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   38607          45 :   if (!SWIG_IsOK(res1)) {
   38608           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetDefaultRAT" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   38609             :   }
   38610          45 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   38611          45 :   {
   38612          45 :     const int bLocalUseExceptions = GetUseExceptions();
   38613          45 :     if ( bLocalUseExceptions ) {
   38614          44 :       pushErrorHandler();
   38615             :     }
   38616          45 :     {
   38617          45 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38618          45 :       result = (GDALRasterAttributeTableShadow *)GDALRasterBandShadow_GetDefaultRAT(arg1);
   38619          45 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38620             :     }
   38621          45 :     if ( bLocalUseExceptions ) {
   38622          44 :       popErrorHandler();
   38623             :     }
   38624             : #ifndef SED_HACKS
   38625             :     if ( bLocalUseExceptions ) {
   38626             :       CPLErr eclass = CPLGetLastErrorType();
   38627             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38628             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38629             :       }
   38630             :     }
   38631             : #endif
   38632             :   }
   38633          45 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   38634          45 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   38635             :   return resultobj;
   38636             : fail:
   38637             :   return NULL;
   38638             : }
   38639             : 
   38640             : 
   38641          17 : SWIGINTERN PyObject *_wrap_Band_SetDefaultRAT(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38642          17 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38643          17 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   38644          17 :   GDALRasterAttributeTableShadow *arg2 = (GDALRasterAttributeTableShadow *) 0 ;
   38645          17 :   void *argp1 = 0 ;
   38646          17 :   int res1 = 0 ;
   38647          17 :   void *argp2 = 0 ;
   38648          17 :   int res2 = 0 ;
   38649          17 :   PyObject *swig_obj[2] ;
   38650          17 :   int result;
   38651             :   
   38652          17 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetDefaultRAT", 2, 2, swig_obj)) SWIG_fail;
   38653          17 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   38654          17 :   if (!SWIG_IsOK(res1)) {
   38655           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetDefaultRAT" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   38656             :   }
   38657          17 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   38658          17 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   38659          17 :   if (!SWIG_IsOK(res2)) {
   38660           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Band_SetDefaultRAT" "', argument " "2"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   38661             :   }
   38662          17 :   arg2 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp2);
   38663          17 :   {
   38664          17 :     const int bLocalUseExceptions = GetUseExceptions();
   38665          17 :     if ( bLocalUseExceptions ) {
   38666          17 :       pushErrorHandler();
   38667             :     }
   38668          17 :     {
   38669          17 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38670          17 :       result = (int)GDALRasterBandShadow_SetDefaultRAT(arg1,arg2);
   38671          17 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38672             :     }
   38673          17 :     if ( bLocalUseExceptions ) {
   38674          17 :       popErrorHandler();
   38675             :     }
   38676             : #ifndef SED_HACKS
   38677             :     if ( bLocalUseExceptions ) {
   38678             :       CPLErr eclass = CPLGetLastErrorType();
   38679             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38680             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38681             :       }
   38682             :     }
   38683             : #endif
   38684             :   }
   38685          17 :   resultobj = SWIG_From_int(static_cast< int >(result));
   38686          17 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   38687             :   return resultobj;
   38688             : fail:
   38689             :   return NULL;
   38690             : }
   38691             : 
   38692             : 
   38693         643 : SWIGINTERN PyObject *_wrap_Band_GetMaskBand(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38694         643 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38695         643 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   38696         643 :   void *argp1 = 0 ;
   38697         643 :   int res1 = 0 ;
   38698         643 :   PyObject *swig_obj[1] ;
   38699         643 :   GDALRasterBandShadow *result = 0 ;
   38700             :   
   38701         643 :   if (!args) SWIG_fail;
   38702         643 :   swig_obj[0] = args;
   38703         643 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   38704         643 :   if (!SWIG_IsOK(res1)) {
   38705           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetMaskBand" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   38706             :   }
   38707         643 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   38708         643 :   {
   38709         643 :     const int bLocalUseExceptions = GetUseExceptions();
   38710         643 :     if ( bLocalUseExceptions ) {
   38711         334 :       pushErrorHandler();
   38712             :     }
   38713         643 :     {
   38714         643 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38715         643 :       result = (GDALRasterBandShadow *)GDALRasterBandShadow_GetMaskBand(arg1);
   38716         643 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38717             :     }
   38718         643 :     if ( bLocalUseExceptions ) {
   38719         334 :       popErrorHandler();
   38720             :     }
   38721             : #ifndef SED_HACKS
   38722             :     if ( bLocalUseExceptions ) {
   38723             :       CPLErr eclass = CPLGetLastErrorType();
   38724             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38725             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38726             :       }
   38727             :     }
   38728             : #endif
   38729             :   }
   38730         643 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   38731         643 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   38732             :   return resultobj;
   38733             : fail:
   38734             :   return NULL;
   38735             : }
   38736             : 
   38737             : 
   38738         374 : SWIGINTERN PyObject *_wrap_Band_GetMaskFlags(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38739         374 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38740         374 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   38741         374 :   void *argp1 = 0 ;
   38742         374 :   int res1 = 0 ;
   38743         374 :   PyObject *swig_obj[1] ;
   38744         374 :   int result;
   38745             :   
   38746         374 :   if (!args) SWIG_fail;
   38747         374 :   swig_obj[0] = args;
   38748         374 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   38749         374 :   if (!SWIG_IsOK(res1)) {
   38750           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetMaskFlags" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   38751             :   }
   38752         374 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   38753         374 :   {
   38754         374 :     const int bLocalUseExceptions = GetUseExceptions();
   38755         374 :     if ( bLocalUseExceptions ) {
   38756         217 :       pushErrorHandler();
   38757             :     }
   38758         374 :     {
   38759         374 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38760         374 :       result = (int)GDALRasterBandShadow_GetMaskFlags(arg1);
   38761         374 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38762             :     }
   38763         374 :     if ( bLocalUseExceptions ) {
   38764         217 :       popErrorHandler();
   38765             :     }
   38766             : #ifndef SED_HACKS
   38767             :     if ( bLocalUseExceptions ) {
   38768             :       CPLErr eclass = CPLGetLastErrorType();
   38769             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38770             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38771             :       }
   38772             :     }
   38773             : #endif
   38774             :   }
   38775         374 :   resultobj = SWIG_From_int(static_cast< int >(result));
   38776         374 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   38777             :   return resultobj;
   38778             : fail:
   38779             :   return NULL;
   38780             : }
   38781             : 
   38782             : 
   38783          31 : SWIGINTERN PyObject *_wrap_Band_CreateMaskBand(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38784          31 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38785          31 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   38786          31 :   int arg2 ;
   38787          31 :   void *argp1 = 0 ;
   38788          31 :   int res1 = 0 ;
   38789          31 :   int val2 ;
   38790          31 :   int ecode2 = 0 ;
   38791          31 :   PyObject *swig_obj[2] ;
   38792          31 :   CPLErr result;
   38793             :   
   38794          31 :   if (!SWIG_Python_UnpackTuple(args, "Band_CreateMaskBand", 2, 2, swig_obj)) SWIG_fail;
   38795          31 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   38796          31 :   if (!SWIG_IsOK(res1)) {
   38797           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_CreateMaskBand" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   38798             :   }
   38799          31 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   38800          31 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   38801          31 :   if (!SWIG_IsOK(ecode2)) {
   38802           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_CreateMaskBand" "', argument " "2"" of type '" "int""'");
   38803             :   } 
   38804          31 :   arg2 = static_cast< int >(val2);
   38805          31 :   {
   38806          31 :     const int bLocalUseExceptions = GetUseExceptions();
   38807          31 :     if ( bLocalUseExceptions ) {
   38808          15 :       pushErrorHandler();
   38809             :     }
   38810          31 :     {
   38811          31 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38812          31 :       CPL_IGNORE_RET_VAL(result = (CPLErr)GDALRasterBandShadow_CreateMaskBand(arg1,arg2));
   38813          31 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38814             :     }
   38815          31 :     if ( bLocalUseExceptions ) {
   38816          15 :       popErrorHandler();
   38817             :     }
   38818             : #ifndef SED_HACKS
   38819             :     if ( bLocalUseExceptions ) {
   38820             :       CPLErr eclass = CPLGetLastErrorType();
   38821             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38822             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38823             :       }
   38824             :     }
   38825             : #endif
   38826             :   }
   38827          31 :   resultobj = SWIG_From_int(static_cast< int >(result));
   38828          33 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   38829             :   return resultobj;
   38830             : fail:
   38831             :   return NULL;
   38832             : }
   38833             : 
   38834             : 
   38835          34 : SWIGINTERN PyObject *_wrap_Band_IsMaskBand(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38836          34 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38837          34 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   38838          34 :   void *argp1 = 0 ;
   38839          34 :   int res1 = 0 ;
   38840          34 :   PyObject *swig_obj[1] ;
   38841          34 :   bool result;
   38842             :   
   38843          34 :   if (!args) SWIG_fail;
   38844          34 :   swig_obj[0] = args;
   38845          34 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   38846          34 :   if (!SWIG_IsOK(res1)) {
   38847           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_IsMaskBand" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   38848             :   }
   38849          34 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   38850          34 :   {
   38851          34 :     const int bLocalUseExceptions = GetUseExceptions();
   38852          34 :     if ( bLocalUseExceptions ) {
   38853           9 :       pushErrorHandler();
   38854             :     }
   38855          34 :     {
   38856          34 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38857          34 :       result = (bool)GDALRasterBandShadow_IsMaskBand(arg1);
   38858          34 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38859             :     }
   38860          34 :     if ( bLocalUseExceptions ) {
   38861           9 :       popErrorHandler();
   38862             :     }
   38863             : #ifndef SED_HACKS
   38864             :     if ( bLocalUseExceptions ) {
   38865             :       CPLErr eclass = CPLGetLastErrorType();
   38866             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38867             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38868             :       }
   38869             :     }
   38870             : #endif
   38871             :   }
   38872          34 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   38873          34 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   38874             :   return resultobj;
   38875             : fail:
   38876             :   return NULL;
   38877             : }
   38878             : 
   38879             : 
   38880          27 : SWIGINTERN PyObject *_wrap_Band_GetHistogram(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   38881          27 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38882          27 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   38883          27 :   double arg2 = (double) -0.5 ;
   38884          27 :   double arg3 = (double) 255.5 ;
   38885          27 :   int arg4 = (int) 256 ;
   38886          27 :   GUIntBig *arg5 = (GUIntBig *) NULL ;
   38887          27 :   int arg6 = (int) 0 ;
   38888          27 :   int arg7 = (int) 1 ;
   38889          27 :   GDALProgressFunc arg8 = (GDALProgressFunc) NULL ;
   38890          27 :   void *arg9 = (void *) NULL ;
   38891          27 :   void *argp1 = 0 ;
   38892          27 :   int res1 = 0 ;
   38893          27 :   double val2 ;
   38894          27 :   int ecode2 = 0 ;
   38895          27 :   double val3 ;
   38896          27 :   int ecode3 = 0 ;
   38897          27 :   int val6 ;
   38898          27 :   int ecode6 = 0 ;
   38899          27 :   int val7 ;
   38900          27 :   int ecode7 = 0 ;
   38901          27 :   PyObject * obj0 = 0 ;
   38902          27 :   PyObject * obj1 = 0 ;
   38903          27 :   PyObject * obj2 = 0 ;
   38904          27 :   PyObject * obj3 = 0 ;
   38905          27 :   PyObject * obj4 = 0 ;
   38906          27 :   PyObject * obj5 = 0 ;
   38907          27 :   PyObject * obj6 = 0 ;
   38908          27 :   PyObject * obj7 = 0 ;
   38909          27 :   char * kwnames[] = {
   38910             :     (char *)"self",  (char *)"min",  (char *)"max",  (char *)"buckets",  (char *)"include_out_of_range",  (char *)"approx_ok",  (char *)"callback",  (char *)"callback_data",  NULL 
   38911             :   };
   38912          27 :   CPLErr result;
   38913             :   
   38914          27 :   {
   38915             :     /* %typemap(in) int buckets, GUIntBig* panHistogram -> list */
   38916          27 :     arg5 = (GUIntBig *) VSICalloc(sizeof(GUIntBig),arg4);
   38917             :   }
   38918             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   38919          27 :   PyProgressData *psProgressInfo;
   38920          27 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   38921          27 :   psProgressInfo->nLastReported = -1;
   38922          27 :   psProgressInfo->psPyCallback = NULL;
   38923          27 :   psProgressInfo->psPyCallbackData = NULL;
   38924          27 :   arg9 = psProgressInfo;
   38925          27 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OOOOOOO:Band_GetHistogram", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7)) SWIG_fail;
   38926          27 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   38927          27 :   if (!SWIG_IsOK(res1)) {
   38928           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetHistogram" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   38929             :   }
   38930          27 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   38931          27 :   if (obj1) {
   38932          18 :     ecode2 = SWIG_AsVal_double(obj1, &val2);
   38933          18 :     if (!SWIG_IsOK(ecode2)) {
   38934           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_GetHistogram" "', argument " "2"" of type '" "double""'");
   38935             :     } 
   38936          18 :     arg2 = static_cast< double >(val2);
   38937             :   }
   38938          27 :   if (obj2) {
   38939          16 :     ecode3 = SWIG_AsVal_double(obj2, &val3);
   38940          16 :     if (!SWIG_IsOK(ecode3)) {
   38941           0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_GetHistogram" "', argument " "3"" of type '" "double""'");
   38942             :     } 
   38943          16 :     arg3 = static_cast< double >(val3);
   38944             :   }
   38945          27 :   if (obj3) {
   38946          16 :     {
   38947             :       /* %typemap(in) int buckets, GUIntBig* panHistogram -> list */
   38948          16 :       int requested_buckets = 0;
   38949          32 :       CPL_IGNORE_RET_VAL(SWIG_AsVal_int(obj3, &requested_buckets));
   38950          16 :       if( requested_buckets != arg4 )
   38951             :       {
   38952          16 :         arg4 = requested_buckets;
   38953          16 :         if (requested_buckets <= 0 || (size_t)requested_buckets > SIZE_MAX / sizeof(GUIntBig))
   38954             :         {
   38955           1 :           PyErr_SetString( PyExc_RuntimeError, "Bad value for buckets" );
   38956           1 :           SWIG_fail;
   38957             :         }
   38958          15 :         void* tmp = VSIRealloc(arg5, sizeof(GUIntBig) * requested_buckets);
   38959          15 :         if( !tmp) {
   38960           0 :           PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   38961           0 :           SWIG_fail;
   38962             :         }
   38963             :         arg5 = (GUIntBig *)tmp;
   38964             :       }
   38965          15 :       if (arg5 == NULL)
   38966             :       {
   38967           0 :         PyErr_SetString( PyExc_RuntimeError, "Cannot allocate buckets" );
   38968           0 :         SWIG_fail;
   38969             :       }
   38970             :     }
   38971             :   }
   38972          26 :   if (obj4) {
   38973          15 :     ecode6 = SWIG_AsVal_int(obj4, &val6);
   38974          15 :     if (!SWIG_IsOK(ecode6)) {
   38975           0 :       SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Band_GetHistogram" "', argument " "6"" of type '" "int""'");
   38976             :     } 
   38977             :     arg6 = static_cast< int >(val6);
   38978             :   }
   38979          26 :   if (obj5) {
   38980          17 :     ecode7 = SWIG_AsVal_int(obj5, &val7);
   38981          17 :     if (!SWIG_IsOK(ecode7)) {
   38982           0 :       SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "Band_GetHistogram" "', argument " "7"" of type '" "int""'");
   38983             :     } 
   38984             :     arg7 = static_cast< int >(val7);
   38985             :   }
   38986          26 :   if (obj6) {
   38987           0 :     {
   38988             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   38989             :       /* callback_func typemap */
   38990             :       
   38991             :       /* In some cases 0 is passed instead of None. */
   38992             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   38993           0 :       if ( PyLong_Check(obj6) || PyInt_Check(obj6) )
   38994             :       {
   38995           0 :         if( PyLong_AsLong(obj6) == 0 )
   38996             :         {
   38997           0 :           obj6 = Py_None;
   38998             :         }
   38999             :       }
   39000             :       
   39001           0 :       if (obj6 && obj6 != Py_None ) {
   39002           0 :         void* cbfunction = NULL;
   39003           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj6,
   39004             :             (void**)&cbfunction,
   39005             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   39006             :             SWIG_POINTER_EXCEPTION | 0 ));
   39007             :         
   39008           0 :         if ( cbfunction == GDALTermProgress ) {
   39009             :           arg8 = GDALTermProgress;
   39010             :         } else {
   39011           0 :           if (!PyCallable_Check(obj6)) {
   39012           0 :             PyErr_SetString( PyExc_RuntimeError,
   39013             :               "Object given is not a Python function" );
   39014           0 :             SWIG_fail;
   39015             :           }
   39016           0 :           psProgressInfo->psPyCallback = obj6;
   39017           0 :           arg8 = PyProgressProxy;
   39018             :         }
   39019             :         
   39020             :       }
   39021             :       
   39022             :     }
   39023             :   }
   39024          26 :   if (obj7) {
   39025           0 :     {
   39026             :       /* %typemap(in) ( void* callback_data=NULL)  */
   39027           0 :       psProgressInfo->psPyCallbackData = obj7 ;
   39028             :     }
   39029             :   }
   39030          26 :   {
   39031          26 :     const int bLocalUseExceptions = GetUseExceptions();
   39032          26 :     if ( bLocalUseExceptions ) {
   39033           4 :       pushErrorHandler();
   39034             :     }
   39035          26 :     {
   39036          26 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39037          52 :       CPL_IGNORE_RET_VAL(result = (CPLErr)GDALRasterBandShadow_GetHistogram(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9));
   39038          26 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39039             :     }
   39040          26 :     if ( bLocalUseExceptions ) {
   39041           4 :       popErrorHandler();
   39042             :     }
   39043             : #ifndef SED_HACKS
   39044             :     if ( bLocalUseExceptions ) {
   39045             :       CPLErr eclass = CPLGetLastErrorType();
   39046             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39047             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39048             :       }
   39049             :     }
   39050             : #endif
   39051             :   }
   39052          26 :   resultobj = SWIG_From_int(static_cast< int >(result));
   39053          26 :   {
   39054             :     /* %typemap(out) int buckets, GUIntBig* panHistogram -> list */
   39055          26 :     GUIntBig *integerarray = arg5;
   39056          26 :     Py_DECREF( resultobj );
   39057          26 :     if ( integerarray == NULL ) {
   39058           0 :       resultobj = Py_None;
   39059           0 :       Py_INCREF( resultobj );
   39060             :     }
   39061             :     else {
   39062          26 :       resultobj = PyList_New( arg4 );
   39063          26 :       if( !resultobj ) {
   39064           0 :         SWIG_fail;
   39065             :       }
   39066        2924 :       for ( int i = 0; i < arg4; ++i ) {
   39067        2898 :         char szTmp[32];
   39068        2898 :         sprintf(szTmp, CPL_FRMT_GUIB, integerarray[i]);
   39069        2898 :         PyObject *o = PyLong_FromString(szTmp, NULL, 10);
   39070        2898 :         PyList_SetItem(resultobj, i, o );
   39071             :       }
   39072             :     }
   39073             :   }
   39074          26 :   {
   39075             :     /* %typemap(freearg) (int buckets, GUIntBig* panHistogram)*/
   39076          26 :     VSIFree( arg5 );
   39077             :   }
   39078          26 :   {
   39079             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   39080             :     
   39081          26 :     CPLFree(psProgressInfo);
   39082             :     
   39083             :   }
   39084          27 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   39085             :   return resultobj;
   39086           1 : fail:
   39087           1 :   {
   39088             :     /* %typemap(freearg) (int buckets, GUIntBig* panHistogram)*/
   39089           1 :     VSIFree( arg5 );
   39090             :   }
   39091           1 :   {
   39092             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   39093             :     
   39094           1 :     CPLFree(psProgressInfo);
   39095             :     
   39096             :   }
   39097             :   return NULL;
   39098             : }
   39099             : 
   39100             : 
   39101          11 : SWIGINTERN PyObject *_wrap_Band_GetDefaultHistogram(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   39102          11 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39103          11 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   39104          11 :   double *arg2 = (double *) NULL ;
   39105          11 :   double *arg3 = (double *) NULL ;
   39106          11 :   int *arg4 = (int *) NULL ;
   39107          11 :   GUIntBig **arg5 = (GUIntBig **) NULL ;
   39108          11 :   int arg6 = (int) 1 ;
   39109          11 :   GDALProgressFunc arg7 = (GDALProgressFunc) NULL ;
   39110          11 :   void *arg8 = (void *) NULL ;
   39111          11 :   void *argp1 = 0 ;
   39112          11 :   int res1 = 0 ;
   39113          11 :   void *argp2 = 0 ;
   39114          11 :   int res2 = 0 ;
   39115          11 :   void *argp3 = 0 ;
   39116          11 :   int res3 = 0 ;
   39117          11 :   void *argp4 = 0 ;
   39118          11 :   int res4 = 0 ;
   39119          11 :   void *argp5 = 0 ;
   39120          11 :   int res5 = 0 ;
   39121          11 :   int val6 ;
   39122          11 :   int ecode6 = 0 ;
   39123          11 :   PyObject * obj0 = 0 ;
   39124          11 :   PyObject * obj1 = 0 ;
   39125          11 :   PyObject * obj2 = 0 ;
   39126          11 :   PyObject * obj3 = 0 ;
   39127          11 :   PyObject * obj4 = 0 ;
   39128          11 :   PyObject * obj5 = 0 ;
   39129          11 :   PyObject * obj6 = 0 ;
   39130          11 :   PyObject * obj7 = 0 ;
   39131          11 :   char * kwnames[] = {
   39132             :     (char *)"self",  (char *)"min_ret",  (char *)"max_ret",  (char *)"buckets_ret",  (char *)"ppanHistogram",  (char *)"force",  (char *)"callback",  (char *)"callback_data",  NULL 
   39133             :   };
   39134          11 :   CPLErr result;
   39135             :   
   39136          11 :   double min_val = 0.0, max_val = 0.0;
   39137          11 :   int buckets_val = 0;
   39138          11 :   GUIntBig *panHistogram = NULL;
   39139             :   
   39140          11 :   arg2 = &min_val;
   39141          11 :   arg3 = &max_val;
   39142          11 :   arg4 = &buckets_val;
   39143          11 :   arg5 = &panHistogram;
   39144             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   39145          11 :   PyProgressData *psProgressInfo;
   39146          11 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   39147          11 :   psProgressInfo->nLastReported = -1;
   39148          11 :   psProgressInfo->psPyCallback = NULL;
   39149          11 :   psProgressInfo->psPyCallbackData = NULL;
   39150          11 :   arg8 = psProgressInfo;
   39151          11 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OOOOOOO:Band_GetDefaultHistogram", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7)) SWIG_fail;
   39152          11 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   39153          11 :   if (!SWIG_IsOK(res1)) {
   39154           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetDefaultHistogram" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   39155             :   }
   39156          11 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   39157          11 :   if (obj1) {
   39158           0 :     res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_double, 0 |  0 );
   39159           0 :     if (!SWIG_IsOK(res2)) {
   39160           0 :       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Band_GetDefaultHistogram" "', argument " "2"" of type '" "double *""'"); 
   39161             :     }
   39162           0 :     arg2 = reinterpret_cast< double * >(argp2);
   39163             :   }
   39164          11 :   if (obj2) {
   39165           0 :     res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_double, 0 |  0 );
   39166           0 :     if (!SWIG_IsOK(res3)) {
   39167           0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Band_GetDefaultHistogram" "', argument " "3"" of type '" "double *""'"); 
   39168             :     }
   39169           0 :     arg3 = reinterpret_cast< double * >(argp3);
   39170             :   }
   39171          11 :   if (obj3) {
   39172           0 :     res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_int, 0 |  0 );
   39173           0 :     if (!SWIG_IsOK(res4)) {
   39174           0 :       SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Band_GetDefaultHistogram" "', argument " "4"" of type '" "int *""'"); 
   39175             :     }
   39176           0 :     arg4 = reinterpret_cast< int * >(argp4);
   39177             :   }
   39178          11 :   if (obj4) {
   39179           0 :     res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_p_GUIntBig, 0 |  0 );
   39180           0 :     if (!SWIG_IsOK(res5)) {
   39181           0 :       SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "Band_GetDefaultHistogram" "', argument " "5"" of type '" "GUIntBig **""'"); 
   39182             :     }
   39183           0 :     arg5 = reinterpret_cast< GUIntBig ** >(argp5);
   39184             :   }
   39185          11 :   if (obj5) {
   39186           5 :     ecode6 = SWIG_AsVal_int(obj5, &val6);
   39187           5 :     if (!SWIG_IsOK(ecode6)) {
   39188           0 :       SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Band_GetDefaultHistogram" "', argument " "6"" of type '" "int""'");
   39189             :     } 
   39190             :     arg6 = static_cast< int >(val6);
   39191             :   }
   39192          11 :   if (obj6) {
   39193           1 :     {
   39194             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   39195             :       /* callback_func typemap */
   39196             :       
   39197             :       /* In some cases 0 is passed instead of None. */
   39198             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   39199           1 :       if ( PyLong_Check(obj6) || PyInt_Check(obj6) )
   39200             :       {
   39201           0 :         if( PyLong_AsLong(obj6) == 0 )
   39202             :         {
   39203           0 :           obj6 = Py_None;
   39204             :         }
   39205             :       }
   39206             :       
   39207           1 :       if (obj6 && obj6 != Py_None ) {
   39208           1 :         void* cbfunction = NULL;
   39209           1 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj6,
   39210             :             (void**)&cbfunction,
   39211             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   39212             :             SWIG_POINTER_EXCEPTION | 0 ));
   39213             :         
   39214           1 :         if ( cbfunction == GDALTermProgress ) {
   39215             :           arg7 = GDALTermProgress;
   39216             :         } else {
   39217           1 :           if (!PyCallable_Check(obj6)) {
   39218           0 :             PyErr_SetString( PyExc_RuntimeError,
   39219             :               "Object given is not a Python function" );
   39220           0 :             SWIG_fail;
   39221             :           }
   39222           1 :           psProgressInfo->psPyCallback = obj6;
   39223           1 :           arg7 = PyProgressProxy;
   39224             :         }
   39225             :         
   39226             :       }
   39227             :       
   39228             :     }
   39229             :   }
   39230          11 :   if (obj7) {
   39231           0 :     {
   39232             :       /* %typemap(in) ( void* callback_data=NULL)  */
   39233           0 :       psProgressInfo->psPyCallbackData = obj7 ;
   39234             :     }
   39235             :   }
   39236          11 :   {
   39237          11 :     const int bLocalUseExceptions = GetUseExceptions();
   39238          11 :     if ( bLocalUseExceptions ) {
   39239           4 :       pushErrorHandler();
   39240             :     }
   39241          11 :     {
   39242          11 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39243          11 :       CPL_IGNORE_RET_VAL(result = (CPLErr)GDALRasterBandShadow_GetDefaultHistogram(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8));
   39244          11 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39245             :     }
   39246          11 :     if ( bLocalUseExceptions ) {
   39247           4 :       popErrorHandler();
   39248             :     }
   39249             : #ifndef SED_HACKS
   39250             :     if ( bLocalUseExceptions ) {
   39251             :       CPLErr eclass = CPLGetLastErrorType();
   39252             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39253             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39254             :       }
   39255             :     }
   39256             : #endif
   39257             :   }
   39258          11 :   resultobj = SWIG_From_int(static_cast< int >(result));
   39259          11 :   {
   39260          11 :     int i;
   39261          11 :     PyObject *psList = NULL;
   39262             :     
   39263          11 :     Py_XDECREF(resultobj);
   39264             :     
   39265          11 :     if (panHistogram)
   39266             :     {
   39267          10 :       psList = PyList_New(buckets_val);
   39268          10 :       if( !psList ) {
   39269           0 :         SWIG_fail;
   39270             :       }
   39271        2062 :       for( i = 0; i < buckets_val; i++ )
   39272        2052 :       PyList_SetItem(psList, i, Py_BuildValue("K", panHistogram[i] ));
   39273             :       
   39274          10 :       CPLFree( panHistogram );
   39275             :       
   39276          10 :       resultobj = Py_BuildValue( "(ddiO)", min_val, max_val, buckets_val, psList );
   39277          10 :       Py_XDECREF(psList);
   39278             :     }
   39279             :     else
   39280             :     {
   39281           1 :       resultobj = Py_None;
   39282           1 :       Py_INCREF(resultobj);
   39283             :     }
   39284             :   }
   39285          11 :   {
   39286             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   39287             :     
   39288          11 :     CPLFree(psProgressInfo);
   39289             :     
   39290             :   }
   39291          11 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   39292             :   return resultobj;
   39293           0 : fail:
   39294           0 :   {
   39295             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   39296             :     
   39297           0 :     CPLFree(psProgressInfo);
   39298             :     
   39299             :   }
   39300             :   return NULL;
   39301             : }
   39302             : 
   39303             : 
   39304           5 : SWIGINTERN PyObject *_wrap_Band_SetDefaultHistogram(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39305           5 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39306           5 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   39307           5 :   double arg2 ;
   39308           5 :   double arg3 ;
   39309           5 :   int arg4 ;
   39310           5 :   GUIntBig *arg5 = (GUIntBig *) 0 ;
   39311           5 :   void *argp1 = 0 ;
   39312           5 :   int res1 = 0 ;
   39313           5 :   double val2 ;
   39314           5 :   int ecode2 = 0 ;
   39315           5 :   double val3 ;
   39316           5 :   int ecode3 = 0 ;
   39317           5 :   PyObject *swig_obj[4] ;
   39318           5 :   CPLErr result;
   39319             :   
   39320           5 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetDefaultHistogram", 4, 4, swig_obj)) SWIG_fail;
   39321           5 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   39322           5 :   if (!SWIG_IsOK(res1)) {
   39323           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetDefaultHistogram" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   39324             :   }
   39325           5 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   39326           5 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   39327           5 :   if (!SWIG_IsOK(ecode2)) {
   39328           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_SetDefaultHistogram" "', argument " "2"" of type '" "double""'");
   39329             :   } 
   39330           5 :   arg2 = static_cast< double >(val2);
   39331           5 :   ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
   39332           5 :   if (!SWIG_IsOK(ecode3)) {
   39333           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_SetDefaultHistogram" "', argument " "3"" of type '" "double""'");
   39334             :   } 
   39335           5 :   arg3 = static_cast< double >(val3);
   39336           5 :   {
   39337             :     /* %typemap(in,numinputs=1) (int nList, GUIntBig* pList)*/
   39338           5 :     arg5 = CreateCGUIntBigListFromSequence(swig_obj[3], &arg4);
   39339           5 :     if( arg4 < 0 ) {
   39340           0 :       SWIG_fail;
   39341             :     }
   39342             :   }
   39343           5 :   {
   39344           5 :     const int bLocalUseExceptions = GetUseExceptions();
   39345           5 :     if ( bLocalUseExceptions ) {
   39346           5 :       pushErrorHandler();
   39347             :     }
   39348           5 :     {
   39349           5 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39350           5 :       CPL_IGNORE_RET_VAL(result = (CPLErr)GDALRasterBandShadow_SetDefaultHistogram(arg1,arg2,arg3,arg4,arg5));
   39351           5 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39352             :     }
   39353           5 :     if ( bLocalUseExceptions ) {
   39354           5 :       popErrorHandler();
   39355             :     }
   39356             : #ifndef SED_HACKS
   39357             :     if ( bLocalUseExceptions ) {
   39358             :       CPLErr eclass = CPLGetLastErrorType();
   39359             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39360             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39361             :       }
   39362             :     }
   39363             : #endif
   39364             :   }
   39365           5 :   resultobj = SWIG_From_int(static_cast< int >(result));
   39366           5 :   {
   39367             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   39368           5 :     free(arg5);
   39369             :   }
   39370           5 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   39371             :   return resultobj;
   39372           0 : fail:
   39373           0 :   {
   39374             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   39375           0 :     free(arg5);
   39376             :   }
   39377           0 :   return NULL;
   39378             : }
   39379             : 
   39380             : 
   39381          17 : SWIGINTERN PyObject *_wrap_Band_HasArbitraryOverviews(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39382          17 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39383          17 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   39384          17 :   void *argp1 = 0 ;
   39385          17 :   int res1 = 0 ;
   39386          17 :   PyObject *swig_obj[1] ;
   39387          17 :   bool result;
   39388             :   
   39389          17 :   if (!args) SWIG_fail;
   39390          17 :   swig_obj[0] = args;
   39391          17 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   39392          17 :   if (!SWIG_IsOK(res1)) {
   39393           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_HasArbitraryOverviews" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   39394             :   }
   39395          17 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   39396          17 :   {
   39397          17 :     const int bLocalUseExceptions = GetUseExceptions();
   39398          17 :     if ( bLocalUseExceptions ) {
   39399           0 :       pushErrorHandler();
   39400             :     }
   39401          17 :     {
   39402          17 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39403          17 :       result = (bool)GDALRasterBandShadow_HasArbitraryOverviews(arg1);
   39404          17 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39405             :     }
   39406          17 :     if ( bLocalUseExceptions ) {
   39407           0 :       popErrorHandler();
   39408             :     }
   39409             : #ifndef SED_HACKS
   39410             :     if ( bLocalUseExceptions ) {
   39411             :       CPLErr eclass = CPLGetLastErrorType();
   39412             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39413             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39414             :       }
   39415             :     }
   39416             : #endif
   39417             :   }
   39418          17 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   39419          17 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   39420             :   return resultobj;
   39421             : fail:
   39422             :   return NULL;
   39423             : }
   39424             : 
   39425             : 
   39426          10 : SWIGINTERN PyObject *_wrap_Band_GetCategoryNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39427          10 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39428          10 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   39429          10 :   void *argp1 = 0 ;
   39430          10 :   int res1 = 0 ;
   39431          10 :   PyObject *swig_obj[1] ;
   39432          10 :   char **result = 0 ;
   39433             :   
   39434          10 :   if (!args) SWIG_fail;
   39435          10 :   swig_obj[0] = args;
   39436          10 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   39437          10 :   if (!SWIG_IsOK(res1)) {
   39438           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetCategoryNames" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   39439             :   }
   39440          10 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   39441          10 :   {
   39442          10 :     const int bLocalUseExceptions = GetUseExceptions();
   39443          10 :     if ( bLocalUseExceptions ) {
   39444           8 :       pushErrorHandler();
   39445             :     }
   39446          10 :     {
   39447          10 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39448          10 :       result = (char **)GDALRasterBandShadow_GetCategoryNames(arg1);
   39449          10 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39450             :     }
   39451          10 :     if ( bLocalUseExceptions ) {
   39452           8 :       popErrorHandler();
   39453             :     }
   39454             : #ifndef SED_HACKS
   39455             :     if ( bLocalUseExceptions ) {
   39456             :       CPLErr eclass = CPLGetLastErrorType();
   39457             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39458             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39459             :       }
   39460             :     }
   39461             : #endif
   39462             :   }
   39463          10 :   {
   39464             :     /* %typemap(out) char **options -> ( string ) */
   39465          10 :     bool bErr = false;
   39466          10 :     resultobj = CSLToList(result, &bErr);
   39467          10 :     if( bErr ) {
   39468           0 :       SWIG_fail;
   39469             :     }
   39470             :   }
   39471          10 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   39472             :   return resultobj;
   39473             : fail:
   39474             :   return NULL;
   39475             : }
   39476             : 
   39477             : 
   39478           2 : SWIGINTERN PyObject *_wrap_Band_SetCategoryNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39479           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39480           2 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   39481           2 :   char **arg2 = (char **) 0 ;
   39482           2 :   void *argp1 = 0 ;
   39483           2 :   int res1 = 0 ;
   39484           2 :   PyObject *swig_obj[2] ;
   39485           2 :   CPLErr result;
   39486             :   
   39487           2 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetCategoryNames", 2, 2, swig_obj)) SWIG_fail;
   39488           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   39489           2 :   if (!SWIG_IsOK(res1)) {
   39490           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetCategoryNames" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   39491             :   }
   39492           2 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   39493           2 :   {
   39494             :     /* %typemap(in) char **dict */
   39495           2 :     arg2 = NULL;
   39496           2 :     if ( PySequence_Check( swig_obj[1] ) ) {
   39497           2 :       int bErr = FALSE;
   39498           2 :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   39499           2 :       if ( bErr )
   39500             :       {
   39501           0 :         SWIG_fail;
   39502             :       }
   39503             :     }
   39504           0 :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   39505           0 :       int bErr = FALSE;
   39506           0 :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   39507           0 :       if ( bErr )
   39508             :       {
   39509           0 :         SWIG_fail;
   39510             :       }
   39511             :     }
   39512             :     else {
   39513           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   39514           0 :       SWIG_fail;
   39515             :     }
   39516             :   }
   39517           2 :   {
   39518           2 :     const int bLocalUseExceptions = GetUseExceptions();
   39519           2 :     if ( bLocalUseExceptions ) {
   39520           2 :       pushErrorHandler();
   39521             :     }
   39522           2 :     {
   39523           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39524           2 :       CPL_IGNORE_RET_VAL(result = (CPLErr)GDALRasterBandShadow_SetCategoryNames(arg1,arg2));
   39525           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39526             :     }
   39527           2 :     if ( bLocalUseExceptions ) {
   39528           2 :       popErrorHandler();
   39529             :     }
   39530             : #ifndef SED_HACKS
   39531             :     if ( bLocalUseExceptions ) {
   39532             :       CPLErr eclass = CPLGetLastErrorType();
   39533             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39534             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39535             :       }
   39536             :     }
   39537             : #endif
   39538             :   }
   39539           2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   39540           2 :   {
   39541             :     /* %typemap(freearg) char **dict */
   39542           2 :     CSLDestroy( arg2 );
   39543             :   }
   39544           2 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   39545             :   return resultobj;
   39546           0 : fail:
   39547           0 :   {
   39548             :     /* %typemap(freearg) char **dict */
   39549           0 :     CSLDestroy( arg2 );
   39550             :   }
   39551             :   return NULL;
   39552             : }
   39553             : 
   39554             : 
   39555           1 : SWIGINTERN PyObject *_wrap_Band_GetVirtualMem(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   39556           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39557           1 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   39558           1 :   GDALRWFlag arg2 ;
   39559           1 :   int arg3 ;
   39560           1 :   int arg4 ;
   39561           1 :   int arg5 ;
   39562           1 :   int arg6 ;
   39563           1 :   int arg7 ;
   39564           1 :   int arg8 ;
   39565           1 :   GDALDataType arg9 ;
   39566           1 :   size_t arg10 ;
   39567           1 :   size_t arg11 ;
   39568           1 :   char **arg12 = (char **) NULL ;
   39569           1 :   void *argp1 = 0 ;
   39570           1 :   int res1 = 0 ;
   39571           1 :   int val2 ;
   39572           1 :   int ecode2 = 0 ;
   39573           1 :   int val3 ;
   39574           1 :   int ecode3 = 0 ;
   39575           1 :   int val4 ;
   39576           1 :   int ecode4 = 0 ;
   39577           1 :   int val5 ;
   39578           1 :   int ecode5 = 0 ;
   39579           1 :   int val6 ;
   39580           1 :   int ecode6 = 0 ;
   39581           1 :   int val7 ;
   39582           1 :   int ecode7 = 0 ;
   39583           1 :   int val8 ;
   39584           1 :   int ecode8 = 0 ;
   39585           1 :   size_t val10 ;
   39586           1 :   int ecode10 = 0 ;
   39587           1 :   size_t val11 ;
   39588           1 :   int ecode11 = 0 ;
   39589           1 :   PyObject * obj0 = 0 ;
   39590           1 :   PyObject * obj1 = 0 ;
   39591           1 :   PyObject * obj2 = 0 ;
   39592           1 :   PyObject * obj3 = 0 ;
   39593           1 :   PyObject * obj4 = 0 ;
   39594           1 :   PyObject * obj5 = 0 ;
   39595           1 :   PyObject * obj6 = 0 ;
   39596           1 :   PyObject * obj7 = 0 ;
   39597           1 :   PyObject * obj8 = 0 ;
   39598           1 :   PyObject * obj9 = 0 ;
   39599           1 :   PyObject * obj10 = 0 ;
   39600           1 :   PyObject * obj11 = 0 ;
   39601           1 :   char * kwnames[] = {
   39602             :     (char *)"self",  (char *)"eRWFlag",  (char *)"nXOff",  (char *)"nYOff",  (char *)"nXSize",  (char *)"nYSize",  (char *)"nBufXSize",  (char *)"nBufYSize",  (char *)"eBufType",  (char *)"nCacheSize",  (char *)"nPageSizeHint",  (char *)"options",  NULL 
   39603             :   };
   39604           1 :   CPLVirtualMemShadow *result = 0 ;
   39605             :   
   39606           1 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOOOOOO|O:Band_GetVirtualMem", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10, &obj11)) SWIG_fail;
   39607           1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   39608           1 :   if (!SWIG_IsOK(res1)) {
   39609           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetVirtualMem" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   39610             :   }
   39611           1 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   39612           1 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   39613           1 :   if (!SWIG_IsOK(ecode2)) {
   39614           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_GetVirtualMem" "', argument " "2"" of type '" "GDALRWFlag""'");
   39615             :   } 
   39616           1 :   arg2 = static_cast< GDALRWFlag >(val2);
   39617           1 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   39618           1 :   if (!SWIG_IsOK(ecode3)) {
   39619           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_GetVirtualMem" "', argument " "3"" of type '" "int""'");
   39620             :   } 
   39621           1 :   arg3 = static_cast< int >(val3);
   39622           1 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   39623           1 :   if (!SWIG_IsOK(ecode4)) {
   39624           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Band_GetVirtualMem" "', argument " "4"" of type '" "int""'");
   39625             :   } 
   39626           1 :   arg4 = static_cast< int >(val4);
   39627           1 :   ecode5 = SWIG_AsVal_int(obj4, &val5);
   39628           1 :   if (!SWIG_IsOK(ecode5)) {
   39629           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Band_GetVirtualMem" "', argument " "5"" of type '" "int""'");
   39630             :   } 
   39631           1 :   arg5 = static_cast< int >(val5);
   39632           1 :   ecode6 = SWIG_AsVal_int(obj5, &val6);
   39633           1 :   if (!SWIG_IsOK(ecode6)) {
   39634           0 :     SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Band_GetVirtualMem" "', argument " "6"" of type '" "int""'");
   39635             :   } 
   39636           1 :   arg6 = static_cast< int >(val6);
   39637           1 :   ecode7 = SWIG_AsVal_int(obj6, &val7);
   39638           1 :   if (!SWIG_IsOK(ecode7)) {
   39639           0 :     SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "Band_GetVirtualMem" "', argument " "7"" of type '" "int""'");
   39640             :   } 
   39641           1 :   arg7 = static_cast< int >(val7);
   39642           1 :   ecode8 = SWIG_AsVal_int(obj7, &val8);
   39643           1 :   if (!SWIG_IsOK(ecode8)) {
   39644           0 :     SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "Band_GetVirtualMem" "', argument " "8"" of type '" "int""'");
   39645             :   } 
   39646           1 :   arg8 = static_cast< int >(val8);
   39647           1 :   {
   39648             :     // %typemap(in) GDALDataType
   39649           1 :     int val = 0;
   39650           1 :     int ecode = SWIG_AsVal_int(obj8, &val);
   39651           1 :     if (!SWIG_IsOK(ecode)) {
   39652           0 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   39653             :     }
   39654           1 :     if( val < GDT_Unknown || val >= GDT_TypeCount )
   39655             :     {
   39656           0 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   39657             :     }
   39658           1 :     arg9 = static_cast<GDALDataType>(val);
   39659             :   }
   39660           1 :   ecode10 = SWIG_AsVal_size_t(obj9, &val10);
   39661           1 :   if (!SWIG_IsOK(ecode10)) {
   39662           0 :     SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "Band_GetVirtualMem" "', argument " "10"" of type '" "size_t""'");
   39663             :   } 
   39664           1 :   arg10 = static_cast< size_t >(val10);
   39665           1 :   ecode11 = SWIG_AsVal_size_t(obj10, &val11);
   39666           1 :   if (!SWIG_IsOK(ecode11)) {
   39667           0 :     SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "Band_GetVirtualMem" "', argument " "11"" of type '" "size_t""'");
   39668             :   } 
   39669           1 :   arg11 = static_cast< size_t >(val11);
   39670           1 :   if (obj11) {
   39671           0 :     {
   39672             :       /* %typemap(in) char **dict */
   39673           0 :       arg12 = NULL;
   39674           0 :       if ( PySequence_Check( obj11 ) ) {
   39675           0 :         int bErr = FALSE;
   39676           0 :         arg12 = CSLFromPySequence(obj11, &bErr);
   39677           0 :         if ( bErr )
   39678             :         {
   39679           0 :           SWIG_fail;
   39680             :         }
   39681             :       }
   39682           0 :       else if ( PyMapping_Check( obj11 ) ) {
   39683           0 :         int bErr = FALSE;
   39684           0 :         arg12 = CSLFromPyMapping(obj11, &bErr);
   39685           0 :         if ( bErr )
   39686             :         {
   39687           0 :           SWIG_fail;
   39688             :         }
   39689             :       }
   39690             :       else {
   39691           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   39692           0 :         SWIG_fail;
   39693             :       }
   39694             :     }
   39695             :   }
   39696           1 :   {
   39697           1 :     const int bLocalUseExceptions = GetUseExceptions();
   39698           1 :     if ( bLocalUseExceptions ) {
   39699           1 :       pushErrorHandler();
   39700             :     }
   39701           1 :     {
   39702           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39703           1 :       result = (CPLVirtualMemShadow *)GDALRasterBandShadow_GetVirtualMem(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12);
   39704           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39705             :     }
   39706           1 :     if ( bLocalUseExceptions ) {
   39707           1 :       popErrorHandler();
   39708             :     }
   39709             : #ifndef SED_HACKS
   39710             :     if ( bLocalUseExceptions ) {
   39711             :       CPLErr eclass = CPLGetLastErrorType();
   39712             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39713             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39714             :       }
   39715             :     }
   39716             : #endif
   39717             :   }
   39718           1 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CPLVirtualMemShadow, SWIG_POINTER_OWN |  0 );
   39719           1 :   {
   39720             :     /* %typemap(freearg) char **dict */
   39721           1 :     CSLDestroy( arg12 );
   39722             :   }
   39723           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   39724             :   return resultobj;
   39725           0 : fail:
   39726           0 :   {
   39727             :     /* %typemap(freearg) char **dict */
   39728           0 :     CSLDestroy( arg12 );
   39729             :   }
   39730             :   return NULL;
   39731             : }
   39732             : 
   39733             : 
   39734          20 : SWIGINTERN PyObject *_wrap_Band_GetVirtualMemAuto(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   39735          20 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39736          20 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   39737          20 :   GDALRWFlag arg2 ;
   39738          20 :   char **arg3 = (char **) NULL ;
   39739          20 :   void *argp1 = 0 ;
   39740          20 :   int res1 = 0 ;
   39741          20 :   int val2 ;
   39742          20 :   int ecode2 = 0 ;
   39743          20 :   PyObject * obj0 = 0 ;
   39744          20 :   PyObject * obj1 = 0 ;
   39745          20 :   PyObject * obj2 = 0 ;
   39746          20 :   char * kwnames[] = {
   39747             :     (char *)"self",  (char *)"eRWFlag",  (char *)"options",  NULL 
   39748             :   };
   39749          20 :   CPLVirtualMemShadow *result = 0 ;
   39750             :   
   39751          20 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|O:Band_GetVirtualMemAuto", kwnames, &obj0, &obj1, &obj2)) SWIG_fail;
   39752          20 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   39753          20 :   if (!SWIG_IsOK(res1)) {
   39754           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetVirtualMemAuto" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   39755             :   }
   39756          20 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   39757          20 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   39758          20 :   if (!SWIG_IsOK(ecode2)) {
   39759           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_GetVirtualMemAuto" "', argument " "2"" of type '" "GDALRWFlag""'");
   39760             :   } 
   39761          20 :   arg2 = static_cast< GDALRWFlag >(val2);
   39762          20 :   if (obj2) {
   39763           0 :     {
   39764             :       /* %typemap(in) char **dict */
   39765           0 :       arg3 = NULL;
   39766           0 :       if ( PySequence_Check( obj2 ) ) {
   39767           0 :         int bErr = FALSE;
   39768           0 :         arg3 = CSLFromPySequence(obj2, &bErr);
   39769           0 :         if ( bErr )
   39770             :         {
   39771           0 :           SWIG_fail;
   39772             :         }
   39773             :       }
   39774           0 :       else if ( PyMapping_Check( obj2 ) ) {
   39775           0 :         int bErr = FALSE;
   39776           0 :         arg3 = CSLFromPyMapping(obj2, &bErr);
   39777           0 :         if ( bErr )
   39778             :         {
   39779           0 :           SWIG_fail;
   39780             :         }
   39781             :       }
   39782             :       else {
   39783           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   39784           0 :         SWIG_fail;
   39785             :       }
   39786             :     }
   39787             :   }
   39788          20 :   {
   39789          20 :     const int bLocalUseExceptions = GetUseExceptions();
   39790          20 :     if ( bLocalUseExceptions ) {
   39791          20 :       pushErrorHandler();
   39792             :     }
   39793          20 :     {
   39794          20 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39795          20 :       result = (CPLVirtualMemShadow *)GDALRasterBandShadow_GetVirtualMemAuto(arg1,arg2,arg3);
   39796          20 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39797             :     }
   39798          20 :     if ( bLocalUseExceptions ) {
   39799          20 :       popErrorHandler();
   39800             :     }
   39801             : #ifndef SED_HACKS
   39802             :     if ( bLocalUseExceptions ) {
   39803             :       CPLErr eclass = CPLGetLastErrorType();
   39804             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39805             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39806             :       }
   39807             :     }
   39808             : #endif
   39809             :   }
   39810          20 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CPLVirtualMemShadow, SWIG_POINTER_OWN |  0 );
   39811          20 :   {
   39812             :     /* %typemap(freearg) char **dict */
   39813          20 :     CSLDestroy( arg3 );
   39814             :   }
   39815          20 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   39816             :   return resultobj;
   39817           0 : fail:
   39818           0 :   {
   39819             :     /* %typemap(freearg) char **dict */
   39820           0 :     CSLDestroy( arg3 );
   39821             :   }
   39822             :   return NULL;
   39823             : }
   39824             : 
   39825             : 
   39826           1 : SWIGINTERN PyObject *_wrap_Band_GetTiledVirtualMem(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   39827           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39828           1 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   39829           1 :   GDALRWFlag arg2 ;
   39830           1 :   int arg3 ;
   39831           1 :   int arg4 ;
   39832           1 :   int arg5 ;
   39833           1 :   int arg6 ;
   39834           1 :   int arg7 ;
   39835           1 :   int arg8 ;
   39836           1 :   GDALDataType arg9 ;
   39837           1 :   size_t arg10 ;
   39838           1 :   char **arg11 = (char **) NULL ;
   39839           1 :   void *argp1 = 0 ;
   39840           1 :   int res1 = 0 ;
   39841           1 :   int val2 ;
   39842           1 :   int ecode2 = 0 ;
   39843           1 :   int val3 ;
   39844           1 :   int ecode3 = 0 ;
   39845           1 :   int val4 ;
   39846           1 :   int ecode4 = 0 ;
   39847           1 :   int val5 ;
   39848           1 :   int ecode5 = 0 ;
   39849           1 :   int val6 ;
   39850           1 :   int ecode6 = 0 ;
   39851           1 :   int val7 ;
   39852           1 :   int ecode7 = 0 ;
   39853           1 :   int val8 ;
   39854           1 :   int ecode8 = 0 ;
   39855           1 :   size_t val10 ;
   39856           1 :   int ecode10 = 0 ;
   39857           1 :   PyObject * obj0 = 0 ;
   39858           1 :   PyObject * obj1 = 0 ;
   39859           1 :   PyObject * obj2 = 0 ;
   39860           1 :   PyObject * obj3 = 0 ;
   39861           1 :   PyObject * obj4 = 0 ;
   39862           1 :   PyObject * obj5 = 0 ;
   39863           1 :   PyObject * obj6 = 0 ;
   39864           1 :   PyObject * obj7 = 0 ;
   39865           1 :   PyObject * obj8 = 0 ;
   39866           1 :   PyObject * obj9 = 0 ;
   39867           1 :   PyObject * obj10 = 0 ;
   39868           1 :   char * kwnames[] = {
   39869             :     (char *)"self",  (char *)"eRWFlag",  (char *)"nXOff",  (char *)"nYOff",  (char *)"nXSize",  (char *)"nYSize",  (char *)"nTileXSize",  (char *)"nTileYSize",  (char *)"eBufType",  (char *)"nCacheSize",  (char *)"options",  NULL 
   39870             :   };
   39871           1 :   CPLVirtualMemShadow *result = 0 ;
   39872             :   
   39873           1 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOOOOO|O:Band_GetTiledVirtualMem", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10)) SWIG_fail;
   39874           1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   39875           1 :   if (!SWIG_IsOK(res1)) {
   39876           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetTiledVirtualMem" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   39877             :   }
   39878           1 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   39879           1 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   39880           1 :   if (!SWIG_IsOK(ecode2)) {
   39881           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_GetTiledVirtualMem" "', argument " "2"" of type '" "GDALRWFlag""'");
   39882             :   } 
   39883           1 :   arg2 = static_cast< GDALRWFlag >(val2);
   39884           1 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   39885           1 :   if (!SWIG_IsOK(ecode3)) {
   39886           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_GetTiledVirtualMem" "', argument " "3"" of type '" "int""'");
   39887             :   } 
   39888           1 :   arg3 = static_cast< int >(val3);
   39889           1 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   39890           1 :   if (!SWIG_IsOK(ecode4)) {
   39891           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Band_GetTiledVirtualMem" "', argument " "4"" of type '" "int""'");
   39892             :   } 
   39893           1 :   arg4 = static_cast< int >(val4);
   39894           1 :   ecode5 = SWIG_AsVal_int(obj4, &val5);
   39895           1 :   if (!SWIG_IsOK(ecode5)) {
   39896           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Band_GetTiledVirtualMem" "', argument " "5"" of type '" "int""'");
   39897             :   } 
   39898           1 :   arg5 = static_cast< int >(val5);
   39899           1 :   ecode6 = SWIG_AsVal_int(obj5, &val6);
   39900           1 :   if (!SWIG_IsOK(ecode6)) {
   39901           0 :     SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Band_GetTiledVirtualMem" "', argument " "6"" of type '" "int""'");
   39902             :   } 
   39903           1 :   arg6 = static_cast< int >(val6);
   39904           1 :   ecode7 = SWIG_AsVal_int(obj6, &val7);
   39905           1 :   if (!SWIG_IsOK(ecode7)) {
   39906           0 :     SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "Band_GetTiledVirtualMem" "', argument " "7"" of type '" "int""'");
   39907             :   } 
   39908           1 :   arg7 = static_cast< int >(val7);
   39909           1 :   ecode8 = SWIG_AsVal_int(obj7, &val8);
   39910           1 :   if (!SWIG_IsOK(ecode8)) {
   39911           0 :     SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "Band_GetTiledVirtualMem" "', argument " "8"" of type '" "int""'");
   39912             :   } 
   39913           1 :   arg8 = static_cast< int >(val8);
   39914           1 :   {
   39915             :     // %typemap(in) GDALDataType
   39916           1 :     int val = 0;
   39917           1 :     int ecode = SWIG_AsVal_int(obj8, &val);
   39918           1 :     if (!SWIG_IsOK(ecode)) {
   39919           0 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   39920             :     }
   39921           1 :     if( val < GDT_Unknown || val >= GDT_TypeCount )
   39922             :     {
   39923           0 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   39924             :     }
   39925           1 :     arg9 = static_cast<GDALDataType>(val);
   39926             :   }
   39927           1 :   ecode10 = SWIG_AsVal_size_t(obj9, &val10);
   39928           1 :   if (!SWIG_IsOK(ecode10)) {
   39929           0 :     SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "Band_GetTiledVirtualMem" "', argument " "10"" of type '" "size_t""'");
   39930             :   } 
   39931           1 :   arg10 = static_cast< size_t >(val10);
   39932           1 :   if (obj10) {
   39933           0 :     {
   39934             :       /* %typemap(in) char **dict */
   39935           0 :       arg11 = NULL;
   39936           0 :       if ( PySequence_Check( obj10 ) ) {
   39937           0 :         int bErr = FALSE;
   39938           0 :         arg11 = CSLFromPySequence(obj10, &bErr);
   39939           0 :         if ( bErr )
   39940             :         {
   39941           0 :           SWIG_fail;
   39942             :         }
   39943             :       }
   39944           0 :       else if ( PyMapping_Check( obj10 ) ) {
   39945           0 :         int bErr = FALSE;
   39946           0 :         arg11 = CSLFromPyMapping(obj10, &bErr);
   39947           0 :         if ( bErr )
   39948             :         {
   39949           0 :           SWIG_fail;
   39950             :         }
   39951             :       }
   39952             :       else {
   39953           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   39954           0 :         SWIG_fail;
   39955             :       }
   39956             :     }
   39957             :   }
   39958           1 :   {
   39959           1 :     const int bLocalUseExceptions = GetUseExceptions();
   39960           1 :     if ( bLocalUseExceptions ) {
   39961           1 :       pushErrorHandler();
   39962             :     }
   39963           1 :     {
   39964           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39965           1 :       result = (CPLVirtualMemShadow *)GDALRasterBandShadow_GetTiledVirtualMem(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
   39966           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39967             :     }
   39968           1 :     if ( bLocalUseExceptions ) {
   39969           1 :       popErrorHandler();
   39970             :     }
   39971             : #ifndef SED_HACKS
   39972             :     if ( bLocalUseExceptions ) {
   39973             :       CPLErr eclass = CPLGetLastErrorType();
   39974             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39975             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39976             :       }
   39977             :     }
   39978             : #endif
   39979             :   }
   39980           1 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CPLVirtualMemShadow, SWIG_POINTER_OWN |  0 );
   39981           1 :   {
   39982             :     /* %typemap(freearg) char **dict */
   39983           1 :     CSLDestroy( arg11 );
   39984             :   }
   39985           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   39986             :   return resultobj;
   39987           0 : fail:
   39988           0 :   {
   39989             :     /* %typemap(freearg) char **dict */
   39990           0 :     CSLDestroy( arg11 );
   39991             :   }
   39992             :   return NULL;
   39993             : }
   39994             : 
   39995             : 
   39996           8 : SWIGINTERN PyObject *_wrap_Band_GetDataCoverageStatus(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39997           8 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39998           8 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   39999           8 :   int arg2 ;
   40000           8 :   int arg3 ;
   40001           8 :   int arg4 ;
   40002           8 :   int arg5 ;
   40003           8 :   int arg6 = (int) 0 ;
   40004           8 :   double *arg7 = (double *) NULL ;
   40005           8 :   void *argp1 = 0 ;
   40006           8 :   int res1 = 0 ;
   40007           8 :   int val2 ;
   40008           8 :   int ecode2 = 0 ;
   40009           8 :   int val3 ;
   40010           8 :   int ecode3 = 0 ;
   40011           8 :   int val4 ;
   40012           8 :   int ecode4 = 0 ;
   40013           8 :   int val5 ;
   40014           8 :   int ecode5 = 0 ;
   40015           8 :   int val6 ;
   40016           8 :   int ecode6 = 0 ;
   40017           8 :   double temp7 ;
   40018           8 :   int res7 = SWIG_TMPOBJ ;
   40019           8 :   PyObject *swig_obj[6] ;
   40020           8 :   int result;
   40021             :   
   40022           8 :   arg7 = &temp7;
   40023           8 :   if (!SWIG_Python_UnpackTuple(args, "Band_GetDataCoverageStatus", 5, 6, swig_obj)) SWIG_fail;
   40024           8 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   40025           8 :   if (!SWIG_IsOK(res1)) {
   40026           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetDataCoverageStatus" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   40027             :   }
   40028           8 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   40029           8 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   40030           8 :   if (!SWIG_IsOK(ecode2)) {
   40031           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_GetDataCoverageStatus" "', argument " "2"" of type '" "int""'");
   40032             :   } 
   40033           8 :   arg2 = static_cast< int >(val2);
   40034           8 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   40035           8 :   if (!SWIG_IsOK(ecode3)) {
   40036           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_GetDataCoverageStatus" "', argument " "3"" of type '" "int""'");
   40037             :   } 
   40038           8 :   arg3 = static_cast< int >(val3);
   40039           8 :   ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
   40040           8 :   if (!SWIG_IsOK(ecode4)) {
   40041           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Band_GetDataCoverageStatus" "', argument " "4"" of type '" "int""'");
   40042             :   } 
   40043           8 :   arg4 = static_cast< int >(val4);
   40044           8 :   ecode5 = SWIG_AsVal_int(swig_obj[4], &val5);
   40045           8 :   if (!SWIG_IsOK(ecode5)) {
   40046           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Band_GetDataCoverageStatus" "', argument " "5"" of type '" "int""'");
   40047             :   } 
   40048           8 :   arg5 = static_cast< int >(val5);
   40049           8 :   if (swig_obj[5]) {
   40050           0 :     ecode6 = SWIG_AsVal_int(swig_obj[5], &val6);
   40051           0 :     if (!SWIG_IsOK(ecode6)) {
   40052           0 :       SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Band_GetDataCoverageStatus" "', argument " "6"" of type '" "int""'");
   40053             :     } 
   40054             :     arg6 = static_cast< int >(val6);
   40055             :   }
   40056           8 :   {
   40057           8 :     const int bLocalUseExceptions = GetUseExceptions();
   40058           8 :     if ( bLocalUseExceptions ) {
   40059           0 :       pushErrorHandler();
   40060             :     }
   40061           8 :     {
   40062           8 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   40063           8 :       result = (int)GDALRasterBandShadow_GetDataCoverageStatus(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   40064           8 :       SWIG_PYTHON_THREAD_END_ALLOW;
   40065             :     }
   40066           8 :     if ( bLocalUseExceptions ) {
   40067           0 :       popErrorHandler();
   40068             :     }
   40069             : #ifndef SED_HACKS
   40070             :     if ( bLocalUseExceptions ) {
   40071             :       CPLErr eclass = CPLGetLastErrorType();
   40072             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   40073             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   40074             :       }
   40075             :     }
   40076             : #endif
   40077             :   }
   40078           8 :   resultobj = SWIG_From_int(static_cast< int >(result));
   40079           8 :   if (ReturnSame(SWIG_IsTmpObj(res7))) {
   40080           8 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg7)));
   40081             :   } else {
   40082           0 :     int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   40083           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_double, new_flags));
   40084             :   }
   40085           8 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   40086             :   return resultobj;
   40087             : fail:
   40088             :   return NULL;
   40089             : }
   40090             : 
   40091             : 
   40092           2 : SWIGINTERN PyObject *_wrap_Band_AdviseRead(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   40093           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40094           2 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   40095           2 :   int arg2 ;
   40096           2 :   int arg3 ;
   40097           2 :   int arg4 ;
   40098           2 :   int arg5 ;
   40099           2 :   int *arg6 = (int *) 0 ;
   40100           2 :   int *arg7 = (int *) 0 ;
   40101           2 :   GDALDataType *arg8 = (GDALDataType *) 0 ;
   40102           2 :   char **arg9 = (char **) NULL ;
   40103           2 :   void *argp1 = 0 ;
   40104           2 :   int res1 = 0 ;
   40105           2 :   int val2 ;
   40106           2 :   int ecode2 = 0 ;
   40107           2 :   int val3 ;
   40108           2 :   int ecode3 = 0 ;
   40109           2 :   int val4 ;
   40110           2 :   int ecode4 = 0 ;
   40111           2 :   int val5 ;
   40112           2 :   int ecode5 = 0 ;
   40113           2 :   void *argp6 = 0 ;
   40114           2 :   int res6 = 0 ;
   40115           2 :   void *argp7 = 0 ;
   40116           2 :   int res7 = 0 ;
   40117           2 :   int val8 ;
   40118           2 :   PyObject *swig_obj[9] ;
   40119           2 :   CPLErr result;
   40120             :   
   40121           2 :   if (!SWIG_Python_UnpackTuple(args, "Band_AdviseRead", 5, 9, swig_obj)) SWIG_fail;
   40122           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   40123           2 :   if (!SWIG_IsOK(res1)) {
   40124           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_AdviseRead" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   40125             :   }
   40126           2 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   40127           2 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   40128           2 :   if (!SWIG_IsOK(ecode2)) {
   40129           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_AdviseRead" "', argument " "2"" of type '" "int""'");
   40130             :   } 
   40131           2 :   arg2 = static_cast< int >(val2);
   40132           2 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   40133           2 :   if (!SWIG_IsOK(ecode3)) {
   40134           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_AdviseRead" "', argument " "3"" of type '" "int""'");
   40135             :   } 
   40136           2 :   arg3 = static_cast< int >(val3);
   40137           2 :   ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
   40138           2 :   if (!SWIG_IsOK(ecode4)) {
   40139           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Band_AdviseRead" "', argument " "4"" of type '" "int""'");
   40140             :   } 
   40141           2 :   arg4 = static_cast< int >(val4);
   40142           2 :   ecode5 = SWIG_AsVal_int(swig_obj[4], &val5);
   40143           2 :   if (!SWIG_IsOK(ecode5)) {
   40144           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Band_AdviseRead" "', argument " "5"" of type '" "int""'");
   40145             :   } 
   40146           2 :   arg5 = static_cast< int >(val5);
   40147           2 :   if (swig_obj[5]) {
   40148           0 :     res6 = SWIG_ConvertPtr(swig_obj[5], &argp6,SWIGTYPE_p_int, 0 |  0 );
   40149           0 :     if (!SWIG_IsOK(res6)) {
   40150           0 :       SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "Band_AdviseRead" "', argument " "6"" of type '" "int *""'"); 
   40151             :     }
   40152           0 :     arg6 = reinterpret_cast< int * >(argp6);
   40153             :   }
   40154           2 :   if (swig_obj[6]) {
   40155           0 :     res7 = SWIG_ConvertPtr(swig_obj[6], &argp7,SWIGTYPE_p_int, 0 |  0 );
   40156           0 :     if (!SWIG_IsOK(res7)) {
   40157           0 :       SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "Band_AdviseRead" "', argument " "7"" of type '" "int *""'"); 
   40158             :     }
   40159           0 :     arg7 = reinterpret_cast< int * >(argp7);
   40160             :   }
   40161           2 :   if (swig_obj[7]) {
   40162           0 :     {
   40163             :       /* %typemap(in) (int *optional_##int) */
   40164           0 :       if ( swig_obj[7] == Py_None ) {
   40165             :         arg8 = 0;
   40166             :       }
   40167           0 :       else if ( PyArg_Parse( swig_obj[7],"i" ,&val8 ) ) {
   40168             :         arg8 = (GDALDataType *) &val8;
   40169             :       }
   40170             :       else {
   40171           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   40172           0 :         SWIG_fail;
   40173             :       }
   40174             :     }
   40175             :   }
   40176           2 :   if (swig_obj[8]) {
   40177           0 :     {
   40178             :       /* %typemap(in) char **dict */
   40179           0 :       arg9 = NULL;
   40180           0 :       if ( PySequence_Check( swig_obj[8] ) ) {
   40181           0 :         int bErr = FALSE;
   40182           0 :         arg9 = CSLFromPySequence(swig_obj[8], &bErr);
   40183           0 :         if ( bErr )
   40184             :         {
   40185           0 :           SWIG_fail;
   40186             :         }
   40187             :       }
   40188           0 :       else if ( PyMapping_Check( swig_obj[8] ) ) {
   40189           0 :         int bErr = FALSE;
   40190           0 :         arg9 = CSLFromPyMapping(swig_obj[8], &bErr);
   40191           0 :         if ( bErr )
   40192             :         {
   40193           0 :           SWIG_fail;
   40194             :         }
   40195             :       }
   40196             :       else {
   40197           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   40198           0 :         SWIG_fail;
   40199             :       }
   40200             :     }
   40201             :   }
   40202           2 :   {
   40203           2 :     const int bLocalUseExceptions = GetUseExceptions();
   40204           2 :     if ( bLocalUseExceptions ) {
   40205           0 :       pushErrorHandler();
   40206             :     }
   40207           2 :     {
   40208           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   40209           2 :       CPL_IGNORE_RET_VAL(result = (CPLErr)GDALRasterBandShadow_AdviseRead(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9));
   40210           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   40211             :     }
   40212           2 :     if ( bLocalUseExceptions ) {
   40213           0 :       popErrorHandler();
   40214             :     }
   40215             : #ifndef SED_HACKS
   40216             :     if ( bLocalUseExceptions ) {
   40217             :       CPLErr eclass = CPLGetLastErrorType();
   40218             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   40219             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   40220             :       }
   40221             :     }
   40222             : #endif
   40223             :   }
   40224           2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   40225           2 :   {
   40226             :     /* %typemap(freearg) char **dict */
   40227           2 :     CSLDestroy( arg9 );
   40228             :   }
   40229           2 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   40230             :   return resultobj;
   40231           0 : fail:
   40232           0 :   {
   40233             :     /* %typemap(freearg) char **dict */
   40234           0 :     CSLDestroy( arg9 );
   40235             :   }
   40236             :   return NULL;
   40237             : }
   40238             : 
   40239             : 
   40240          21 : SWIGINTERN PyObject *_wrap_Band_AsMDArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   40241          21 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40242          21 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   40243          21 :   void *argp1 = 0 ;
   40244          21 :   int res1 = 0 ;
   40245          21 :   PyObject *swig_obj[1] ;
   40246          21 :   GDALMDArrayHS *result = 0 ;
   40247             :   
   40248          21 :   if (!args) SWIG_fail;
   40249          21 :   swig_obj[0] = args;
   40250          21 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   40251          21 :   if (!SWIG_IsOK(res1)) {
   40252           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_AsMDArray" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   40253             :   }
   40254          21 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   40255          21 :   {
   40256          21 :     const int bLocalUseExceptions = GetUseExceptions();
   40257          21 :     if ( bLocalUseExceptions ) {
   40258           0 :       pushErrorHandler();
   40259             :     }
   40260          21 :     {
   40261          21 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   40262          21 :       result = (GDALMDArrayHS *)GDALRasterBandShadow_AsMDArray(arg1);
   40263          21 :       SWIG_PYTHON_THREAD_END_ALLOW;
   40264             :     }
   40265          21 :     if ( bLocalUseExceptions ) {
   40266           0 :       popErrorHandler();
   40267             :     }
   40268             : #ifndef SED_HACKS
   40269             :     if ( bLocalUseExceptions ) {
   40270             :       CPLErr eclass = CPLGetLastErrorType();
   40271             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   40272             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   40273             :       }
   40274             :     }
   40275             : #endif
   40276             :   }
   40277          21 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_OWN |  0 );
   40278          21 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   40279             :   return resultobj;
   40280             : fail:
   40281             :   return NULL;
   40282             : }
   40283             : 
   40284             : 
   40285        6588 : SWIGINTERN PyObject *_wrap_Band__EnablePixelTypeSignedByteWarning(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   40286        6588 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40287        6588 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   40288        6588 :   bool arg2 ;
   40289        6588 :   void *argp1 = 0 ;
   40290        6588 :   int res1 = 0 ;
   40291        6588 :   bool val2 ;
   40292        6588 :   int ecode2 = 0 ;
   40293        6588 :   PyObject *swig_obj[2] ;
   40294             :   
   40295        6588 :   if (!SWIG_Python_UnpackTuple(args, "Band__EnablePixelTypeSignedByteWarning", 2, 2, swig_obj)) SWIG_fail;
   40296        6588 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   40297        6588 :   if (!SWIG_IsOK(res1)) {
   40298           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band__EnablePixelTypeSignedByteWarning" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   40299             :   }
   40300        6588 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   40301        6588 :   ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2);
   40302        6588 :   if (!SWIG_IsOK(ecode2)) {
   40303           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band__EnablePixelTypeSignedByteWarning" "', argument " "2"" of type '" "bool""'");
   40304             :   } 
   40305        6588 :   arg2 = static_cast< bool >(val2);
   40306        6588 :   {
   40307        6588 :     const int bLocalUseExceptions = GetUseExceptions();
   40308        6588 :     if ( bLocalUseExceptions ) {
   40309        6434 :       pushErrorHandler();
   40310             :     }
   40311        6588 :     {
   40312        6588 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   40313        6588 :       GDALRasterBandShadow__EnablePixelTypeSignedByteWarning(arg1,arg2);
   40314        6588 :       SWIG_PYTHON_THREAD_END_ALLOW;
   40315             :     }
   40316        6588 :     if ( bLocalUseExceptions ) {
   40317        6434 :       popErrorHandler();
   40318             :     }
   40319             : #ifndef SED_HACKS
   40320             :     if ( bLocalUseExceptions ) {
   40321             :       CPLErr eclass = CPLGetLastErrorType();
   40322             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   40323             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   40324             :       }
   40325             :     }
   40326             : #endif
   40327             :   }
   40328        6588 :   resultobj = SWIG_Py_Void();
   40329        6588 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   40330             :   return resultobj;
   40331             : fail:
   40332             :   return NULL;
   40333             : }
   40334             : 
   40335             : 
   40336        7662 : SWIGINTERN PyObject *_wrap_Band_ReadRaster1(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   40337        7662 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40338        7662 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   40339        7662 :   double arg2 ;
   40340        7662 :   double arg3 ;
   40341        7662 :   double arg4 ;
   40342        7662 :   double arg5 ;
   40343        7662 :   void **arg6 = (void **) 0 ;
   40344        7662 :   int *arg7 = (int *) 0 ;
   40345        7662 :   int *arg8 = (int *) 0 ;
   40346        7662 :   GDALDataType *arg9 = (GDALDataType *) 0 ;
   40347        7662 :   GIntBig *arg10 = (GIntBig *) 0 ;
   40348        7662 :   GIntBig *arg11 = (GIntBig *) 0 ;
   40349        7662 :   GDALRIOResampleAlg arg12 = (GDALRIOResampleAlg) GRIORA_NearestNeighbour ;
   40350        7662 :   GDALProgressFunc arg13 = (GDALProgressFunc) NULL ;
   40351        7662 :   void *arg14 = (void *) NULL ;
   40352        7662 :   void *arg15 = (void *) NULL ;
   40353        7662 :   void *argp1 = 0 ;
   40354        7662 :   int res1 = 0 ;
   40355        7662 :   double val2 ;
   40356        7662 :   int ecode2 = 0 ;
   40357        7662 :   double val3 ;
   40358        7662 :   int ecode3 = 0 ;
   40359        7662 :   double val4 ;
   40360        7662 :   int ecode4 = 0 ;
   40361        7662 :   double val5 ;
   40362        7662 :   int ecode5 = 0 ;
   40363        7662 :   void *pyObject6 = NULL ;
   40364        7662 :   int val7 ;
   40365        7662 :   int val8 ;
   40366        7662 :   GDALDataType val9 ;
   40367        7662 :   GIntBig val10 ;
   40368        7662 :   GIntBig val11 ;
   40369        7662 :   PyObject * obj0 = 0 ;
   40370        7662 :   PyObject * obj1 = 0 ;
   40371        7662 :   PyObject * obj2 = 0 ;
   40372        7662 :   PyObject * obj3 = 0 ;
   40373        7662 :   PyObject * obj4 = 0 ;
   40374        7662 :   PyObject * obj5 = 0 ;
   40375        7662 :   PyObject * obj6 = 0 ;
   40376        7662 :   PyObject * obj7 = 0 ;
   40377        7662 :   PyObject * obj8 = 0 ;
   40378        7662 :   PyObject * obj9 = 0 ;
   40379        7662 :   PyObject * obj10 = 0 ;
   40380        7662 :   PyObject * obj11 = 0 ;
   40381        7662 :   PyObject * obj12 = 0 ;
   40382        7662 :   PyObject * obj13 = 0 ;
   40383        7662 :   char * kwnames[] = {
   40384             :     (char *)"self",  (char *)"xoff",  (char *)"yoff",  (char *)"xsize",  (char *)"ysize",  (char *)"buf_xsize",  (char *)"buf_ysize",  (char *)"buf_type",  (char *)"buf_pixel_space",  (char *)"buf_line_space",  (char *)"resample_alg",  (char *)"callback",  (char *)"callback_data",  (char *)"inputOutputBuf",  NULL 
   40385             :   };
   40386        7662 :   CPLErr result;
   40387             :   
   40388             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   40389        7662 :   PyProgressData *psProgressInfo;
   40390        7662 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   40391        7662 :   psProgressInfo->nLastReported = -1;
   40392        7662 :   psProgressInfo->psPyCallback = NULL;
   40393        7662 :   psProgressInfo->psPyCallbackData = NULL;
   40394        7662 :   arg14 = psProgressInfo;
   40395        7662 :   {
   40396             :     /* %typemap(in,numinputs=0) ( void **outPythonObject ) ( void *pyObject6 = NULL ) */
   40397        7662 :     arg6 = &pyObject6;
   40398             :   }
   40399        7662 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO|OOOOOOOOO:Band_ReadRaster1", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10, &obj11, &obj12, &obj13)) SWIG_fail;
   40400        7662 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   40401        7662 :   if (!SWIG_IsOK(res1)) {
   40402           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_ReadRaster1" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   40403             :   }
   40404        7662 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   40405        7662 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   40406        7662 :   if (!SWIG_IsOK(ecode2)) {
   40407           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_ReadRaster1" "', argument " "2"" of type '" "double""'");
   40408             :   } 
   40409        7662 :   arg2 = static_cast< double >(val2);
   40410        7662 :   ecode3 = SWIG_AsVal_double(obj2, &val3);
   40411        7662 :   if (!SWIG_IsOK(ecode3)) {
   40412           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_ReadRaster1" "', argument " "3"" of type '" "double""'");
   40413             :   } 
   40414        7662 :   arg3 = static_cast< double >(val3);
   40415        7662 :   ecode4 = SWIG_AsVal_double(obj3, &val4);
   40416        7662 :   if (!SWIG_IsOK(ecode4)) {
   40417           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Band_ReadRaster1" "', argument " "4"" of type '" "double""'");
   40418             :   } 
   40419        7662 :   arg4 = static_cast< double >(val4);
   40420        7662 :   ecode5 = SWIG_AsVal_double(obj4, &val5);
   40421        7662 :   if (!SWIG_IsOK(ecode5)) {
   40422           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Band_ReadRaster1" "', argument " "5"" of type '" "double""'");
   40423             :   } 
   40424        7662 :   arg5 = static_cast< double >(val5);
   40425        7662 :   if (obj5) {
   40426        7662 :     {
   40427             :       /* %typemap(in) (int *optional_##int) */
   40428        7662 :       if ( obj5 == Py_None ) {
   40429             :         arg7 = 0;
   40430             :       }
   40431        1279 :       else if ( PyArg_Parse( obj5,"i" ,&val7 ) ) {
   40432             :         arg7 = (int *) &val7;
   40433             :       }
   40434             :       else {
   40435           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   40436           0 :         SWIG_fail;
   40437             :       }
   40438             :     }
   40439             :   }
   40440        7662 :   if (obj6) {
   40441        7662 :     {
   40442             :       /* %typemap(in) (int *optional_##int) */
   40443        7662 :       if ( obj6 == Py_None ) {
   40444             :         arg8 = 0;
   40445             :       }
   40446        1277 :       else if ( PyArg_Parse( obj6,"i" ,&val8 ) ) {
   40447             :         arg8 = (int *) &val8;
   40448             :       }
   40449             :       else {
   40450           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   40451           0 :         SWIG_fail;
   40452             :       }
   40453             :     }
   40454             :   }
   40455        7662 :   if (obj7) {
   40456        7662 :     {
   40457             :       /* %typemap(in) (GDALDataType *optional_GDALDataType) */
   40458        7662 :       int intval = 0;
   40459        7662 :       if ( obj7 == Py_None ) {
   40460             :         arg9 = NULL;
   40461             :       }
   40462        2178 :       else if ( SWIG_IsOK(SWIG_AsVal_int(obj7, &intval)) ) {
   40463        1089 :         if( intval < GDT_Unknown || intval >= GDT_TypeCount )
   40464             :         {
   40465           0 :           SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   40466             :         }
   40467        1089 :         val9 = static_cast<GDALDataType>(intval);
   40468        1089 :         arg9 = &val9;
   40469             :       }
   40470             :       else {
   40471           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   40472           0 :         SWIG_fail;
   40473             :       }
   40474             :     }
   40475             :   }
   40476        7662 :   if (obj8) {
   40477        7662 :     {
   40478             :       /* %typemap(in) (GIntBig *optional_##GIntBig) */
   40479        7662 :       if ( obj8 == Py_None ) {
   40480             :         arg10 = 0;
   40481             :       }
   40482         162 :       else if ( PyArg_Parse( obj8,"L" ,&val10 ) ) {
   40483             :         arg10 = (GIntBig *) &val10;
   40484             :       }
   40485             :       else {
   40486           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   40487           0 :         SWIG_fail;
   40488             :       }
   40489             :     }
   40490             :   }
   40491        7662 :   if (obj9) {
   40492        7662 :     {
   40493             :       /* %typemap(in) (GIntBig *optional_##GIntBig) */
   40494        7662 :       if ( obj9 == Py_None ) {
   40495             :         arg11 = 0;
   40496             :       }
   40497          10 :       else if ( PyArg_Parse( obj9,"L" ,&val11 ) ) {
   40498             :         arg11 = (GIntBig *) &val11;
   40499             :       }
   40500             :       else {
   40501           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   40502           0 :         SWIG_fail;
   40503             :       }
   40504             :     }
   40505             :   }
   40506        7662 :   if (obj10) {
   40507        7662 :     {
   40508             :       // %typemap(in) GDALRIOResampleAlg
   40509        7662 :       int val = 0;
   40510        7662 :       int ecode = SWIG_AsVal_int(obj10, &val);
   40511        7662 :       if (!SWIG_IsOK(ecode)) {
   40512           1 :         SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALRIOResampleAlg");
   40513             :       }
   40514        7661 :       if( val < 0 ||
   40515        7660 :         ( val >= static_cast<int>(GRIORA_RESERVED_START) &&
   40516        7659 :           val <= static_cast<int>(GRIORA_RESERVED_END) ) ||
   40517             :         val > static_cast<int>(GRIORA_LAST) )
   40518             :       {
   40519           2 :         SWIG_exception_fail(SWIG_ValueError, "Invalid value for resample_alg");
   40520             :       }
   40521             :       arg12 = static_cast< GDALRIOResampleAlg >(val);
   40522             :     }
   40523             :   }
   40524        7659 :   if (obj11) {
   40525        7659 :     {
   40526             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   40527             :       /* callback_func typemap */
   40528             :       
   40529             :       /* In some cases 0 is passed instead of None. */
   40530             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   40531        7659 :       if ( PyLong_Check(obj11) || PyInt_Check(obj11) )
   40532             :       {
   40533           0 :         if( PyLong_AsLong(obj11) == 0 )
   40534             :         {
   40535           0 :           obj11 = Py_None;
   40536             :         }
   40537             :       }
   40538             :       
   40539        7659 :       if (obj11 && obj11 != Py_None ) {
   40540          15 :         void* cbfunction = NULL;
   40541          15 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj11,
   40542             :             (void**)&cbfunction,
   40543             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   40544             :             SWIG_POINTER_EXCEPTION | 0 ));
   40545             :         
   40546          15 :         if ( cbfunction == GDALTermProgress ) {
   40547             :           arg13 = GDALTermProgress;
   40548             :         } else {
   40549          15 :           if (!PyCallable_Check(obj11)) {
   40550           0 :             PyErr_SetString( PyExc_RuntimeError,
   40551             :               "Object given is not a Python function" );
   40552           0 :             SWIG_fail;
   40553             :           }
   40554          15 :           psProgressInfo->psPyCallback = obj11;
   40555          15 :           arg13 = PyProgressProxy;
   40556             :         }
   40557             :         
   40558             :       }
   40559             :       
   40560             :     }
   40561             :   }
   40562        7659 :   if (obj12) {
   40563        7659 :     {
   40564             :       /* %typemap(in) ( void* callback_data=NULL)  */
   40565        7659 :       psProgressInfo->psPyCallbackData = obj12 ;
   40566             :     }
   40567             :   }
   40568        7659 :   if (obj13) {
   40569        7659 :     {
   40570             :       /* %typemap(in) ( void *inPythonObject ) */
   40571        7659 :       arg15 = obj13;
   40572             :     }
   40573             :   }
   40574        7659 :   {
   40575        7659 :     const int bLocalUseExceptions = GetUseExceptions();
   40576        7659 :     if ( bLocalUseExceptions ) {
   40577        2209 :       pushErrorHandler();
   40578             :     }
   40579        7659 :     {
   40580        7659 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   40581        7659 :       CPL_IGNORE_RET_VAL(result = (CPLErr)GDALRasterBandShadow_ReadRaster1(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15));
   40582        7659 :       SWIG_PYTHON_THREAD_END_ALLOW;
   40583             :     }
   40584        7659 :     if ( bLocalUseExceptions ) {
   40585        2209 :       popErrorHandler();
   40586             :     }
   40587             : #ifndef SED_HACKS
   40588             :     if ( bLocalUseExceptions ) {
   40589             :       CPLErr eclass = CPLGetLastErrorType();
   40590             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   40591             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   40592             :       }
   40593             :     }
   40594             : #endif
   40595             :   }
   40596        7659 :   resultobj = SWIG_From_int(static_cast< int >(result));
   40597        7659 :   {
   40598             :     /* %typemap(argout) ( void **outPythonObject ) */
   40599        7659 :     Py_XDECREF(resultobj);
   40600        7659 :     if (*arg6)
   40601             :     {
   40602             :       resultobj = (PyObject*)*arg6;
   40603             :     }
   40604             :     else
   40605             :     {
   40606          60 :       resultobj = Py_None;
   40607          60 :       Py_INCREF(resultobj);
   40608             :     }
   40609             :   }
   40610        7659 :   {
   40611             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   40612             :     
   40613        7659 :     CPLFree(psProgressInfo);
   40614             :     
   40615             :   }
   40616        7664 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   40617             :   return resultobj;
   40618           3 : fail:
   40619           3 :   {
   40620             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   40621             :     
   40622           3 :     CPLFree(psProgressInfo);
   40623             :     
   40624             :   }
   40625             :   return NULL;
   40626             : }
   40627             : 
   40628             : 
   40629          80 : SWIGINTERN PyObject *_wrap_Band_ReadBlock(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   40630          80 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40631          80 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   40632          80 :   int arg2 ;
   40633          80 :   int arg3 ;
   40634          80 :   void **arg4 = (void **) 0 ;
   40635          80 :   void *arg5 = (void *) NULL ;
   40636          80 :   void *argp1 = 0 ;
   40637          80 :   int res1 = 0 ;
   40638          80 :   int val2 ;
   40639          80 :   int ecode2 = 0 ;
   40640          80 :   int val3 ;
   40641          80 :   int ecode3 = 0 ;
   40642          80 :   void *pyObject4 = NULL ;
   40643          80 :   PyObject * obj0 = 0 ;
   40644          80 :   PyObject * obj1 = 0 ;
   40645          80 :   PyObject * obj2 = 0 ;
   40646          80 :   PyObject * obj3 = 0 ;
   40647          80 :   char * kwnames[] = {
   40648             :     (char *)"self",  (char *)"xoff",  (char *)"yoff",  (char *)"buf_obj",  NULL 
   40649             :   };
   40650          80 :   CPLErr result;
   40651             :   
   40652          80 :   {
   40653             :     /* %typemap(in,numinputs=0) ( void **outPythonObject ) ( void *pyObject4 = NULL ) */
   40654          80 :     arg4 = &pyObject4;
   40655             :   }
   40656          80 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO|O:Band_ReadBlock", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
   40657          80 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   40658          80 :   if (!SWIG_IsOK(res1)) {
   40659           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_ReadBlock" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   40660             :   }
   40661          80 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   40662          80 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   40663          80 :   if (!SWIG_IsOK(ecode2)) {
   40664           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_ReadBlock" "', argument " "2"" of type '" "int""'");
   40665             :   } 
   40666          80 :   arg2 = static_cast< int >(val2);
   40667          80 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   40668          80 :   if (!SWIG_IsOK(ecode3)) {
   40669           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_ReadBlock" "', argument " "3"" of type '" "int""'");
   40670             :   } 
   40671          80 :   arg3 = static_cast< int >(val3);
   40672          80 :   if (obj3) {
   40673          25 :     {
   40674             :       /* %typemap(in) ( void *inPythonObject ) */
   40675          25 :       arg5 = obj3;
   40676             :     }
   40677             :   }
   40678          80 :   {
   40679          80 :     const int bLocalUseExceptions = GetUseExceptions();
   40680          80 :     if ( bLocalUseExceptions ) {
   40681          24 :       pushErrorHandler();
   40682             :     }
   40683          80 :     {
   40684          80 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   40685          80 :       CPL_IGNORE_RET_VAL(result = (CPLErr)GDALRasterBandShadow_ReadBlock(arg1,arg2,arg3,arg4,arg5));
   40686          80 :       SWIG_PYTHON_THREAD_END_ALLOW;
   40687             :     }
   40688          80 :     if ( bLocalUseExceptions ) {
   40689          24 :       popErrorHandler();
   40690             :     }
   40691             : #ifndef SED_HACKS
   40692             :     if ( bLocalUseExceptions ) {
   40693             :       CPLErr eclass = CPLGetLastErrorType();
   40694             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   40695             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   40696             :       }
   40697             :     }
   40698             : #endif
   40699             :   }
   40700          80 :   resultobj = SWIG_From_int(static_cast< int >(result));
   40701          80 :   {
   40702             :     /* %typemap(argout) ( void **outPythonObject ) */
   40703          80 :     Py_XDECREF(resultobj);
   40704          80 :     if (*arg4)
   40705             :     {
   40706             :       resultobj = (PyObject*)*arg4;
   40707             :     }
   40708             :     else
   40709             :     {
   40710          16 :       resultobj = Py_None;
   40711          16 :       Py_INCREF(resultobj);
   40712             :     }
   40713             :   }
   40714          80 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   40715             :   return resultobj;
   40716             : fail:
   40717             :   return NULL;
   40718             : }
   40719             : 
   40720             : 
   40721         271 : SWIGINTERN PyObject *Band_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   40722         271 :   PyObject *obj;
   40723         271 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   40724         271 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALRasterBandShadow, SWIG_NewClientData(obj));
   40725         271 :   return SWIG_Py_Void();
   40726             : }
   40727             : 
   40728          52 : SWIGINTERN PyObject *_wrap_new_ColorTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   40729          52 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40730          52 :   GDALPaletteInterp arg1 = (GDALPaletteInterp) GPI_RGB ;
   40731          52 :   int val1 ;
   40732          52 :   int ecode1 = 0 ;
   40733          52 :   PyObject * obj0 = 0 ;
   40734          52 :   char * kwnames[] = {
   40735             :     (char *)"palette",  NULL 
   40736             :   };
   40737          52 :   GDALColorTableShadow *result = 0 ;
   40738             :   
   40739          52 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O:new_ColorTable", kwnames, &obj0)) SWIG_fail;
   40740          52 :   if (obj0) {
   40741           0 :     ecode1 = SWIG_AsVal_int(obj0, &val1);
   40742           0 :     if (!SWIG_IsOK(ecode1)) {
   40743           0 :       SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ColorTable" "', argument " "1"" of type '" "GDALPaletteInterp""'");
   40744             :     } 
   40745           0 :     arg1 = static_cast< GDALPaletteInterp >(val1);
   40746             :   }
   40747          52 :   {
   40748          52 :     const int bLocalUseExceptions = GetUseExceptions();
   40749          52 :     if ( bLocalUseExceptions ) {
   40750          25 :       pushErrorHandler();
   40751             :     }
   40752          52 :     {
   40753          52 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   40754          52 :       result = (GDALColorTableShadow *)new_GDALColorTableShadow(arg1);
   40755          52 :       SWIG_PYTHON_THREAD_END_ALLOW;
   40756             :     }
   40757          52 :     if ( bLocalUseExceptions ) {
   40758          25 :       popErrorHandler();
   40759             :     }
   40760             : #ifndef SED_HACKS
   40761             :     if ( bLocalUseExceptions ) {
   40762             :       CPLErr eclass = CPLGetLastErrorType();
   40763             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   40764             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   40765             :       }
   40766             :     }
   40767             : #endif
   40768             :   }
   40769          52 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALColorTableShadow, SWIG_POINTER_NEW |  0 );
   40770          52 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   40771             :   return resultobj;
   40772             : fail:
   40773             :   return NULL;
   40774             : }
   40775             : 
   40776             : 
   40777          64 : SWIGINTERN PyObject *_wrap_delete_ColorTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   40778          64 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40779          64 :   GDALColorTableShadow *arg1 = (GDALColorTableShadow *) 0 ;
   40780          64 :   void *argp1 = 0 ;
   40781          64 :   int res1 = 0 ;
   40782          64 :   PyObject *swig_obj[1] ;
   40783             :   
   40784          64 :   if (!args) SWIG_fail;
   40785          64 :   swig_obj[0] = args;
   40786          64 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALColorTableShadow, SWIG_POINTER_DISOWN |  0 );
   40787          64 :   if (!SWIG_IsOK(res1)) {
   40788           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ColorTable" "', argument " "1"" of type '" "GDALColorTableShadow *""'"); 
   40789             :   }
   40790          64 :   arg1 = reinterpret_cast< GDALColorTableShadow * >(argp1);
   40791          64 :   {
   40792          64 :     const int bLocalUseExceptions = GetUseExceptions();
   40793          64 :     if ( bLocalUseExceptions ) {
   40794          33 :       pushErrorHandler();
   40795             :     }
   40796          64 :     {
   40797          64 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   40798          64 :       delete_GDALColorTableShadow(arg1);
   40799          64 :       SWIG_PYTHON_THREAD_END_ALLOW;
   40800             :     }
   40801          64 :     if ( bLocalUseExceptions ) {
   40802          33 :       popErrorHandler();
   40803             :     }
   40804             : #ifndef SED_HACKS
   40805             :     if ( bLocalUseExceptions ) {
   40806             :       CPLErr eclass = CPLGetLastErrorType();
   40807             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   40808             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   40809             :       }
   40810             :     }
   40811             : #endif
   40812             :   }
   40813          64 :   resultobj = SWIG_Py_Void();
   40814          64 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   40815             :   return resultobj;
   40816             : fail:
   40817             :   return NULL;
   40818             : }
   40819             : 
   40820             : 
   40821          12 : SWIGINTERN PyObject *_wrap_ColorTable_Clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   40822          12 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40823          12 :   GDALColorTableShadow *arg1 = (GDALColorTableShadow *) 0 ;
   40824          12 :   void *argp1 = 0 ;
   40825          12 :   int res1 = 0 ;
   40826          12 :   PyObject *swig_obj[1] ;
   40827          12 :   GDALColorTableShadow *result = 0 ;
   40828             :   
   40829          12 :   if (!args) SWIG_fail;
   40830          12 :   swig_obj[0] = args;
   40831          12 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   40832          12 :   if (!SWIG_IsOK(res1)) {
   40833           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColorTable_Clone" "', argument " "1"" of type '" "GDALColorTableShadow *""'"); 
   40834             :   }
   40835          12 :   arg1 = reinterpret_cast< GDALColorTableShadow * >(argp1);
   40836          12 :   {
   40837          12 :     const int bLocalUseExceptions = GetUseExceptions();
   40838          12 :     if ( bLocalUseExceptions ) {
   40839           8 :       pushErrorHandler();
   40840             :     }
   40841          12 :     {
   40842          12 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   40843          12 :       result = (GDALColorTableShadow *)GDALColorTableShadow_Clone(arg1);
   40844          12 :       SWIG_PYTHON_THREAD_END_ALLOW;
   40845             :     }
   40846          12 :     if ( bLocalUseExceptions ) {
   40847           8 :       popErrorHandler();
   40848             :     }
   40849             : #ifndef SED_HACKS
   40850             :     if ( bLocalUseExceptions ) {
   40851             :       CPLErr eclass = CPLGetLastErrorType();
   40852             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   40853             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   40854             :       }
   40855             :     }
   40856             : #endif
   40857             :   }
   40858          12 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALColorTableShadow, SWIG_POINTER_OWN |  0 );
   40859          12 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   40860             :   return resultobj;
   40861             : fail:
   40862             :   return NULL;
   40863             : }
   40864             : 
   40865             : 
   40866           2 : SWIGINTERN PyObject *_wrap_ColorTable_GetPaletteInterpretation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   40867           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40868           2 :   GDALColorTableShadow *arg1 = (GDALColorTableShadow *) 0 ;
   40869           2 :   void *argp1 = 0 ;
   40870           2 :   int res1 = 0 ;
   40871           2 :   PyObject *swig_obj[1] ;
   40872           2 :   GDALPaletteInterp result;
   40873             :   
   40874           2 :   if (!args) SWIG_fail;
   40875           2 :   swig_obj[0] = args;
   40876           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   40877           2 :   if (!SWIG_IsOK(res1)) {
   40878           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColorTable_GetPaletteInterpretation" "', argument " "1"" of type '" "GDALColorTableShadow *""'"); 
   40879             :   }
   40880           2 :   arg1 = reinterpret_cast< GDALColorTableShadow * >(argp1);
   40881           2 :   {
   40882           2 :     const int bLocalUseExceptions = GetUseExceptions();
   40883           2 :     if ( bLocalUseExceptions ) {
   40884           0 :       pushErrorHandler();
   40885             :     }
   40886           2 :     {
   40887           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   40888           2 :       result = (GDALPaletteInterp)GDALColorTableShadow_GetPaletteInterpretation(arg1);
   40889           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   40890             :     }
   40891           2 :     if ( bLocalUseExceptions ) {
   40892           0 :       popErrorHandler();
   40893             :     }
   40894             : #ifndef SED_HACKS
   40895             :     if ( bLocalUseExceptions ) {
   40896             :       CPLErr eclass = CPLGetLastErrorType();
   40897             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   40898             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   40899             :       }
   40900             :     }
   40901             : #endif
   40902             :   }
   40903           2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   40904           2 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   40905             :   return resultobj;
   40906             : fail:
   40907             :   return NULL;
   40908             : }
   40909             : 
   40910             : 
   40911          62 : SWIGINTERN PyObject *_wrap_ColorTable_GetCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   40912          62 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40913          62 :   GDALColorTableShadow *arg1 = (GDALColorTableShadow *) 0 ;
   40914          62 :   void *argp1 = 0 ;
   40915          62 :   int res1 = 0 ;
   40916          62 :   PyObject *swig_obj[1] ;
   40917          62 :   int result;
   40918             :   
   40919          62 :   if (!args) SWIG_fail;
   40920          62 :   swig_obj[0] = args;
   40921          62 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   40922          62 :   if (!SWIG_IsOK(res1)) {
   40923           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColorTable_GetCount" "', argument " "1"" of type '" "GDALColorTableShadow *""'"); 
   40924             :   }
   40925          62 :   arg1 = reinterpret_cast< GDALColorTableShadow * >(argp1);
   40926          62 :   {
   40927          62 :     const int bLocalUseExceptions = GetUseExceptions();
   40928          62 :     if ( bLocalUseExceptions ) {
   40929          41 :       pushErrorHandler();
   40930             :     }
   40931          62 :     {
   40932          62 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   40933          62 :       result = (int)GDALColorTableShadow_GetColorEntryCount(arg1);
   40934          62 :       SWIG_PYTHON_THREAD_END_ALLOW;
   40935             :     }
   40936          62 :     if ( bLocalUseExceptions ) {
   40937          41 :       popErrorHandler();
   40938             :     }
   40939             : #ifndef SED_HACKS
   40940             :     if ( bLocalUseExceptions ) {
   40941             :       CPLErr eclass = CPLGetLastErrorType();
   40942             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   40943             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   40944             :       }
   40945             :     }
   40946             : #endif
   40947             :   }
   40948          62 :   resultobj = SWIG_From_int(static_cast< int >(result));
   40949          62 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   40950             :   return resultobj;
   40951             : fail:
   40952             :   return NULL;
   40953             : }
   40954             : 
   40955             : 
   40956        4643 : SWIGINTERN PyObject *_wrap_ColorTable_GetColorEntry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   40957        4643 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40958        4643 :   GDALColorTableShadow *arg1 = (GDALColorTableShadow *) 0 ;
   40959        4643 :   int arg2 ;
   40960        4643 :   void *argp1 = 0 ;
   40961        4643 :   int res1 = 0 ;
   40962        4643 :   int val2 ;
   40963        4643 :   int ecode2 = 0 ;
   40964        4643 :   PyObject *swig_obj[2] ;
   40965        4643 :   GDALColorEntry *result = 0 ;
   40966             :   
   40967        4643 :   if (!SWIG_Python_UnpackTuple(args, "ColorTable_GetColorEntry", 2, 2, swig_obj)) SWIG_fail;
   40968        4643 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   40969        4643 :   if (!SWIG_IsOK(res1)) {
   40970           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColorTable_GetColorEntry" "', argument " "1"" of type '" "GDALColorTableShadow *""'"); 
   40971             :   }
   40972        4643 :   arg1 = reinterpret_cast< GDALColorTableShadow * >(argp1);
   40973        4643 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   40974        4643 :   if (!SWIG_IsOK(ecode2)) {
   40975           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColorTable_GetColorEntry" "', argument " "2"" of type '" "int""'");
   40976             :   } 
   40977        4643 :   arg2 = static_cast< int >(val2);
   40978        4643 :   {
   40979        4643 :     const int bLocalUseExceptions = GetUseExceptions();
   40980        4643 :     if ( bLocalUseExceptions ) {
   40981        4564 :       pushErrorHandler();
   40982             :     }
   40983        4643 :     {
   40984        4643 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   40985        4643 :       result = (GDALColorEntry *)GDALColorTableShadow_GetColorEntry(arg1,arg2);
   40986        4643 :       SWIG_PYTHON_THREAD_END_ALLOW;
   40987             :     }
   40988        4643 :     if ( bLocalUseExceptions ) {
   40989        4564 :       popErrorHandler();
   40990             :     }
   40991             : #ifndef SED_HACKS
   40992             :     if ( bLocalUseExceptions ) {
   40993             :       CPLErr eclass = CPLGetLastErrorType();
   40994             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   40995             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   40996             :       }
   40997             :     }
   40998             : #endif
   40999             :   }
   41000        4643 :   {
   41001             :     /* %typemap(out) GDALColorEntry* */
   41002        4643 :     if ( result != NULL )
   41003        4643 :     resultobj = Py_BuildValue( "(hhhh)", (*result).c1,(*result).c2,(*result).c3,(*result).c4);
   41004             :     else
   41005             :     resultobj = NULL;
   41006             :   }
   41007        4643 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   41008             :   return resultobj;
   41009             : fail:
   41010             :   return NULL;
   41011             : }
   41012             : 
   41013             : 
   41014           0 : SWIGINTERN PyObject *_wrap_ColorTable_GetColorEntryAsRGB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   41015           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   41016           0 :   GDALColorTableShadow *arg1 = (GDALColorTableShadow *) 0 ;
   41017           0 :   int arg2 ;
   41018           0 :   GDALColorEntry *arg3 = (GDALColorEntry *) 0 ;
   41019           0 :   void *argp1 = 0 ;
   41020           0 :   int res1 = 0 ;
   41021           0 :   int val2 ;
   41022           0 :   int ecode2 = 0 ;
   41023           0 :   GDALColorEntry ce3 ;
   41024           0 :   PyObject *swig_obj[3] ;
   41025           0 :   int result;
   41026             :   
   41027           0 :   if (!SWIG_Python_UnpackTuple(args, "ColorTable_GetColorEntryAsRGB", 3, 3, swig_obj)) SWIG_fail;
   41028           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   41029           0 :   if (!SWIG_IsOK(res1)) {
   41030           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColorTable_GetColorEntryAsRGB" "', argument " "1"" of type '" "GDALColorTableShadow *""'"); 
   41031             :   }
   41032           0 :   arg1 = reinterpret_cast< GDALColorTableShadow * >(argp1);
   41033           0 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   41034           0 :   if (!SWIG_IsOK(ecode2)) {
   41035           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColorTable_GetColorEntryAsRGB" "', argument " "2"" of type '" "int""'");
   41036             :   } 
   41037           0 :   arg2 = static_cast< int >(val2);
   41038           0 :   {
   41039             :     /* %typemap(in) GDALColorEntry* */
   41040           0 :     ce3.c4 = 255;
   41041           0 :     if (! PySequence_Check(swig_obj[2]) ) {
   41042           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   41043           0 :       SWIG_fail;
   41044             :     }
   41045           0 :     Py_ssize_t size = PySequence_Size(swig_obj[2]);
   41046           0 :     if ( size > 4 ) {
   41047           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
   41048           0 :       SWIG_fail;
   41049             :     }
   41050           0 :     if ( size < 3 ) {
   41051           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
   41052           0 :       SWIG_fail;
   41053             :     }
   41054           0 :     if ( !PyArg_ParseTuple( swig_obj[2],"hhh|h", &ce3.c1, &ce3.c2, &ce3.c3, &ce3.c4 ) ) {
   41055           0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
   41056           0 :       SWIG_fail;
   41057             :     }
   41058           0 :     arg3 = &ce3;
   41059             :   }
   41060           0 :   {
   41061           0 :     const int bLocalUseExceptions = GetUseExceptions();
   41062           0 :     if ( bLocalUseExceptions ) {
   41063           0 :       pushErrorHandler();
   41064             :     }
   41065           0 :     {
   41066           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   41067           0 :       result = (int)GDALColorTableShadow_GetColorEntryAsRGB(arg1,arg2,arg3);
   41068           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   41069             :     }
   41070           0 :     if ( bLocalUseExceptions ) {
   41071           0 :       popErrorHandler();
   41072             :     }
   41073             : #ifndef SED_HACKS
   41074             :     if ( bLocalUseExceptions ) {
   41075             :       CPLErr eclass = CPLGetLastErrorType();
   41076             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   41077             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   41078             :       }
   41079             :     }
   41080             : #endif
   41081             :   }
   41082           0 :   resultobj = SWIG_From_int(static_cast< int >(result));
   41083           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   41084             :   return resultobj;
   41085             : fail:
   41086             :   return NULL;
   41087             : }
   41088             : 
   41089             : 
   41090        1370 : SWIGINTERN PyObject *_wrap_ColorTable_SetColorEntry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   41091        1370 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   41092        1370 :   GDALColorTableShadow *arg1 = (GDALColorTableShadow *) 0 ;
   41093        1370 :   int arg2 ;
   41094        1370 :   GDALColorEntry *arg3 = (GDALColorEntry *) 0 ;
   41095        1370 :   void *argp1 = 0 ;
   41096        1370 :   int res1 = 0 ;
   41097        1370 :   int val2 ;
   41098        1370 :   int ecode2 = 0 ;
   41099        1370 :   GDALColorEntry ce3 ;
   41100        1370 :   PyObject *swig_obj[3] ;
   41101             :   
   41102        1370 :   if (!SWIG_Python_UnpackTuple(args, "ColorTable_SetColorEntry", 3, 3, swig_obj)) SWIG_fail;
   41103        1370 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   41104        1370 :   if (!SWIG_IsOK(res1)) {
   41105           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColorTable_SetColorEntry" "', argument " "1"" of type '" "GDALColorTableShadow *""'"); 
   41106             :   }
   41107        1370 :   arg1 = reinterpret_cast< GDALColorTableShadow * >(argp1);
   41108        1370 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   41109        1370 :   if (!SWIG_IsOK(ecode2)) {
   41110           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColorTable_SetColorEntry" "', argument " "2"" of type '" "int""'");
   41111             :   } 
   41112        1370 :   arg2 = static_cast< int >(val2);
   41113        1370 :   {
   41114             :     /* %typemap(in) GDALColorEntry* */
   41115        1370 :     ce3.c4 = 255;
   41116        1370 :     if (! PySequence_Check(swig_obj[2]) ) {
   41117           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   41118           0 :       SWIG_fail;
   41119             :     }
   41120        1370 :     Py_ssize_t size = PySequence_Size(swig_obj[2]);
   41121        1370 :     if ( size > 4 ) {
   41122           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
   41123           0 :       SWIG_fail;
   41124             :     }
   41125        1370 :     if ( size < 3 ) {
   41126           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
   41127           0 :       SWIG_fail;
   41128             :     }
   41129        1370 :     if ( !PyArg_ParseTuple( swig_obj[2],"hhh|h", &ce3.c1, &ce3.c2, &ce3.c3, &ce3.c4 ) ) {
   41130           0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
   41131           0 :       SWIG_fail;
   41132             :     }
   41133        1370 :     arg3 = &ce3;
   41134             :   }
   41135        1370 :   {
   41136        1370 :     const int bLocalUseExceptions = GetUseExceptions();
   41137        1370 :     if ( bLocalUseExceptions ) {
   41138        1308 :       pushErrorHandler();
   41139             :     }
   41140        1370 :     {
   41141        1370 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   41142        1370 :       GDALColorTableShadow_SetColorEntry(arg1,arg2,(GDALColorEntry const *)arg3);
   41143        1370 :       SWIG_PYTHON_THREAD_END_ALLOW;
   41144             :     }
   41145        1370 :     if ( bLocalUseExceptions ) {
   41146        1308 :       popErrorHandler();
   41147             :     }
   41148             : #ifndef SED_HACKS
   41149             :     if ( bLocalUseExceptions ) {
   41150             :       CPLErr eclass = CPLGetLastErrorType();
   41151             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   41152             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   41153             :       }
   41154             :     }
   41155             : #endif
   41156             :   }
   41157        1370 :   resultobj = SWIG_Py_Void();
   41158        1370 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   41159             :   return resultobj;
   41160             : fail:
   41161             :   return NULL;
   41162             : }
   41163             : 
   41164             : 
   41165           1 : SWIGINTERN PyObject *_wrap_ColorTable_CreateColorRamp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   41166           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   41167           1 :   GDALColorTableShadow *arg1 = (GDALColorTableShadow *) 0 ;
   41168           1 :   int arg2 ;
   41169           1 :   GDALColorEntry *arg3 = (GDALColorEntry *) 0 ;
   41170           1 :   int arg4 ;
   41171           1 :   GDALColorEntry *arg5 = (GDALColorEntry *) 0 ;
   41172           1 :   void *argp1 = 0 ;
   41173           1 :   int res1 = 0 ;
   41174           1 :   int val2 ;
   41175           1 :   int ecode2 = 0 ;
   41176           1 :   GDALColorEntry ce3 ;
   41177           1 :   int val4 ;
   41178           1 :   int ecode4 = 0 ;
   41179           1 :   GDALColorEntry ce5 ;
   41180           1 :   PyObject *swig_obj[5] ;
   41181             :   
   41182           1 :   if (!SWIG_Python_UnpackTuple(args, "ColorTable_CreateColorRamp", 5, 5, swig_obj)) SWIG_fail;
   41183           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   41184           1 :   if (!SWIG_IsOK(res1)) {
   41185           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColorTable_CreateColorRamp" "', argument " "1"" of type '" "GDALColorTableShadow *""'"); 
   41186             :   }
   41187           1 :   arg1 = reinterpret_cast< GDALColorTableShadow * >(argp1);
   41188           1 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   41189           1 :   if (!SWIG_IsOK(ecode2)) {
   41190           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColorTable_CreateColorRamp" "', argument " "2"" of type '" "int""'");
   41191             :   } 
   41192           1 :   arg2 = static_cast< int >(val2);
   41193           1 :   {
   41194             :     /* %typemap(in) GDALColorEntry* */
   41195           1 :     ce3.c4 = 255;
   41196           1 :     if (! PySequence_Check(swig_obj[2]) ) {
   41197           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   41198           0 :       SWIG_fail;
   41199             :     }
   41200           1 :     Py_ssize_t size = PySequence_Size(swig_obj[2]);
   41201           1 :     if ( size > 4 ) {
   41202           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
   41203           0 :       SWIG_fail;
   41204             :     }
   41205           1 :     if ( size < 3 ) {
   41206           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
   41207           0 :       SWIG_fail;
   41208             :     }
   41209           1 :     if ( !PyArg_ParseTuple( swig_obj[2],"hhh|h", &ce3.c1, &ce3.c2, &ce3.c3, &ce3.c4 ) ) {
   41210           0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
   41211           0 :       SWIG_fail;
   41212             :     }
   41213           1 :     arg3 = &ce3;
   41214             :   }
   41215           1 :   ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
   41216           1 :   if (!SWIG_IsOK(ecode4)) {
   41217           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "ColorTable_CreateColorRamp" "', argument " "4"" of type '" "int""'");
   41218             :   } 
   41219           1 :   arg4 = static_cast< int >(val4);
   41220           1 :   {
   41221             :     /* %typemap(in) GDALColorEntry* */
   41222           1 :     ce5.c4 = 255;
   41223           1 :     if (! PySequence_Check(swig_obj[4]) ) {
   41224           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   41225           0 :       SWIG_fail;
   41226             :     }
   41227           1 :     Py_ssize_t size = PySequence_Size(swig_obj[4]);
   41228           1 :     if ( size > 4 ) {
   41229           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
   41230           0 :       SWIG_fail;
   41231             :     }
   41232           1 :     if ( size < 3 ) {
   41233           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
   41234           0 :       SWIG_fail;
   41235             :     }
   41236           1 :     if ( !PyArg_ParseTuple( swig_obj[4],"hhh|h", &ce5.c1, &ce5.c2, &ce5.c3, &ce5.c4 ) ) {
   41237           0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
   41238           0 :       SWIG_fail;
   41239             :     }
   41240           1 :     arg5 = &ce5;
   41241             :   }
   41242           1 :   {
   41243           1 :     const int bLocalUseExceptions = GetUseExceptions();
   41244           1 :     if ( bLocalUseExceptions ) {
   41245           1 :       pushErrorHandler();
   41246             :     }
   41247           1 :     {
   41248           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   41249           1 :       GDALColorTableShadow_CreateColorRamp(arg1,arg2,(GDALColorEntry const *)arg3,arg4,(GDALColorEntry const *)arg5);
   41250           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   41251             :     }
   41252           1 :     if ( bLocalUseExceptions ) {
   41253           1 :       popErrorHandler();
   41254             :     }
   41255             : #ifndef SED_HACKS
   41256             :     if ( bLocalUseExceptions ) {
   41257             :       CPLErr eclass = CPLGetLastErrorType();
   41258             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   41259             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   41260             :       }
   41261             :     }
   41262             : #endif
   41263             :   }
   41264           1 :   resultobj = SWIG_Py_Void();
   41265           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   41266             :   return resultobj;
   41267             : fail:
   41268             :   return NULL;
   41269             : }
   41270             : 
   41271             : 
   41272         271 : SWIGINTERN PyObject *ColorTable_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   41273         271 :   PyObject *obj;
   41274         271 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   41275         271 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALColorTableShadow, SWIG_NewClientData(obj));
   41276         271 :   return SWIG_Py_Void();
   41277             : }
   41278             : 
   41279          52 : SWIGINTERN PyObject *ColorTable_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   41280          52 :   return SWIG_Python_InitShadowInstance(args);
   41281             : }
   41282             : 
   41283          58 : SWIGINTERN PyObject *_wrap_delete_SubdatasetInfo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   41284          58 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   41285          58 :   GDALSubdatasetInfoShadow *arg1 = (GDALSubdatasetInfoShadow *) 0 ;
   41286          58 :   void *argp1 = 0 ;
   41287          58 :   int res1 = 0 ;
   41288          58 :   PyObject *swig_obj[1] ;
   41289             :   
   41290          58 :   if (!args) SWIG_fail;
   41291          58 :   swig_obj[0] = args;
   41292          58 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALSubdatasetInfo, SWIG_POINTER_DISOWN |  0 );
   41293          58 :   if (!SWIG_IsOK(res1)) {
   41294           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SubdatasetInfo" "', argument " "1"" of type '" "GDALSubdatasetInfoShadow *""'"); 
   41295             :   }
   41296          58 :   arg1 = reinterpret_cast< GDALSubdatasetInfoShadow * >(argp1);
   41297          58 :   {
   41298          58 :     const int bLocalUseExceptions = GetUseExceptions();
   41299          58 :     if ( bLocalUseExceptions ) {
   41300          34 :       pushErrorHandler();
   41301             :     }
   41302          58 :     {
   41303          58 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   41304          58 :       delete_GDALSubdatasetInfoShadow(arg1);
   41305          58 :       SWIG_PYTHON_THREAD_END_ALLOW;
   41306             :     }
   41307          58 :     if ( bLocalUseExceptions ) {
   41308          34 :       popErrorHandler();
   41309             :     }
   41310             : #ifndef SED_HACKS
   41311             :     if ( bLocalUseExceptions ) {
   41312             :       CPLErr eclass = CPLGetLastErrorType();
   41313             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   41314             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   41315             :       }
   41316             :     }
   41317             : #endif
   41318             :   }
   41319          58 :   resultobj = SWIG_Py_Void();
   41320          58 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   41321             :   return resultobj;
   41322             : fail:
   41323             :   return NULL;
   41324             : }
   41325             : 
   41326             : 
   41327          35 : SWIGINTERN PyObject *_wrap_SubdatasetInfo_GetPathComponent(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   41328          35 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   41329          35 :   GDALSubdatasetInfoShadow *arg1 = (GDALSubdatasetInfoShadow *) 0 ;
   41330          35 :   void *argp1 = 0 ;
   41331          35 :   int res1 = 0 ;
   41332          35 :   PyObject *swig_obj[1] ;
   41333          35 :   retStringAndCPLFree *result = 0 ;
   41334             :   
   41335          35 :   if (!args) SWIG_fail;
   41336          35 :   swig_obj[0] = args;
   41337          35 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALSubdatasetInfo, 0 |  0 );
   41338          35 :   if (!SWIG_IsOK(res1)) {
   41339           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SubdatasetInfo_GetPathComponent" "', argument " "1"" of type '" "GDALSubdatasetInfoShadow *""'"); 
   41340             :   }
   41341          35 :   arg1 = reinterpret_cast< GDALSubdatasetInfoShadow * >(argp1);
   41342          35 :   {
   41343          35 :     const int bLocalUseExceptions = GetUseExceptions();
   41344          35 :     if ( bLocalUseExceptions ) {
   41345          19 :       pushErrorHandler();
   41346             :     }
   41347          35 :     {
   41348          35 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   41349          35 :       result = (retStringAndCPLFree *)GDALSubdatasetInfoShadow_GetPathComponent(arg1);
   41350          35 :       SWIG_PYTHON_THREAD_END_ALLOW;
   41351             :     }
   41352          35 :     if ( bLocalUseExceptions ) {
   41353          19 :       popErrorHandler();
   41354             :     }
   41355             : #ifndef SED_HACKS
   41356             :     if ( bLocalUseExceptions ) {
   41357             :       CPLErr eclass = CPLGetLastErrorType();
   41358             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   41359             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   41360             :       }
   41361             :     }
   41362             : #endif
   41363             :   }
   41364          35 :   {
   41365             :     /* %typemap(out) (retStringAndCPLFree*) */
   41366          35 :     Py_XDECREF(resultobj);
   41367          35 :     if(result)
   41368             :     {
   41369          35 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   41370          35 :       CPLFree(result);
   41371             :     }
   41372             :     else
   41373             :     {
   41374           0 :       resultobj = Py_None;
   41375           0 :       Py_INCREF(resultobj);
   41376             :     }
   41377             :   }
   41378          35 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   41379             :   return resultobj;
   41380             : fail:
   41381             :   return NULL;
   41382             : }
   41383             : 
   41384             : 
   41385          37 : SWIGINTERN PyObject *_wrap_SubdatasetInfo_GetSubdatasetComponent(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   41386          37 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   41387          37 :   GDALSubdatasetInfoShadow *arg1 = (GDALSubdatasetInfoShadow *) 0 ;
   41388          37 :   void *argp1 = 0 ;
   41389          37 :   int res1 = 0 ;
   41390          37 :   PyObject *swig_obj[1] ;
   41391          37 :   retStringAndCPLFree *result = 0 ;
   41392             :   
   41393          37 :   if (!args) SWIG_fail;
   41394          37 :   swig_obj[0] = args;
   41395          37 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALSubdatasetInfo, 0 |  0 );
   41396          37 :   if (!SWIG_IsOK(res1)) {
   41397           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SubdatasetInfo_GetSubdatasetComponent" "', argument " "1"" of type '" "GDALSubdatasetInfoShadow *""'"); 
   41398             :   }
   41399          37 :   arg1 = reinterpret_cast< GDALSubdatasetInfoShadow * >(argp1);
   41400          37 :   {
   41401          37 :     const int bLocalUseExceptions = GetUseExceptions();
   41402          37 :     if ( bLocalUseExceptions ) {
   41403          21 :       pushErrorHandler();
   41404             :     }
   41405          37 :     {
   41406          37 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   41407          37 :       result = (retStringAndCPLFree *)GDALSubdatasetInfoShadow_GetSubdatasetComponent(arg1);
   41408          37 :       SWIG_PYTHON_THREAD_END_ALLOW;
   41409             :     }
   41410          37 :     if ( bLocalUseExceptions ) {
   41411          21 :       popErrorHandler();
   41412             :     }
   41413             : #ifndef SED_HACKS
   41414             :     if ( bLocalUseExceptions ) {
   41415             :       CPLErr eclass = CPLGetLastErrorType();
   41416             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   41417             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   41418             :       }
   41419             :     }
   41420             : #endif
   41421             :   }
   41422          37 :   {
   41423             :     /* %typemap(out) (retStringAndCPLFree*) */
   41424          37 :     Py_XDECREF(resultobj);
   41425          37 :     if(result)
   41426             :     {
   41427          37 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   41428          37 :       CPLFree(result);
   41429             :     }
   41430             :     else
   41431             :     {
   41432           0 :       resultobj = Py_None;
   41433           0 :       Py_INCREF(resultobj);
   41434             :     }
   41435             :   }
   41436          37 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   41437             :   return resultobj;
   41438             : fail:
   41439             :   return NULL;
   41440             : }
   41441             : 
   41442             : 
   41443          21 : SWIGINTERN PyObject *_wrap_SubdatasetInfo_ModifyPathComponent(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   41444          21 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   41445          21 :   GDALSubdatasetInfoShadow *arg1 = (GDALSubdatasetInfoShadow *) 0 ;
   41446          21 :   char *arg2 = (char *) 0 ;
   41447          21 :   void *argp1 = 0 ;
   41448          21 :   int res1 = 0 ;
   41449          21 :   int res2 ;
   41450          21 :   char *buf2 = 0 ;
   41451          21 :   int alloc2 = 0 ;
   41452          21 :   PyObject *swig_obj[2] ;
   41453          21 :   retStringAndCPLFree *result = 0 ;
   41454             :   
   41455          21 :   if (!SWIG_Python_UnpackTuple(args, "SubdatasetInfo_ModifyPathComponent", 2, 2, swig_obj)) SWIG_fail;
   41456          21 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALSubdatasetInfo, 0 |  0 );
   41457          21 :   if (!SWIG_IsOK(res1)) {
   41458           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SubdatasetInfo_ModifyPathComponent" "', argument " "1"" of type '" "GDALSubdatasetInfoShadow *""'"); 
   41459             :   }
   41460          21 :   arg1 = reinterpret_cast< GDALSubdatasetInfoShadow * >(argp1);
   41461          21 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   41462          21 :   if (!SWIG_IsOK(res2)) {
   41463           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SubdatasetInfo_ModifyPathComponent" "', argument " "2"" of type '" "char const *""'");
   41464             :   }
   41465          21 :   arg2 = reinterpret_cast< char * >(buf2);
   41466          21 :   {
   41467          21 :     const int bLocalUseExceptions = GetUseExceptions();
   41468          21 :     if ( bLocalUseExceptions ) {
   41469          11 :       pushErrorHandler();
   41470             :     }
   41471          21 :     {
   41472          21 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   41473          21 :       result = (retStringAndCPLFree *)GDALSubdatasetInfoShadow_ModifyPathComponent(arg1,(char const *)arg2);
   41474          21 :       SWIG_PYTHON_THREAD_END_ALLOW;
   41475             :     }
   41476          21 :     if ( bLocalUseExceptions ) {
   41477          11 :       popErrorHandler();
   41478             :     }
   41479             : #ifndef SED_HACKS
   41480             :     if ( bLocalUseExceptions ) {
   41481             :       CPLErr eclass = CPLGetLastErrorType();
   41482             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   41483             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   41484             :       }
   41485             :     }
   41486             : #endif
   41487             :   }
   41488          21 :   {
   41489             :     /* %typemap(out) (retStringAndCPLFree*) */
   41490          21 :     Py_XDECREF(resultobj);
   41491          21 :     if(result)
   41492             :     {
   41493          21 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   41494          21 :       CPLFree(result);
   41495             :     }
   41496             :     else
   41497             :     {
   41498           0 :       resultobj = Py_None;
   41499           0 :       Py_INCREF(resultobj);
   41500             :     }
   41501             :   }
   41502          21 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   41503          21 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   41504             :   return resultobj;
   41505           0 : fail:
   41506           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   41507             :   return NULL;
   41508             : }
   41509             : 
   41510             : 
   41511         271 : SWIGINTERN PyObject *SubdatasetInfo_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   41512         271 :   PyObject *obj;
   41513         271 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   41514         271 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALSubdatasetInfo, SWIG_NewClientData(obj));
   41515         271 :   return SWIG_Py_Void();
   41516             : }
   41517             : 
   41518          81 : SWIGINTERN PyObject *_wrap_GetSubdatasetInfo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   41519          81 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   41520          81 :   char *arg1 = (char *) 0 ;
   41521          81 :   int res1 ;
   41522          81 :   char *buf1 = 0 ;
   41523          81 :   int alloc1 = 0 ;
   41524          81 :   PyObject *swig_obj[1] ;
   41525          81 :   GDALSubdatasetInfoShadow *result = 0 ;
   41526             :   
   41527          81 :   if (!args) SWIG_fail;
   41528          81 :   swig_obj[0] = args;
   41529          81 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   41530          81 :   if (!SWIG_IsOK(res1)) {
   41531           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetSubdatasetInfo" "', argument " "1"" of type '" "char const *""'");
   41532             :   }
   41533          81 :   arg1 = reinterpret_cast< char * >(buf1);
   41534          81 :   {
   41535          81 :     const int bLocalUseExceptions = GetUseExceptions();
   41536          81 :     if ( bLocalUseExceptions ) {
   41537          49 :       pushErrorHandler();
   41538             :     }
   41539          81 :     {
   41540          81 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   41541          81 :       result = (GDALSubdatasetInfoShadow *)GetSubdatasetInfo((char const *)arg1);
   41542          81 :       SWIG_PYTHON_THREAD_END_ALLOW;
   41543             :     }
   41544          81 :     if ( bLocalUseExceptions ) {
   41545          49 :       popErrorHandler();
   41546             :     }
   41547             : #ifndef SED_HACKS
   41548             :     if ( bLocalUseExceptions ) {
   41549             :       CPLErr eclass = CPLGetLastErrorType();
   41550             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   41551             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   41552             :       }
   41553             :     }
   41554             : #endif
   41555             :   }
   41556          81 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALSubdatasetInfo, SWIG_POINTER_OWN |  0 );
   41557          81 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   41558          81 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   41559             :   return resultobj;
   41560           0 : fail:
   41561           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   41562             :   return NULL;
   41563             : }
   41564             : 
   41565             : 
   41566          30 : SWIGINTERN PyObject *_wrap_new_Relationship(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   41567          30 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   41568          30 :   char *arg1 = (char *) 0 ;
   41569          30 :   char *arg2 = (char *) 0 ;
   41570          30 :   char *arg3 = (char *) 0 ;
   41571          30 :   GDALRelationshipCardinality arg4 ;
   41572          30 :   int res1 ;
   41573          30 :   char *buf1 = 0 ;
   41574          30 :   int alloc1 = 0 ;
   41575          30 :   int res2 ;
   41576          30 :   char *buf2 = 0 ;
   41577          30 :   int alloc2 = 0 ;
   41578          30 :   int res3 ;
   41579          30 :   char *buf3 = 0 ;
   41580          30 :   int alloc3 = 0 ;
   41581          30 :   int val4 ;
   41582          30 :   int ecode4 = 0 ;
   41583          30 :   PyObject *swig_obj[4] ;
   41584          30 :   GDALRelationshipShadow *result = 0 ;
   41585             :   
   41586          30 :   if (!SWIG_Python_UnpackTuple(args, "new_Relationship", 4, 4, swig_obj)) SWIG_fail;
   41587          30 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   41588          30 :   if (!SWIG_IsOK(res1)) {
   41589           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Relationship" "', argument " "1"" of type '" "char const *""'");
   41590             :   }
   41591          30 :   arg1 = reinterpret_cast< char * >(buf1);
   41592          30 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   41593          30 :   if (!SWIG_IsOK(res2)) {
   41594           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Relationship" "', argument " "2"" of type '" "char const *""'");
   41595             :   }
   41596          30 :   arg2 = reinterpret_cast< char * >(buf2);
   41597          30 :   res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   41598          30 :   if (!SWIG_IsOK(res3)) {
   41599           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_Relationship" "', argument " "3"" of type '" "char const *""'");
   41600             :   }
   41601          30 :   arg3 = reinterpret_cast< char * >(buf3);
   41602          30 :   ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
   41603          30 :   if (!SWIG_IsOK(ecode4)) {
   41604           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_Relationship" "', argument " "4"" of type '" "GDALRelationshipCardinality""'");
   41605             :   } 
   41606          30 :   arg4 = static_cast< GDALRelationshipCardinality >(val4);
   41607          30 :   {
   41608          30 :     if (!arg1) {
   41609           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   41610             :     }
   41611             :   }
   41612          29 :   {
   41613          29 :     const int bLocalUseExceptions = GetUseExceptions();
   41614          29 :     if ( bLocalUseExceptions ) {
   41615           2 :       pushErrorHandler();
   41616             :     }
   41617          29 :     {
   41618          29 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   41619          29 :       result = (GDALRelationshipShadow *)new_GDALRelationshipShadow((char const *)arg1,(char const *)arg2,(char const *)arg3,arg4);
   41620          29 :       SWIG_PYTHON_THREAD_END_ALLOW;
   41621             :     }
   41622          29 :     if ( bLocalUseExceptions ) {
   41623           2 :       popErrorHandler();
   41624             :     }
   41625             : #ifndef SED_HACKS
   41626             :     if ( bLocalUseExceptions ) {
   41627             :       CPLErr eclass = CPLGetLastErrorType();
   41628             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   41629             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   41630             :       }
   41631             :     }
   41632             : #endif
   41633             :   }
   41634          29 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRelationshipShadow, SWIG_POINTER_NEW |  0 );
   41635          29 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   41636          29 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   41637          29 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   41638          30 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   41639             :   return resultobj;
   41640           1 : fail:
   41641           1 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   41642           1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   41643           1 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   41644             :   return NULL;
   41645             : }
   41646             : 
   41647             : 
   41648          29 : SWIGINTERN PyObject *_wrap_delete_Relationship(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   41649          29 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   41650          29 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   41651          29 :   void *argp1 = 0 ;
   41652          29 :   int res1 = 0 ;
   41653          29 :   PyObject *swig_obj[1] ;
   41654             :   
   41655          29 :   if (!args) SWIG_fail;
   41656          29 :   swig_obj[0] = args;
   41657          29 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, SWIG_POINTER_DISOWN |  0 );
   41658          29 :   if (!SWIG_IsOK(res1)) {
   41659           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Relationship" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   41660             :   }
   41661          29 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   41662          29 :   {
   41663          29 :     const int bLocalUseExceptions = GetUseExceptions();
   41664          29 :     if ( bLocalUseExceptions ) {
   41665           2 :       pushErrorHandler();
   41666             :     }
   41667          29 :     {
   41668          29 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   41669          29 :       delete_GDALRelationshipShadow(arg1);
   41670          29 :       SWIG_PYTHON_THREAD_END_ALLOW;
   41671             :     }
   41672          29 :     if ( bLocalUseExceptions ) {
   41673           2 :       popErrorHandler();
   41674             :     }
   41675             : #ifndef SED_HACKS
   41676             :     if ( bLocalUseExceptions ) {
   41677             :       CPLErr eclass = CPLGetLastErrorType();
   41678             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   41679             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   41680             :       }
   41681             :     }
   41682             : #endif
   41683             :   }
   41684          29 :   resultobj = SWIG_Py_Void();
   41685          29 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   41686             :   return resultobj;
   41687             : fail:
   41688             :   return NULL;
   41689             : }
   41690             : 
   41691             : 
   41692          31 : SWIGINTERN PyObject *_wrap_Relationship_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   41693          31 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   41694          31 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   41695          31 :   void *argp1 = 0 ;
   41696          31 :   int res1 = 0 ;
   41697          31 :   PyObject *swig_obj[1] ;
   41698          31 :   char *result = 0 ;
   41699             :   
   41700          31 :   if (!args) SWIG_fail;
   41701          31 :   swig_obj[0] = args;
   41702          31 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   41703          31 :   if (!SWIG_IsOK(res1)) {
   41704           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetName" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   41705             :   }
   41706          31 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   41707          31 :   {
   41708          31 :     const int bLocalUseExceptions = GetUseExceptions();
   41709          31 :     if ( bLocalUseExceptions ) {
   41710           8 :       pushErrorHandler();
   41711             :     }
   41712          31 :     {
   41713          31 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   41714          31 :       result = (char *)GDALRelationshipShadow_GetName(arg1);
   41715          31 :       SWIG_PYTHON_THREAD_END_ALLOW;
   41716             :     }
   41717          31 :     if ( bLocalUseExceptions ) {
   41718           8 :       popErrorHandler();
   41719             :     }
   41720             : #ifndef SED_HACKS
   41721             :     if ( bLocalUseExceptions ) {
   41722             :       CPLErr eclass = CPLGetLastErrorType();
   41723             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   41724             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   41725             :       }
   41726             :     }
   41727             : #endif
   41728             :   }
   41729          31 :   resultobj = SWIG_FromCharPtr((const char *)result);
   41730          31 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   41731             :   return resultobj;
   41732             : fail:
   41733             :   return NULL;
   41734             : }
   41735             : 
   41736             : 
   41737          47 : SWIGINTERN PyObject *_wrap_Relationship_GetCardinality(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   41738          47 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   41739          47 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   41740          47 :   void *argp1 = 0 ;
   41741          47 :   int res1 = 0 ;
   41742          47 :   PyObject *swig_obj[1] ;
   41743          47 :   GDALRelationshipCardinality result;
   41744             :   
   41745          47 :   if (!args) SWIG_fail;
   41746          47 :   swig_obj[0] = args;
   41747          47 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   41748          47 :   if (!SWIG_IsOK(res1)) {
   41749           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetCardinality" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   41750             :   }
   41751          47 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   41752          47 :   {
   41753          47 :     const int bLocalUseExceptions = GetUseExceptions();
   41754          47 :     if ( bLocalUseExceptions ) {
   41755           9 :       pushErrorHandler();
   41756             :     }
   41757          47 :     {
   41758          47 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   41759          47 :       result = (GDALRelationshipCardinality)GDALRelationshipShadow_GetCardinality(arg1);
   41760          47 :       SWIG_PYTHON_THREAD_END_ALLOW;
   41761             :     }
   41762          47 :     if ( bLocalUseExceptions ) {
   41763           9 :       popErrorHandler();
   41764             :     }
   41765             : #ifndef SED_HACKS
   41766             :     if ( bLocalUseExceptions ) {
   41767             :       CPLErr eclass = CPLGetLastErrorType();
   41768             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   41769             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   41770             :       }
   41771             :     }
   41772             : #endif
   41773             :   }
   41774          47 :   resultobj = SWIG_From_int(static_cast< int >(result));
   41775          47 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   41776             :   return resultobj;
   41777             : fail:
   41778             :   return NULL;
   41779             : }
   41780             : 
   41781             : 
   41782          47 : SWIGINTERN PyObject *_wrap_Relationship_GetLeftTableName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   41783          47 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   41784          47 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   41785          47 :   void *argp1 = 0 ;
   41786          47 :   int res1 = 0 ;
   41787          47 :   PyObject *swig_obj[1] ;
   41788          47 :   char *result = 0 ;
   41789             :   
   41790          47 :   if (!args) SWIG_fail;
   41791          47 :   swig_obj[0] = args;
   41792          47 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   41793          47 :   if (!SWIG_IsOK(res1)) {
   41794           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetLeftTableName" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   41795             :   }
   41796          47 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   41797          47 :   {
   41798          47 :     const int bLocalUseExceptions = GetUseExceptions();
   41799          47 :     if ( bLocalUseExceptions ) {
   41800           8 :       pushErrorHandler();
   41801             :     }
   41802          47 :     {
   41803          47 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   41804          47 :       result = (char *)GDALRelationshipShadow_GetLeftTableName(arg1);
   41805          47 :       SWIG_PYTHON_THREAD_END_ALLOW;
   41806             :     }
   41807          47 :     if ( bLocalUseExceptions ) {
   41808           8 :       popErrorHandler();
   41809             :     }
   41810             : #ifndef SED_HACKS
   41811             :     if ( bLocalUseExceptions ) {
   41812             :       CPLErr eclass = CPLGetLastErrorType();
   41813             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   41814             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   41815             :       }
   41816             :     }
   41817             : #endif
   41818             :   }
   41819          47 :   resultobj = SWIG_FromCharPtr((const char *)result);
   41820          47 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   41821             :   return resultobj;
   41822             : fail:
   41823             :   return NULL;
   41824             : }
   41825             : 
   41826             : 
   41827          47 : SWIGINTERN PyObject *_wrap_Relationship_GetRightTableName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   41828          47 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   41829          47 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   41830          47 :   void *argp1 = 0 ;
   41831          47 :   int res1 = 0 ;
   41832          47 :   PyObject *swig_obj[1] ;
   41833          47 :   char *result = 0 ;
   41834             :   
   41835          47 :   if (!args) SWIG_fail;
   41836          47 :   swig_obj[0] = args;
   41837          47 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   41838          47 :   if (!SWIG_IsOK(res1)) {
   41839           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetRightTableName" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   41840             :   }
   41841          47 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   41842          47 :   {
   41843          47 :     const int bLocalUseExceptions = GetUseExceptions();
   41844          47 :     if ( bLocalUseExceptions ) {
   41845           8 :       pushErrorHandler();
   41846             :     }
   41847          47 :     {
   41848          47 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   41849          47 :       result = (char *)GDALRelationshipShadow_GetRightTableName(arg1);
   41850          47 :       SWIG_PYTHON_THREAD_END_ALLOW;
   41851             :     }
   41852          47 :     if ( bLocalUseExceptions ) {
   41853           8 :       popErrorHandler();
   41854             :     }
   41855             : #ifndef SED_HACKS
   41856             :     if ( bLocalUseExceptions ) {
   41857             :       CPLErr eclass = CPLGetLastErrorType();
   41858             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   41859             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   41860             :       }
   41861             :     }
   41862             : #endif
   41863             :   }
   41864          47 :   resultobj = SWIG_FromCharPtr((const char *)result);
   41865          47 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   41866             :   return resultobj;
   41867             : fail:
   41868             :   return NULL;
   41869             : }
   41870             : 
   41871             : 
   41872          32 : SWIGINTERN PyObject *_wrap_Relationship_GetMappingTableName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   41873          32 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   41874          32 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   41875          32 :   void *argp1 = 0 ;
   41876          32 :   int res1 = 0 ;
   41877          32 :   PyObject *swig_obj[1] ;
   41878          32 :   char *result = 0 ;
   41879             :   
   41880          32 :   if (!args) SWIG_fail;
   41881          32 :   swig_obj[0] = args;
   41882          32 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   41883          32 :   if (!SWIG_IsOK(res1)) {
   41884           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetMappingTableName" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   41885             :   }
   41886          32 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   41887          32 :   {
   41888          32 :     const int bLocalUseExceptions = GetUseExceptions();
   41889          32 :     if ( bLocalUseExceptions ) {
   41890           9 :       pushErrorHandler();
   41891             :     }
   41892          32 :     {
   41893          32 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   41894          32 :       result = (char *)GDALRelationshipShadow_GetMappingTableName(arg1);
   41895          32 :       SWIG_PYTHON_THREAD_END_ALLOW;
   41896             :     }
   41897          32 :     if ( bLocalUseExceptions ) {
   41898           9 :       popErrorHandler();
   41899             :     }
   41900             : #ifndef SED_HACKS
   41901             :     if ( bLocalUseExceptions ) {
   41902             :       CPLErr eclass = CPLGetLastErrorType();
   41903             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   41904             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   41905             :       }
   41906             :     }
   41907             : #endif
   41908             :   }
   41909          32 :   resultobj = SWIG_FromCharPtr((const char *)result);
   41910          32 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   41911             :   return resultobj;
   41912             : fail:
   41913             :   return NULL;
   41914             : }
   41915             : 
   41916             : 
   41917          14 : SWIGINTERN PyObject *_wrap_Relationship_SetMappingTableName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   41918          14 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   41919          14 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   41920          14 :   char *arg2 = (char *) 0 ;
   41921          14 :   void *argp1 = 0 ;
   41922          14 :   int res1 = 0 ;
   41923          14 :   PyObject *str2 = 0 ;
   41924          14 :   int bToFree2 = 0 ;
   41925          14 :   PyObject *swig_obj[2] ;
   41926             :   
   41927          14 :   if (!SWIG_Python_UnpackTuple(args, "Relationship_SetMappingTableName", 2, 2, swig_obj)) SWIG_fail;
   41928          14 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   41929          14 :   if (!SWIG_IsOK(res1)) {
   41930           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_SetMappingTableName" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   41931             :   }
   41932          14 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   41933          14 :   {
   41934             :     /* %typemap(in) (tostring argin) */
   41935          14 :     str2 = PyObject_Str( swig_obj[1] );
   41936          14 :     if ( str2 == 0 ) {
   41937           0 :       PyErr_SetString( PyExc_RuntimeError, "Unable to format argument as string");
   41938           0 :       SWIG_fail;
   41939             :     }
   41940             :     
   41941          14 :     arg2 = GDALPythonObjectToCStr(str2, &bToFree2);
   41942             :   }
   41943          14 :   {
   41944          14 :     const int bLocalUseExceptions = GetUseExceptions();
   41945          14 :     if ( bLocalUseExceptions ) {
   41946           1 :       pushErrorHandler();
   41947             :     }
   41948          14 :     {
   41949          14 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   41950          14 :       GDALRelationshipShadow_SetMappingTableName(arg1,(char const *)arg2);
   41951          14 :       SWIG_PYTHON_THREAD_END_ALLOW;
   41952             :     }
   41953          14 :     if ( bLocalUseExceptions ) {
   41954           1 :       popErrorHandler();
   41955             :     }
   41956             : #ifndef SED_HACKS
   41957             :     if ( bLocalUseExceptions ) {
   41958             :       CPLErr eclass = CPLGetLastErrorType();
   41959             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   41960             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   41961             :       }
   41962             :     }
   41963             : #endif
   41964             :   }
   41965          14 :   resultobj = SWIG_Py_Void();
   41966          14 :   {
   41967             :     /* %typemap(freearg) (tostring argin) */
   41968          14 :     if ( str2 != NULL)
   41969             :     {
   41970          14 :       Py_DECREF(str2);
   41971             :     }
   41972          14 :     GDALPythonFreeCStr(arg2, bToFree2);
   41973             :   }
   41974          14 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   41975             :   return resultobj;
   41976           0 : fail:
   41977           0 :   {
   41978             :     /* %typemap(freearg) (tostring argin) */
   41979           0 :     if ( str2 != NULL)
   41980             :     {
   41981           0 :       Py_DECREF(str2);
   41982             :     }
   41983          14 :     GDALPythonFreeCStr(arg2, bToFree2);
   41984             :   }
   41985             :   return NULL;
   41986             : }
   41987             : 
   41988             : 
   41989          48 : SWIGINTERN PyObject *_wrap_Relationship_GetLeftTableFields(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   41990          48 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   41991          48 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   41992          48 :   void *argp1 = 0 ;
   41993          48 :   int res1 = 0 ;
   41994          48 :   PyObject *swig_obj[1] ;
   41995          48 :   char **result = 0 ;
   41996             :   
   41997          48 :   if (!args) SWIG_fail;
   41998          48 :   swig_obj[0] = args;
   41999          48 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   42000          48 :   if (!SWIG_IsOK(res1)) {
   42001           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetLeftTableFields" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   42002             :   }
   42003          48 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   42004          48 :   {
   42005          48 :     const int bLocalUseExceptions = GetUseExceptions();
   42006          48 :     if ( bLocalUseExceptions ) {
   42007           9 :       pushErrorHandler();
   42008             :     }
   42009          48 :     {
   42010          48 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   42011          48 :       result = (char **)GDALRelationshipShadow_GetLeftTableFields(arg1);
   42012          48 :       SWIG_PYTHON_THREAD_END_ALLOW;
   42013             :     }
   42014          48 :     if ( bLocalUseExceptions ) {
   42015           9 :       popErrorHandler();
   42016             :     }
   42017             : #ifndef SED_HACKS
   42018             :     if ( bLocalUseExceptions ) {
   42019             :       CPLErr eclass = CPLGetLastErrorType();
   42020             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   42021             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   42022             :       }
   42023             :     }
   42024             : #endif
   42025             :   }
   42026          48 :   {
   42027             :     /* %typemap(out) char **CSL -> ( string ) */
   42028          48 :     bool bErr = false;
   42029          48 :     resultobj = CSLToList(result, &bErr);
   42030          48 :     CSLDestroy(result);
   42031          48 :     if( bErr ) {
   42032           0 :       SWIG_fail;
   42033             :     }
   42034             :   }
   42035          48 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   42036             :   return resultobj;
   42037             : fail:
   42038             :   return NULL;
   42039             : }
   42040             : 
   42041             : 
   42042          48 : SWIGINTERN PyObject *_wrap_Relationship_GetRightTableFields(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   42043          48 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   42044          48 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   42045          48 :   void *argp1 = 0 ;
   42046          48 :   int res1 = 0 ;
   42047          48 :   PyObject *swig_obj[1] ;
   42048          48 :   char **result = 0 ;
   42049             :   
   42050          48 :   if (!args) SWIG_fail;
   42051          48 :   swig_obj[0] = args;
   42052          48 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   42053          48 :   if (!SWIG_IsOK(res1)) {
   42054           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetRightTableFields" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   42055             :   }
   42056          48 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   42057          48 :   {
   42058          48 :     const int bLocalUseExceptions = GetUseExceptions();
   42059          48 :     if ( bLocalUseExceptions ) {
   42060           9 :       pushErrorHandler();
   42061             :     }
   42062          48 :     {
   42063          48 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   42064          48 :       result = (char **)GDALRelationshipShadow_GetRightTableFields(arg1);
   42065          48 :       SWIG_PYTHON_THREAD_END_ALLOW;
   42066             :     }
   42067          48 :     if ( bLocalUseExceptions ) {
   42068           9 :       popErrorHandler();
   42069             :     }
   42070             : #ifndef SED_HACKS
   42071             :     if ( bLocalUseExceptions ) {
   42072             :       CPLErr eclass = CPLGetLastErrorType();
   42073             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   42074             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   42075             :       }
   42076             :     }
   42077             : #endif
   42078             :   }
   42079          48 :   {
   42080             :     /* %typemap(out) char **CSL -> ( string ) */
   42081          48 :     bool bErr = false;
   42082          48 :     resultobj = CSLToList(result, &bErr);
   42083          48 :     CSLDestroy(result);
   42084          48 :     if( bErr ) {
   42085           0 :       SWIG_fail;
   42086             :     }
   42087             :   }
   42088          48 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   42089             :   return resultobj;
   42090             : fail:
   42091             :   return NULL;
   42092             : }
   42093             : 
   42094             : 
   42095          37 : SWIGINTERN PyObject *_wrap_Relationship_SetLeftTableFields(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   42096          37 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   42097          37 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   42098          37 :   char **arg2 = (char **) 0 ;
   42099          37 :   void *argp1 = 0 ;
   42100          37 :   int res1 = 0 ;
   42101          37 :   PyObject *swig_obj[2] ;
   42102             :   
   42103          37 :   if (!SWIG_Python_UnpackTuple(args, "Relationship_SetLeftTableFields", 2, 2, swig_obj)) SWIG_fail;
   42104          37 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   42105          37 :   if (!SWIG_IsOK(res1)) {
   42106           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_SetLeftTableFields" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   42107             :   }
   42108          37 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   42109          37 :   {
   42110             :     /* %typemap(in) char **dict */
   42111          37 :     arg2 = NULL;
   42112          37 :     if ( PySequence_Check( swig_obj[1] ) ) {
   42113          37 :       int bErr = FALSE;
   42114          37 :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   42115          37 :       if ( bErr )
   42116             :       {
   42117           0 :         SWIG_fail;
   42118             :       }
   42119             :     }
   42120           0 :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   42121           0 :       int bErr = FALSE;
   42122           0 :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   42123           0 :       if ( bErr )
   42124             :       {
   42125           0 :         SWIG_fail;
   42126             :       }
   42127             :     }
   42128             :     else {
   42129           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   42130           0 :       SWIG_fail;
   42131             :     }
   42132             :   }
   42133          37 :   {
   42134          37 :     const int bLocalUseExceptions = GetUseExceptions();
   42135          37 :     if ( bLocalUseExceptions ) {
   42136           1 :       pushErrorHandler();
   42137             :     }
   42138          37 :     {
   42139          37 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   42140          37 :       GDALRelationshipShadow_SetLeftTableFields(arg1,arg2);
   42141          37 :       SWIG_PYTHON_THREAD_END_ALLOW;
   42142             :     }
   42143          37 :     if ( bLocalUseExceptions ) {
   42144           1 :       popErrorHandler();
   42145             :     }
   42146             : #ifndef SED_HACKS
   42147             :     if ( bLocalUseExceptions ) {
   42148             :       CPLErr eclass = CPLGetLastErrorType();
   42149             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   42150             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   42151             :       }
   42152             :     }
   42153             : #endif
   42154             :   }
   42155          37 :   resultobj = SWIG_Py_Void();
   42156          37 :   {
   42157             :     /* %typemap(freearg) char **dict */
   42158          37 :     CSLDestroy( arg2 );
   42159             :   }
   42160          37 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   42161             :   return resultobj;
   42162           0 : fail:
   42163           0 :   {
   42164             :     /* %typemap(freearg) char **dict */
   42165           0 :     CSLDestroy( arg2 );
   42166             :   }
   42167             :   return NULL;
   42168             : }
   42169             : 
   42170             : 
   42171          38 : SWIGINTERN PyObject *_wrap_Relationship_SetRightTableFields(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   42172          38 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   42173          38 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   42174          38 :   char **arg2 = (char **) 0 ;
   42175          38 :   void *argp1 = 0 ;
   42176          38 :   int res1 = 0 ;
   42177          38 :   PyObject *swig_obj[2] ;
   42178             :   
   42179          38 :   if (!SWIG_Python_UnpackTuple(args, "Relationship_SetRightTableFields", 2, 2, swig_obj)) SWIG_fail;
   42180          38 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   42181          38 :   if (!SWIG_IsOK(res1)) {
   42182           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_SetRightTableFields" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   42183             :   }
   42184          38 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   42185          38 :   {
   42186             :     /* %typemap(in) char **dict */
   42187          38 :     arg2 = NULL;
   42188          38 :     if ( PySequence_Check( swig_obj[1] ) ) {
   42189          38 :       int bErr = FALSE;
   42190          38 :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   42191          38 :       if ( bErr )
   42192             :       {
   42193           0 :         SWIG_fail;
   42194             :       }
   42195             :     }
   42196           0 :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   42197           0 :       int bErr = FALSE;
   42198           0 :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   42199           0 :       if ( bErr )
   42200             :       {
   42201           0 :         SWIG_fail;
   42202             :       }
   42203             :     }
   42204             :     else {
   42205           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   42206           0 :       SWIG_fail;
   42207             :     }
   42208             :   }
   42209          38 :   {
   42210          38 :     const int bLocalUseExceptions = GetUseExceptions();
   42211          38 :     if ( bLocalUseExceptions ) {
   42212           1 :       pushErrorHandler();
   42213             :     }
   42214          38 :     {
   42215          38 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   42216          38 :       GDALRelationshipShadow_SetRightTableFields(arg1,arg2);
   42217          38 :       SWIG_PYTHON_THREAD_END_ALLOW;
   42218             :     }
   42219          38 :     if ( bLocalUseExceptions ) {
   42220           1 :       popErrorHandler();
   42221             :     }
   42222             : #ifndef SED_HACKS
   42223             :     if ( bLocalUseExceptions ) {
   42224             :       CPLErr eclass = CPLGetLastErrorType();
   42225             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   42226             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   42227             :       }
   42228             :     }
   42229             : #endif
   42230             :   }
   42231          38 :   resultobj = SWIG_Py_Void();
   42232          38 :   {
   42233             :     /* %typemap(freearg) char **dict */
   42234          38 :     CSLDestroy( arg2 );
   42235             :   }
   42236          38 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   42237             :   return resultobj;
   42238           0 : fail:
   42239           0 :   {
   42240             :     /* %typemap(freearg) char **dict */
   42241           0 :     CSLDestroy( arg2 );
   42242             :   }
   42243             :   return NULL;
   42244             : }
   42245             : 
   42246             : 
   42247          23 : SWIGINTERN PyObject *_wrap_Relationship_GetLeftMappingTableFields(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   42248          23 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   42249          23 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   42250          23 :   void *argp1 = 0 ;
   42251          23 :   int res1 = 0 ;
   42252          23 :   PyObject *swig_obj[1] ;
   42253          23 :   char **result = 0 ;
   42254             :   
   42255          23 :   if (!args) SWIG_fail;
   42256          23 :   swig_obj[0] = args;
   42257          23 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   42258          23 :   if (!SWIG_IsOK(res1)) {
   42259           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetLeftMappingTableFields" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   42260             :   }
   42261          23 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   42262          23 :   {
   42263          23 :     const int bLocalUseExceptions = GetUseExceptions();
   42264          23 :     if ( bLocalUseExceptions ) {
   42265           5 :       pushErrorHandler();
   42266             :     }
   42267          23 :     {
   42268          23 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   42269          23 :       result = (char **)GDALRelationshipShadow_GetLeftMappingTableFields(arg1);
   42270          23 :       SWIG_PYTHON_THREAD_END_ALLOW;
   42271             :     }
   42272          23 :     if ( bLocalUseExceptions ) {
   42273           5 :       popErrorHandler();
   42274             :     }
   42275             : #ifndef SED_HACKS
   42276             :     if ( bLocalUseExceptions ) {
   42277             :       CPLErr eclass = CPLGetLastErrorType();
   42278             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   42279             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   42280             :       }
   42281             :     }
   42282             : #endif
   42283             :   }
   42284          23 :   {
   42285             :     /* %typemap(out) char **CSL -> ( string ) */
   42286          23 :     bool bErr = false;
   42287          23 :     resultobj = CSLToList(result, &bErr);
   42288          23 :     CSLDestroy(result);
   42289          23 :     if( bErr ) {
   42290           0 :       SWIG_fail;
   42291             :     }
   42292             :   }
   42293          23 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   42294             :   return resultobj;
   42295             : fail:
   42296             :   return NULL;
   42297             : }
   42298             : 
   42299             : 
   42300          23 : SWIGINTERN PyObject *_wrap_Relationship_GetRightMappingTableFields(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   42301          23 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   42302          23 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   42303          23 :   void *argp1 = 0 ;
   42304          23 :   int res1 = 0 ;
   42305          23 :   PyObject *swig_obj[1] ;
   42306          23 :   char **result = 0 ;
   42307             :   
   42308          23 :   if (!args) SWIG_fail;
   42309          23 :   swig_obj[0] = args;
   42310          23 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   42311          23 :   if (!SWIG_IsOK(res1)) {
   42312           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetRightMappingTableFields" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   42313             :   }
   42314          23 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   42315          23 :   {
   42316          23 :     const int bLocalUseExceptions = GetUseExceptions();
   42317          23 :     if ( bLocalUseExceptions ) {
   42318           5 :       pushErrorHandler();
   42319             :     }
   42320          23 :     {
   42321          23 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   42322          23 :       result = (char **)GDALRelationshipShadow_GetRightMappingTableFields(arg1);
   42323          23 :       SWIG_PYTHON_THREAD_END_ALLOW;
   42324             :     }
   42325          23 :     if ( bLocalUseExceptions ) {
   42326           5 :       popErrorHandler();
   42327             :     }
   42328             : #ifndef SED_HACKS
   42329             :     if ( bLocalUseExceptions ) {
   42330             :       CPLErr eclass = CPLGetLastErrorType();
   42331             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   42332             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   42333             :       }
   42334             :     }
   42335             : #endif
   42336             :   }
   42337          23 :   {
   42338             :     /* %typemap(out) char **CSL -> ( string ) */
   42339          23 :     bool bErr = false;
   42340          23 :     resultobj = CSLToList(result, &bErr);
   42341          23 :     CSLDestroy(result);
   42342          23 :     if( bErr ) {
   42343           0 :       SWIG_fail;
   42344             :     }
   42345             :   }
   42346          23 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   42347             :   return resultobj;
   42348             : fail:
   42349             :   return NULL;
   42350             : }
   42351             : 
   42352             : 
   42353           9 : SWIGINTERN PyObject *_wrap_Relationship_SetLeftMappingTableFields(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   42354           9 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   42355           9 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   42356           9 :   char **arg2 = (char **) 0 ;
   42357           9 :   void *argp1 = 0 ;
   42358           9 :   int res1 = 0 ;
   42359           9 :   PyObject *swig_obj[2] ;
   42360             :   
   42361           9 :   if (!SWIG_Python_UnpackTuple(args, "Relationship_SetLeftMappingTableFields", 2, 2, swig_obj)) SWIG_fail;
   42362           9 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   42363           9 :   if (!SWIG_IsOK(res1)) {
   42364           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_SetLeftMappingTableFields" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   42365             :   }
   42366           9 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   42367           9 :   {
   42368             :     /* %typemap(in) char **dict */
   42369           9 :     arg2 = NULL;
   42370           9 :     if ( PySequence_Check( swig_obj[1] ) ) {
   42371           9 :       int bErr = FALSE;
   42372           9 :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   42373           9 :       if ( bErr )
   42374             :       {
   42375           0 :         SWIG_fail;
   42376             :       }
   42377             :     }
   42378           0 :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   42379           0 :       int bErr = FALSE;
   42380           0 :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   42381           0 :       if ( bErr )
   42382             :       {
   42383           0 :         SWIG_fail;
   42384             :       }
   42385             :     }
   42386             :     else {
   42387           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   42388           0 :       SWIG_fail;
   42389             :     }
   42390             :   }
   42391           9 :   {
   42392           9 :     const int bLocalUseExceptions = GetUseExceptions();
   42393           9 :     if ( bLocalUseExceptions ) {
   42394           1 :       pushErrorHandler();
   42395             :     }
   42396           9 :     {
   42397           9 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   42398           9 :       GDALRelationshipShadow_SetLeftMappingTableFields(arg1,arg2);
   42399           9 :       SWIG_PYTHON_THREAD_END_ALLOW;
   42400             :     }
   42401           9 :     if ( bLocalUseExceptions ) {
   42402           1 :       popErrorHandler();
   42403             :     }
   42404             : #ifndef SED_HACKS
   42405             :     if ( bLocalUseExceptions ) {
   42406             :       CPLErr eclass = CPLGetLastErrorType();
   42407             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   42408             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   42409             :       }
   42410             :     }
   42411             : #endif
   42412             :   }
   42413           9 :   resultobj = SWIG_Py_Void();
   42414           9 :   {
   42415             :     /* %typemap(freearg) char **dict */
   42416           9 :     CSLDestroy( arg2 );
   42417             :   }
   42418           9 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   42419             :   return resultobj;
   42420           0 : fail:
   42421           0 :   {
   42422             :     /* %typemap(freearg) char **dict */
   42423           0 :     CSLDestroy( arg2 );
   42424             :   }
   42425             :   return NULL;
   42426             : }
   42427             : 
   42428             : 
   42429           9 : SWIGINTERN PyObject *_wrap_Relationship_SetRightMappingTableFields(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   42430           9 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   42431           9 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   42432           9 :   char **arg2 = (char **) 0 ;
   42433           9 :   void *argp1 = 0 ;
   42434           9 :   int res1 = 0 ;
   42435           9 :   PyObject *swig_obj[2] ;
   42436             :   
   42437           9 :   if (!SWIG_Python_UnpackTuple(args, "Relationship_SetRightMappingTableFields", 2, 2, swig_obj)) SWIG_fail;
   42438           9 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   42439           9 :   if (!SWIG_IsOK(res1)) {
   42440           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_SetRightMappingTableFields" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   42441             :   }
   42442           9 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   42443           9 :   {
   42444             :     /* %typemap(in) char **dict */
   42445           9 :     arg2 = NULL;
   42446           9 :     if ( PySequence_Check( swig_obj[1] ) ) {
   42447           9 :       int bErr = FALSE;
   42448           9 :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   42449           9 :       if ( bErr )
   42450             :       {
   42451           0 :         SWIG_fail;
   42452             :       }
   42453             :     }
   42454           0 :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   42455           0 :       int bErr = FALSE;
   42456           0 :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   42457           0 :       if ( bErr )
   42458             :       {
   42459           0 :         SWIG_fail;
   42460             :       }
   42461             :     }
   42462             :     else {
   42463           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   42464           0 :       SWIG_fail;
   42465             :     }
   42466             :   }
   42467           9 :   {
   42468           9 :     const int bLocalUseExceptions = GetUseExceptions();
   42469           9 :     if ( bLocalUseExceptions ) {
   42470           1 :       pushErrorHandler();
   42471             :     }
   42472           9 :     {
   42473           9 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   42474           9 :       GDALRelationshipShadow_SetRightMappingTableFields(arg1,arg2);
   42475           9 :       SWIG_PYTHON_THREAD_END_ALLOW;
   42476             :     }
   42477           9 :     if ( bLocalUseExceptions ) {
   42478           1 :       popErrorHandler();
   42479             :     }
   42480             : #ifndef SED_HACKS
   42481             :     if ( bLocalUseExceptions ) {
   42482             :       CPLErr eclass = CPLGetLastErrorType();
   42483             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   42484             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   42485             :       }
   42486             :     }
   42487             : #endif
   42488             :   }
   42489           9 :   resultobj = SWIG_Py_Void();
   42490           9 :   {
   42491             :     /* %typemap(freearg) char **dict */
   42492           9 :     CSLDestroy( arg2 );
   42493             :   }
   42494           9 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   42495             :   return resultobj;
   42496           0 : fail:
   42497           0 :   {
   42498             :     /* %typemap(freearg) char **dict */
   42499           0 :     CSLDestroy( arg2 );
   42500             :   }
   42501             :   return NULL;
   42502             : }
   42503             : 
   42504             : 
   42505          47 : SWIGINTERN PyObject *_wrap_Relationship_GetType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   42506          47 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   42507          47 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   42508          47 :   void *argp1 = 0 ;
   42509          47 :   int res1 = 0 ;
   42510          47 :   PyObject *swig_obj[1] ;
   42511          47 :   GDALRelationshipType result;
   42512             :   
   42513          47 :   if (!args) SWIG_fail;
   42514          47 :   swig_obj[0] = args;
   42515          47 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   42516          47 :   if (!SWIG_IsOK(res1)) {
   42517           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetType" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   42518             :   }
   42519          47 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   42520          47 :   {
   42521          47 :     const int bLocalUseExceptions = GetUseExceptions();
   42522          47 :     if ( bLocalUseExceptions ) {
   42523           9 :       pushErrorHandler();
   42524             :     }
   42525          47 :     {
   42526          47 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   42527          47 :       result = (GDALRelationshipType)GDALRelationshipShadow_GetType(arg1);
   42528          47 :       SWIG_PYTHON_THREAD_END_ALLOW;
   42529             :     }
   42530          47 :     if ( bLocalUseExceptions ) {
   42531           9 :       popErrorHandler();
   42532             :     }
   42533             : #ifndef SED_HACKS
   42534             :     if ( bLocalUseExceptions ) {
   42535             :       CPLErr eclass = CPLGetLastErrorType();
   42536             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   42537             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   42538             :       }
   42539             :     }
   42540             : #endif
   42541             :   }
   42542          47 :   resultobj = SWIG_From_int(static_cast< int >(result));
   42543          47 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   42544             :   return resultobj;
   42545             : fail:
   42546             :   return NULL;
   42547             : }
   42548             : 
   42549             : 
   42550          10 : SWIGINTERN PyObject *_wrap_Relationship_SetType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   42551          10 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   42552          10 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   42553          10 :   GDALRelationshipType arg2 ;
   42554          10 :   void *argp1 = 0 ;
   42555          10 :   int res1 = 0 ;
   42556          10 :   int val2 ;
   42557          10 :   int ecode2 = 0 ;
   42558          10 :   PyObject *swig_obj[2] ;
   42559             :   
   42560          10 :   if (!SWIG_Python_UnpackTuple(args, "Relationship_SetType", 2, 2, swig_obj)) SWIG_fail;
   42561          10 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   42562          10 :   if (!SWIG_IsOK(res1)) {
   42563           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_SetType" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   42564             :   }
   42565          10 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   42566          10 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   42567          10 :   if (!SWIG_IsOK(ecode2)) {
   42568           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Relationship_SetType" "', argument " "2"" of type '" "GDALRelationshipType""'");
   42569             :   } 
   42570          10 :   arg2 = static_cast< GDALRelationshipType >(val2);
   42571          10 :   {
   42572          10 :     const int bLocalUseExceptions = GetUseExceptions();
   42573          10 :     if ( bLocalUseExceptions ) {
   42574           1 :       pushErrorHandler();
   42575             :     }
   42576          10 :     {
   42577          10 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   42578          10 :       GDALRelationshipShadow_SetType(arg1,arg2);
   42579          10 :       SWIG_PYTHON_THREAD_END_ALLOW;
   42580             :     }
   42581          10 :     if ( bLocalUseExceptions ) {
   42582           1 :       popErrorHandler();
   42583             :     }
   42584             : #ifndef SED_HACKS
   42585             :     if ( bLocalUseExceptions ) {
   42586             :       CPLErr eclass = CPLGetLastErrorType();
   42587             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   42588             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   42589             :       }
   42590             :     }
   42591             : #endif
   42592             :   }
   42593          10 :   resultobj = SWIG_Py_Void();
   42594          10 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   42595             :   return resultobj;
   42596             : fail:
   42597             :   return NULL;
   42598             : }
   42599             : 
   42600             : 
   42601          14 : SWIGINTERN PyObject *_wrap_Relationship_GetForwardPathLabel(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   42602          14 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   42603          14 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   42604          14 :   void *argp1 = 0 ;
   42605          14 :   int res1 = 0 ;
   42606          14 :   PyObject *swig_obj[1] ;
   42607          14 :   char *result = 0 ;
   42608             :   
   42609          14 :   if (!args) SWIG_fail;
   42610          14 :   swig_obj[0] = args;
   42611          14 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   42612          14 :   if (!SWIG_IsOK(res1)) {
   42613           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetForwardPathLabel" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   42614             :   }
   42615          14 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   42616          14 :   {
   42617          14 :     const int bLocalUseExceptions = GetUseExceptions();
   42618          14 :     if ( bLocalUseExceptions ) {
   42619           4 :       pushErrorHandler();
   42620             :     }
   42621          14 :     {
   42622          14 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   42623          14 :       result = (char *)GDALRelationshipShadow_GetForwardPathLabel(arg1);
   42624          14 :       SWIG_PYTHON_THREAD_END_ALLOW;
   42625             :     }
   42626          14 :     if ( bLocalUseExceptions ) {
   42627           4 :       popErrorHandler();
   42628             :     }
   42629             : #ifndef SED_HACKS
   42630             :     if ( bLocalUseExceptions ) {
   42631             :       CPLErr eclass = CPLGetLastErrorType();
   42632             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   42633             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   42634             :       }
   42635             :     }
   42636             : #endif
   42637             :   }
   42638          14 :   resultobj = SWIG_FromCharPtr((const char *)result);
   42639          14 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   42640             :   return resultobj;
   42641             : fail:
   42642             :   return NULL;
   42643             : }
   42644             : 
   42645             : 
   42646           9 : SWIGINTERN PyObject *_wrap_Relationship_SetForwardPathLabel(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   42647           9 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   42648           9 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   42649           9 :   char *arg2 = (char *) 0 ;
   42650           9 :   void *argp1 = 0 ;
   42651           9 :   int res1 = 0 ;
   42652           9 :   PyObject *str2 = 0 ;
   42653           9 :   int bToFree2 = 0 ;
   42654           9 :   PyObject *swig_obj[2] ;
   42655             :   
   42656           9 :   if (!SWIG_Python_UnpackTuple(args, "Relationship_SetForwardPathLabel", 2, 2, swig_obj)) SWIG_fail;
   42657           9 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   42658           9 :   if (!SWIG_IsOK(res1)) {
   42659           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_SetForwardPathLabel" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   42660             :   }
   42661           9 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   42662           9 :   {
   42663             :     /* %typemap(in) (tostring argin) */
   42664           9 :     str2 = PyObject_Str( swig_obj[1] );
   42665           9 :     if ( str2 == 0 ) {
   42666           0 :       PyErr_SetString( PyExc_RuntimeError, "Unable to format argument as string");
   42667           0 :       SWIG_fail;
   42668             :     }
   42669             :     
   42670           9 :     arg2 = GDALPythonObjectToCStr(str2, &bToFree2);
   42671             :   }
   42672           9 :   {
   42673           9 :     const int bLocalUseExceptions = GetUseExceptions();
   42674           9 :     if ( bLocalUseExceptions ) {
   42675           1 :       pushErrorHandler();
   42676             :     }
   42677           9 :     {
   42678           9 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   42679           9 :       GDALRelationshipShadow_SetForwardPathLabel(arg1,(char const *)arg2);
   42680           9 :       SWIG_PYTHON_THREAD_END_ALLOW;
   42681             :     }
   42682           9 :     if ( bLocalUseExceptions ) {
   42683           1 :       popErrorHandler();
   42684             :     }
   42685             : #ifndef SED_HACKS
   42686             :     if ( bLocalUseExceptions ) {
   42687             :       CPLErr eclass = CPLGetLastErrorType();
   42688             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   42689             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   42690             :       }
   42691             :     }
   42692             : #endif
   42693             :   }
   42694           9 :   resultobj = SWIG_Py_Void();
   42695           9 :   {
   42696             :     /* %typemap(freearg) (tostring argin) */
   42697           9 :     if ( str2 != NULL)
   42698             :     {
   42699           9 :       Py_DECREF(str2);
   42700             :     }
   42701           9 :     GDALPythonFreeCStr(arg2, bToFree2);
   42702             :   }
   42703           9 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   42704             :   return resultobj;
   42705           0 : fail:
   42706           0 :   {
   42707             :     /* %typemap(freearg) (tostring argin) */
   42708           0 :     if ( str2 != NULL)
   42709             :     {
   42710           0 :       Py_DECREF(str2);
   42711             :     }
   42712           9 :     GDALPythonFreeCStr(arg2, bToFree2);
   42713             :   }
   42714             :   return NULL;
   42715             : }
   42716             : 
   42717             : 
   42718          14 : SWIGINTERN PyObject *_wrap_Relationship_GetBackwardPathLabel(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   42719          14 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   42720          14 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   42721          14 :   void *argp1 = 0 ;
   42722          14 :   int res1 = 0 ;
   42723          14 :   PyObject *swig_obj[1] ;
   42724          14 :   char *result = 0 ;
   42725             :   
   42726          14 :   if (!args) SWIG_fail;
   42727          14 :   swig_obj[0] = args;
   42728          14 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   42729          14 :   if (!SWIG_IsOK(res1)) {
   42730           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetBackwardPathLabel" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   42731             :   }
   42732          14 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   42733          14 :   {
   42734          14 :     const int bLocalUseExceptions = GetUseExceptions();
   42735          14 :     if ( bLocalUseExceptions ) {
   42736           4 :       pushErrorHandler();
   42737             :     }
   42738          14 :     {
   42739          14 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   42740          14 :       result = (char *)GDALRelationshipShadow_GetBackwardPathLabel(arg1);
   42741          14 :       SWIG_PYTHON_THREAD_END_ALLOW;
   42742             :     }
   42743          14 :     if ( bLocalUseExceptions ) {
   42744           4 :       popErrorHandler();
   42745             :     }
   42746             : #ifndef SED_HACKS
   42747             :     if ( bLocalUseExceptions ) {
   42748             :       CPLErr eclass = CPLGetLastErrorType();
   42749             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   42750             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   42751             :       }
   42752             :     }
   42753             : #endif
   42754             :   }
   42755          14 :   resultobj = SWIG_FromCharPtr((const char *)result);
   42756          14 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   42757             :   return resultobj;
   42758             : fail:
   42759             :   return NULL;
   42760             : }
   42761             : 
   42762             : 
   42763           9 : SWIGINTERN PyObject *_wrap_Relationship_SetBackwardPathLabel(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   42764           9 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   42765           9 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   42766           9 :   char *arg2 = (char *) 0 ;
   42767           9 :   void *argp1 = 0 ;
   42768           9 :   int res1 = 0 ;
   42769           9 :   PyObject *str2 = 0 ;
   42770           9 :   int bToFree2 = 0 ;
   42771           9 :   PyObject *swig_obj[2] ;
   42772             :   
   42773           9 :   if (!SWIG_Python_UnpackTuple(args, "Relationship_SetBackwardPathLabel", 2, 2, swig_obj)) SWIG_fail;
   42774           9 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   42775           9 :   if (!SWIG_IsOK(res1)) {
   42776           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_SetBackwardPathLabel" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   42777             :   }
   42778           9 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   42779           9 :   {
   42780             :     /* %typemap(in) (tostring argin) */
   42781           9 :     str2 = PyObject_Str( swig_obj[1] );
   42782           9 :     if ( str2 == 0 ) {
   42783           0 :       PyErr_SetString( PyExc_RuntimeError, "Unable to format argument as string");
   42784           0 :       SWIG_fail;
   42785             :     }
   42786             :     
   42787           9 :     arg2 = GDALPythonObjectToCStr(str2, &bToFree2);
   42788             :   }
   42789           9 :   {
   42790           9 :     const int bLocalUseExceptions = GetUseExceptions();
   42791           9 :     if ( bLocalUseExceptions ) {
   42792           1 :       pushErrorHandler();
   42793             :     }
   42794           9 :     {
   42795           9 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   42796           9 :       GDALRelationshipShadow_SetBackwardPathLabel(arg1,(char const *)arg2);
   42797           9 :       SWIG_PYTHON_THREAD_END_ALLOW;
   42798             :     }
   42799           9 :     if ( bLocalUseExceptions ) {
   42800           1 :       popErrorHandler();
   42801             :     }
   42802             : #ifndef SED_HACKS
   42803             :     if ( bLocalUseExceptions ) {
   42804             :       CPLErr eclass = CPLGetLastErrorType();
   42805             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   42806             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   42807             :       }
   42808             :     }
   42809             : #endif
   42810             :   }
   42811           9 :   resultobj = SWIG_Py_Void();
   42812           9 :   {
   42813             :     /* %typemap(freearg) (tostring argin) */
   42814           9 :     if ( str2 != NULL)
   42815             :     {
   42816           9 :       Py_DECREF(str2);
   42817             :     }
   42818           9 :     GDALPythonFreeCStr(arg2, bToFree2);
   42819             :   }
   42820           9 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   42821             :   return resultobj;
   42822           0 : fail:
   42823           0 :   {
   42824             :     /* %typemap(freearg) (tostring argin) */
   42825           0 :     if ( str2 != NULL)
   42826             :     {
   42827           0 :       Py_DECREF(str2);
   42828             :     }
   42829           9 :     GDALPythonFreeCStr(arg2, bToFree2);
   42830             :   }
   42831             :   return NULL;
   42832             : }
   42833             : 
   42834             : 
   42835          44 : SWIGINTERN PyObject *_wrap_Relationship_GetRelatedTableType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   42836          44 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   42837          44 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   42838          44 :   void *argp1 = 0 ;
   42839          44 :   int res1 = 0 ;
   42840          44 :   PyObject *swig_obj[1] ;
   42841          44 :   char *result = 0 ;
   42842             :   
   42843          44 :   if (!args) SWIG_fail;
   42844          44 :   swig_obj[0] = args;
   42845          44 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   42846          44 :   if (!SWIG_IsOK(res1)) {
   42847           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetRelatedTableType" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   42848             :   }
   42849          44 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   42850          44 :   {
   42851          44 :     const int bLocalUseExceptions = GetUseExceptions();
   42852          44 :     if ( bLocalUseExceptions ) {
   42853           9 :       pushErrorHandler();
   42854             :     }
   42855          44 :     {
   42856          44 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   42857          44 :       result = (char *)GDALRelationshipShadow_GetRelatedTableType(arg1);
   42858          44 :       SWIG_PYTHON_THREAD_END_ALLOW;
   42859             :     }
   42860          44 :     if ( bLocalUseExceptions ) {
   42861           9 :       popErrorHandler();
   42862             :     }
   42863             : #ifndef SED_HACKS
   42864             :     if ( bLocalUseExceptions ) {
   42865             :       CPLErr eclass = CPLGetLastErrorType();
   42866             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   42867             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   42868             :       }
   42869             :     }
   42870             : #endif
   42871             :   }
   42872          44 :   resultobj = SWIG_FromCharPtr((const char *)result);
   42873          44 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   42874             :   return resultobj;
   42875             : fail:
   42876             :   return NULL;
   42877             : }
   42878             : 
   42879             : 
   42880          20 : SWIGINTERN PyObject *_wrap_Relationship_SetRelatedTableType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   42881          20 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   42882          20 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   42883          20 :   char *arg2 = (char *) 0 ;
   42884          20 :   void *argp1 = 0 ;
   42885          20 :   int res1 = 0 ;
   42886          20 :   PyObject *str2 = 0 ;
   42887          20 :   int bToFree2 = 0 ;
   42888          20 :   PyObject *swig_obj[2] ;
   42889             :   
   42890          20 :   if (!SWIG_Python_UnpackTuple(args, "Relationship_SetRelatedTableType", 2, 2, swig_obj)) SWIG_fail;
   42891          20 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   42892          20 :   if (!SWIG_IsOK(res1)) {
   42893           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_SetRelatedTableType" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   42894             :   }
   42895          20 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   42896          20 :   {
   42897             :     /* %typemap(in) (tostring argin) */
   42898          20 :     str2 = PyObject_Str( swig_obj[1] );
   42899          20 :     if ( str2 == 0 ) {
   42900           0 :       PyErr_SetString( PyExc_RuntimeError, "Unable to format argument as string");
   42901           0 :       SWIG_fail;
   42902             :     }
   42903             :     
   42904          20 :     arg2 = GDALPythonObjectToCStr(str2, &bToFree2);
   42905             :   }
   42906          20 :   {
   42907          20 :     const int bLocalUseExceptions = GetUseExceptions();
   42908          20 :     if ( bLocalUseExceptions ) {
   42909           1 :       pushErrorHandler();
   42910             :     }
   42911          20 :     {
   42912          20 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   42913          20 :       GDALRelationshipShadow_SetRelatedTableType(arg1,(char const *)arg2);
   42914          20 :       SWIG_PYTHON_THREAD_END_ALLOW;
   42915             :     }
   42916          20 :     if ( bLocalUseExceptions ) {
   42917           1 :       popErrorHandler();
   42918             :     }
   42919             : #ifndef SED_HACKS
   42920             :     if ( bLocalUseExceptions ) {
   42921             :       CPLErr eclass = CPLGetLastErrorType();
   42922             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   42923             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   42924             :       }
   42925             :     }
   42926             : #endif
   42927             :   }
   42928          20 :   resultobj = SWIG_Py_Void();
   42929          20 :   {
   42930             :     /* %typemap(freearg) (tostring argin) */
   42931          20 :     if ( str2 != NULL)
   42932             :     {
   42933          20 :       Py_DECREF(str2);
   42934             :     }
   42935          20 :     GDALPythonFreeCStr(arg2, bToFree2);
   42936             :   }
   42937          20 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   42938             :   return resultobj;
   42939           0 : fail:
   42940           0 :   {
   42941             :     /* %typemap(freearg) (tostring argin) */
   42942           0 :     if ( str2 != NULL)
   42943             :     {
   42944           0 :       Py_DECREF(str2);
   42945             :     }
   42946          20 :     GDALPythonFreeCStr(arg2, bToFree2);
   42947             :   }
   42948             :   return NULL;
   42949             : }
   42950             : 
   42951             : 
   42952         271 : SWIGINTERN PyObject *Relationship_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   42953         271 :   PyObject *obj;
   42954         271 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   42955         271 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALRelationshipShadow, SWIG_NewClientData(obj));
   42956         271 :   return SWIG_Py_Void();
   42957             : }
   42958             : 
   42959          29 : SWIGINTERN PyObject *Relationship_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   42960          29 :   return SWIG_Python_InitShadowInstance(args);
   42961             : }
   42962             : 
   42963        3726 : SWIGINTERN PyObject *_wrap_TermProgress_nocb(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   42964        3726 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   42965        3726 :   double arg1 ;
   42966        3726 :   char *arg2 = (char *) NULL ;
   42967        3726 :   void *arg3 = (void *) NULL ;
   42968        3726 :   double val1 ;
   42969        3726 :   int ecode1 = 0 ;
   42970        3726 :   int res2 ;
   42971        3726 :   char *buf2 = 0 ;
   42972        3726 :   int alloc2 = 0 ;
   42973        3726 :   int res3 ;
   42974        3726 :   PyObject * obj0 = 0 ;
   42975        3726 :   PyObject * obj1 = 0 ;
   42976        3726 :   PyObject * obj2 = 0 ;
   42977        3726 :   char * kwnames[] = {
   42978             :     (char *)"dfProgress",  (char *)"pszMessage",  (char *)"pData",  NULL 
   42979             :   };
   42980        3726 :   int result;
   42981             :   
   42982        3726 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OO:TermProgress_nocb", kwnames, &obj0, &obj1, &obj2)) SWIG_fail;
   42983        3726 :   ecode1 = SWIG_AsVal_double(obj0, &val1);
   42984        3726 :   if (!SWIG_IsOK(ecode1)) {
   42985           0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "TermProgress_nocb" "', argument " "1"" of type '" "double""'");
   42986             :   } 
   42987        3726 :   arg1 = static_cast< double >(val1);
   42988        3726 :   if (obj1) {
   42989        1360 :     res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   42990        1360 :     if (!SWIG_IsOK(res2)) {
   42991           0 :       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TermProgress_nocb" "', argument " "2"" of type '" "char const *""'");
   42992             :     }
   42993        1360 :     arg2 = reinterpret_cast< char * >(buf2);
   42994             :   }
   42995        3726 :   if (obj2) {
   42996        1360 :     res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3), 0, 0);
   42997        1360 :     if (!SWIG_IsOK(res3)) {
   42998           0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "TermProgress_nocb" "', argument " "3"" of type '" "void *""'"); 
   42999             :     }
   43000             :   }
   43001        3726 :   {
   43002        3726 :     const int bLocalUseExceptions = GetUseExceptions();
   43003        3726 :     if ( bLocalUseExceptions ) {
   43004        3723 :       pushErrorHandler();
   43005             :     }
   43006        3726 :     {
   43007        3726 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   43008        3726 :       result = (int)GDALTermProgress_nocb(arg1,(char const *)arg2,arg3);
   43009        3726 :       SWIG_PYTHON_THREAD_END_ALLOW;
   43010             :     }
   43011        3726 :     if ( bLocalUseExceptions ) {
   43012        3723 :       popErrorHandler();
   43013             :     }
   43014             : #ifndef SED_HACKS
   43015             :     if ( bLocalUseExceptions ) {
   43016             :       CPLErr eclass = CPLGetLastErrorType();
   43017             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   43018             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   43019             :       }
   43020             :     }
   43021             : #endif
   43022             :   }
   43023        3726 :   resultobj = SWIG_From_int(static_cast< int >(result));
   43024        3726 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   43025        3726 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   43026             :   return resultobj;
   43027           0 : fail:
   43028           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   43029             :   return NULL;
   43030             : }
   43031             : 
   43032             : 
   43033           3 : SWIGINTERN PyObject *_wrap_ComputeMedianCutPCT(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   43034           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   43035           3 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   43036           3 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   43037           3 :   GDALRasterBandShadow *arg3 = (GDALRasterBandShadow *) 0 ;
   43038           3 :   int arg4 ;
   43039           3 :   GDALColorTableShadow *arg5 = (GDALColorTableShadow *) 0 ;
   43040           3 :   GDALProgressFunc arg6 = (GDALProgressFunc) NULL ;
   43041           3 :   void *arg7 = (void *) NULL ;
   43042           3 :   void *argp1 = 0 ;
   43043           3 :   int res1 = 0 ;
   43044           3 :   void *argp2 = 0 ;
   43045           3 :   int res2 = 0 ;
   43046           3 :   void *argp3 = 0 ;
   43047           3 :   int res3 = 0 ;
   43048           3 :   int val4 ;
   43049           3 :   int ecode4 = 0 ;
   43050           3 :   void *argp5 = 0 ;
   43051           3 :   int res5 = 0 ;
   43052           3 :   PyObject * obj0 = 0 ;
   43053           3 :   PyObject * obj1 = 0 ;
   43054           3 :   PyObject * obj2 = 0 ;
   43055           3 :   PyObject * obj3 = 0 ;
   43056           3 :   PyObject * obj4 = 0 ;
   43057           3 :   PyObject * obj5 = 0 ;
   43058           3 :   PyObject * obj6 = 0 ;
   43059           3 :   char * kwnames[] = {
   43060             :     (char *)"red",  (char *)"green",  (char *)"blue",  (char *)"num_colors",  (char *)"colors",  (char *)"callback",  (char *)"callback_data",  NULL 
   43061             :   };
   43062           3 :   int result;
   43063             :   
   43064             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   43065           3 :   PyProgressData *psProgressInfo;
   43066           3 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   43067           3 :   psProgressInfo->nLastReported = -1;
   43068           3 :   psProgressInfo->psPyCallback = NULL;
   43069           3 :   psProgressInfo->psPyCallbackData = NULL;
   43070           3 :   arg7 = psProgressInfo;
   43071           3 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO|OO:ComputeMedianCutPCT", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
   43072           3 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   43073           3 :   if (!SWIG_IsOK(res1)) {
   43074           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ComputeMedianCutPCT" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   43075             :   }
   43076           3 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   43077           3 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   43078           3 :   if (!SWIG_IsOK(res2)) {
   43079           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ComputeMedianCutPCT" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   43080             :   }
   43081           3 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   43082           3 :   res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   43083           3 :   if (!SWIG_IsOK(res3)) {
   43084           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ComputeMedianCutPCT" "', argument " "3"" of type '" "GDALRasterBandShadow *""'"); 
   43085             :   }
   43086           3 :   arg3 = reinterpret_cast< GDALRasterBandShadow * >(argp3);
   43087           3 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   43088           3 :   if (!SWIG_IsOK(ecode4)) {
   43089           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "ComputeMedianCutPCT" "', argument " "4"" of type '" "int""'");
   43090             :   } 
   43091           3 :   arg4 = static_cast< int >(val4);
   43092           3 :   res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   43093           3 :   if (!SWIG_IsOK(res5)) {
   43094           0 :     SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "ComputeMedianCutPCT" "', argument " "5"" of type '" "GDALColorTableShadow *""'"); 
   43095             :   }
   43096           3 :   arg5 = reinterpret_cast< GDALColorTableShadow * >(argp5);
   43097           3 :   if (obj5) {
   43098           2 :     {
   43099             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   43100             :       /* callback_func typemap */
   43101             :       
   43102             :       /* In some cases 0 is passed instead of None. */
   43103             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   43104           2 :       if ( PyLong_Check(obj5) || PyInt_Check(obj5) )
   43105             :       {
   43106           0 :         if( PyLong_AsLong(obj5) == 0 )
   43107             :         {
   43108           0 :           obj5 = Py_None;
   43109             :         }
   43110             :       }
   43111             :       
   43112           2 :       if (obj5 && obj5 != Py_None ) {
   43113           2 :         void* cbfunction = NULL;
   43114           2 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj5,
   43115             :             (void**)&cbfunction,
   43116             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   43117             :             SWIG_POINTER_EXCEPTION | 0 ));
   43118             :         
   43119           2 :         if ( cbfunction == GDALTermProgress ) {
   43120             :           arg6 = GDALTermProgress;
   43121             :         } else {
   43122           2 :           if (!PyCallable_Check(obj5)) {
   43123           0 :             PyErr_SetString( PyExc_RuntimeError,
   43124             :               "Object given is not a Python function" );
   43125           0 :             SWIG_fail;
   43126             :           }
   43127           2 :           psProgressInfo->psPyCallback = obj5;
   43128           2 :           arg6 = PyProgressProxy;
   43129             :         }
   43130             :         
   43131             :       }
   43132             :       
   43133             :     }
   43134             :   }
   43135           3 :   if (obj6) {
   43136           0 :     {
   43137             :       /* %typemap(in) ( void* callback_data=NULL)  */
   43138           0 :       psProgressInfo->psPyCallbackData = obj6 ;
   43139             :     }
   43140             :   }
   43141           3 :   {
   43142           3 :     if (!arg1) {
   43143           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   43144             :     }
   43145             :   }
   43146           3 :   {
   43147           3 :     if (!arg2) {
   43148           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   43149             :     }
   43150             :   }
   43151           3 :   {
   43152           3 :     if (!arg3) {
   43153           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   43154             :     }
   43155             :   }
   43156           3 :   {
   43157           3 :     if (!arg5) {
   43158           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   43159             :     }
   43160             :   }
   43161           3 :   {
   43162           3 :     const int bLocalUseExceptions = GetUseExceptions();
   43163           3 :     if ( bLocalUseExceptions ) {
   43164           3 :       pushErrorHandler();
   43165             :     }
   43166           3 :     {
   43167           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   43168           3 :       result = (int)ComputeMedianCutPCT(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   43169           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   43170             :     }
   43171           3 :     if ( bLocalUseExceptions ) {
   43172           3 :       popErrorHandler();
   43173             :     }
   43174             : #ifndef SED_HACKS
   43175             :     if ( bLocalUseExceptions ) {
   43176             :       CPLErr eclass = CPLGetLastErrorType();
   43177             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   43178             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   43179             :       }
   43180             :     }
   43181             : #endif
   43182             :   }
   43183           3 :   resultobj = SWIG_From_int(static_cast< int >(result));
   43184           3 :   {
   43185             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   43186             :     
   43187           3 :     CPLFree(psProgressInfo);
   43188             :     
   43189             :   }
   43190           3 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   43191             :   return resultobj;
   43192           0 : fail:
   43193           0 :   {
   43194             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   43195             :     
   43196           0 :     CPLFree(psProgressInfo);
   43197             :     
   43198             :   }
   43199             :   return NULL;
   43200             : }
   43201             : 
   43202             : 
   43203           6 : SWIGINTERN PyObject *_wrap_DitherRGB2PCT(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   43204           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   43205           6 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   43206           6 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   43207           6 :   GDALRasterBandShadow *arg3 = (GDALRasterBandShadow *) 0 ;
   43208           6 :   GDALRasterBandShadow *arg4 = (GDALRasterBandShadow *) 0 ;
   43209           6 :   GDALColorTableShadow *arg5 = (GDALColorTableShadow *) 0 ;
   43210           6 :   GDALProgressFunc arg6 = (GDALProgressFunc) NULL ;
   43211           6 :   void *arg7 = (void *) NULL ;
   43212           6 :   void *argp1 = 0 ;
   43213           6 :   int res1 = 0 ;
   43214           6 :   void *argp2 = 0 ;
   43215           6 :   int res2 = 0 ;
   43216           6 :   void *argp3 = 0 ;
   43217           6 :   int res3 = 0 ;
   43218           6 :   void *argp4 = 0 ;
   43219           6 :   int res4 = 0 ;
   43220           6 :   void *argp5 = 0 ;
   43221           6 :   int res5 = 0 ;
   43222           6 :   PyObject * obj0 = 0 ;
   43223           6 :   PyObject * obj1 = 0 ;
   43224           6 :   PyObject * obj2 = 0 ;
   43225           6 :   PyObject * obj3 = 0 ;
   43226           6 :   PyObject * obj4 = 0 ;
   43227           6 :   PyObject * obj5 = 0 ;
   43228           6 :   PyObject * obj6 = 0 ;
   43229           6 :   char * kwnames[] = {
   43230             :     (char *)"red",  (char *)"green",  (char *)"blue",  (char *)"target",  (char *)"colors",  (char *)"callback",  (char *)"callback_data",  NULL 
   43231             :   };
   43232           6 :   int result;
   43233             :   
   43234             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   43235           6 :   PyProgressData *psProgressInfo;
   43236           6 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   43237           6 :   psProgressInfo->nLastReported = -1;
   43238           6 :   psProgressInfo->psPyCallback = NULL;
   43239           6 :   psProgressInfo->psPyCallbackData = NULL;
   43240           6 :   arg7 = psProgressInfo;
   43241           6 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO|OO:DitherRGB2PCT", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
   43242           6 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   43243           6 :   if (!SWIG_IsOK(res1)) {
   43244           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DitherRGB2PCT" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   43245             :   }
   43246           6 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   43247           6 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   43248           6 :   if (!SWIG_IsOK(res2)) {
   43249           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DitherRGB2PCT" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   43250             :   }
   43251           6 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   43252           6 :   res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   43253           6 :   if (!SWIG_IsOK(res3)) {
   43254           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "DitherRGB2PCT" "', argument " "3"" of type '" "GDALRasterBandShadow *""'"); 
   43255             :   }
   43256           6 :   arg3 = reinterpret_cast< GDALRasterBandShadow * >(argp3);
   43257           6 :   res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   43258           6 :   if (!SWIG_IsOK(res4)) {
   43259           0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "DitherRGB2PCT" "', argument " "4"" of type '" "GDALRasterBandShadow *""'"); 
   43260             :   }
   43261           6 :   arg4 = reinterpret_cast< GDALRasterBandShadow * >(argp4);
   43262           6 :   res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   43263           6 :   if (!SWIG_IsOK(res5)) {
   43264           0 :     SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "DitherRGB2PCT" "', argument " "5"" of type '" "GDALColorTableShadow *""'"); 
   43265             :   }
   43266           6 :   arg5 = reinterpret_cast< GDALColorTableShadow * >(argp5);
   43267           6 :   if (obj5) {
   43268           5 :     {
   43269             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   43270             :       /* callback_func typemap */
   43271             :       
   43272             :       /* In some cases 0 is passed instead of None. */
   43273             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   43274           5 :       if ( PyLong_Check(obj5) || PyInt_Check(obj5) )
   43275             :       {
   43276           0 :         if( PyLong_AsLong(obj5) == 0 )
   43277             :         {
   43278           0 :           obj5 = Py_None;
   43279             :         }
   43280             :       }
   43281             :       
   43282           5 :       if (obj5 && obj5 != Py_None ) {
   43283           5 :         void* cbfunction = NULL;
   43284           5 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj5,
   43285             :             (void**)&cbfunction,
   43286             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   43287             :             SWIG_POINTER_EXCEPTION | 0 ));
   43288             :         
   43289           5 :         if ( cbfunction == GDALTermProgress ) {
   43290             :           arg6 = GDALTermProgress;
   43291             :         } else {
   43292           5 :           if (!PyCallable_Check(obj5)) {
   43293           0 :             PyErr_SetString( PyExc_RuntimeError,
   43294             :               "Object given is not a Python function" );
   43295           0 :             SWIG_fail;
   43296             :           }
   43297           5 :           psProgressInfo->psPyCallback = obj5;
   43298           5 :           arg6 = PyProgressProxy;
   43299             :         }
   43300             :         
   43301             :       }
   43302             :       
   43303             :     }
   43304             :   }
   43305           6 :   if (obj6) {
   43306           0 :     {
   43307             :       /* %typemap(in) ( void* callback_data=NULL)  */
   43308           0 :       psProgressInfo->psPyCallbackData = obj6 ;
   43309             :     }
   43310             :   }
   43311           6 :   {
   43312           6 :     if (!arg1) {
   43313           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   43314             :     }
   43315             :   }
   43316           6 :   {
   43317           6 :     if (!arg2) {
   43318           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   43319             :     }
   43320             :   }
   43321           6 :   {
   43322           6 :     if (!arg3) {
   43323           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   43324             :     }
   43325             :   }
   43326           6 :   {
   43327           6 :     if (!arg4) {
   43328           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   43329             :     }
   43330             :   }
   43331           6 :   {
   43332           6 :     if (!arg5) {
   43333           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   43334             :     }
   43335             :   }
   43336           6 :   {
   43337           6 :     const int bLocalUseExceptions = GetUseExceptions();
   43338           6 :     if ( bLocalUseExceptions ) {
   43339           6 :       pushErrorHandler();
   43340             :     }
   43341           6 :     {
   43342           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   43343           6 :       result = (int)DitherRGB2PCT(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   43344           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   43345             :     }
   43346           6 :     if ( bLocalUseExceptions ) {
   43347           6 :       popErrorHandler();
   43348             :     }
   43349             : #ifndef SED_HACKS
   43350             :     if ( bLocalUseExceptions ) {
   43351             :       CPLErr eclass = CPLGetLastErrorType();
   43352             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   43353             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   43354             :       }
   43355             :     }
   43356             : #endif
   43357             :   }
   43358           6 :   resultobj = SWIG_From_int(static_cast< int >(result));
   43359           6 :   {
   43360             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   43361             :     
   43362           6 :     CPLFree(psProgressInfo);
   43363             :     
   43364             :   }
   43365           6 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   43366             :   return resultobj;
   43367           0 : fail:
   43368           0 :   {
   43369             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   43370             :     
   43371           0 :     CPLFree(psProgressInfo);
   43372             :     
   43373             :   }
   43374             :   return NULL;
   43375             : }
   43376             : 
   43377             : 
   43378          62 : SWIGINTERN PyObject *_wrap_ReprojectImage(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   43379          62 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   43380          62 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   43381          62 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   43382          62 :   char *arg3 = (char *) NULL ;
   43383          62 :   char *arg4 = (char *) NULL ;
   43384          62 :   GDALResampleAlg arg5 = (GDALResampleAlg) GRA_NearestNeighbour ;
   43385          62 :   double arg6 = (double) 0.0 ;
   43386          62 :   double arg7 = (double) 0.0 ;
   43387          62 :   GDALProgressFunc arg8 = (GDALProgressFunc) NULL ;
   43388          62 :   void *arg9 = (void *) NULL ;
   43389          62 :   char **arg10 = (char **) NULL ;
   43390          62 :   void *argp1 = 0 ;
   43391          62 :   int res1 = 0 ;
   43392          62 :   void *argp2 = 0 ;
   43393          62 :   int res2 = 0 ;
   43394          62 :   int res3 ;
   43395          62 :   char *buf3 = 0 ;
   43396          62 :   int alloc3 = 0 ;
   43397          62 :   int res4 ;
   43398          62 :   char *buf4 = 0 ;
   43399          62 :   int alloc4 = 0 ;
   43400          62 :   int val5 ;
   43401          62 :   int ecode5 = 0 ;
   43402          62 :   double val6 ;
   43403          62 :   int ecode6 = 0 ;
   43404          62 :   double val7 ;
   43405          62 :   int ecode7 = 0 ;
   43406          62 :   PyObject * obj0 = 0 ;
   43407          62 :   PyObject * obj1 = 0 ;
   43408          62 :   PyObject * obj2 = 0 ;
   43409          62 :   PyObject * obj3 = 0 ;
   43410          62 :   PyObject * obj4 = 0 ;
   43411          62 :   PyObject * obj5 = 0 ;
   43412          62 :   PyObject * obj6 = 0 ;
   43413          62 :   PyObject * obj7 = 0 ;
   43414          62 :   PyObject * obj8 = 0 ;
   43415          62 :   PyObject * obj9 = 0 ;
   43416          62 :   char * kwnames[] = {
   43417             :     (char *)"src_ds",  (char *)"dst_ds",  (char *)"src_wkt",  (char *)"dst_wkt",  (char *)"eResampleAlg",  (char *)"WarpMemoryLimit",  (char *)"maxerror",  (char *)"callback",  (char *)"callback_data",  (char *)"options",  NULL 
   43418             :   };
   43419          62 :   CPLErr result;
   43420             :   
   43421             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   43422          62 :   PyProgressData *psProgressInfo;
   43423          62 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   43424          62 :   psProgressInfo->nLastReported = -1;
   43425          62 :   psProgressInfo->psPyCallback = NULL;
   43426          62 :   psProgressInfo->psPyCallbackData = NULL;
   43427          62 :   arg9 = psProgressInfo;
   43428          62 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OOOOOOOO:ReprojectImage", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9)) SWIG_fail;
   43429          62 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   43430          62 :   if (!SWIG_IsOK(res1)) {
   43431           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReprojectImage" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   43432             :   }
   43433          62 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   43434          62 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   43435          62 :   if (!SWIG_IsOK(res2)) {
   43436           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ReprojectImage" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   43437             :   }
   43438          62 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   43439          62 :   if (obj2) {
   43440          61 :     res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
   43441          61 :     if (!SWIG_IsOK(res3)) {
   43442           0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ReprojectImage" "', argument " "3"" of type '" "char const *""'");
   43443             :     }
   43444          61 :     arg3 = reinterpret_cast< char * >(buf3);
   43445             :   }
   43446          62 :   if (obj3) {
   43447          61 :     res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
   43448          61 :     if (!SWIG_IsOK(res4)) {
   43449           0 :       SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ReprojectImage" "', argument " "4"" of type '" "char const *""'");
   43450             :     }
   43451          61 :     arg4 = reinterpret_cast< char * >(buf4);
   43452             :   }
   43453          62 :   if (obj4) {
   43454          60 :     ecode5 = SWIG_AsVal_int(obj4, &val5);
   43455          60 :     if (!SWIG_IsOK(ecode5)) {
   43456           0 :       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "ReprojectImage" "', argument " "5"" of type '" "GDALResampleAlg""'");
   43457             :     } 
   43458          60 :     arg5 = static_cast< GDALResampleAlg >(val5);
   43459             :   }
   43460          62 :   if (obj5) {
   43461           3 :     ecode6 = SWIG_AsVal_double(obj5, &val6);
   43462           3 :     if (!SWIG_IsOK(ecode6)) {
   43463           0 :       SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "ReprojectImage" "', argument " "6"" of type '" "double""'");
   43464             :     } 
   43465           3 :     arg6 = static_cast< double >(val6);
   43466             :   }
   43467          62 :   if (obj6) {
   43468           3 :     ecode7 = SWIG_AsVal_double(obj6, &val7);
   43469           3 :     if (!SWIG_IsOK(ecode7)) {
   43470           0 :       SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "ReprojectImage" "', argument " "7"" of type '" "double""'");
   43471             :     } 
   43472           3 :     arg7 = static_cast< double >(val7);
   43473             :   }
   43474          62 :   if (obj7) {
   43475           3 :     {
   43476             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   43477             :       /* callback_func typemap */
   43478             :       
   43479             :       /* In some cases 0 is passed instead of None. */
   43480             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   43481           3 :       if ( PyLong_Check(obj7) || PyInt_Check(obj7) )
   43482             :       {
   43483           0 :         if( PyLong_AsLong(obj7) == 0 )
   43484             :         {
   43485           0 :           obj7 = Py_None;
   43486             :         }
   43487             :       }
   43488             :       
   43489           3 :       if (obj7 && obj7 != Py_None ) {
   43490           3 :         void* cbfunction = NULL;
   43491           3 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj7,
   43492             :             (void**)&cbfunction,
   43493             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   43494             :             SWIG_POINTER_EXCEPTION | 0 ));
   43495             :         
   43496           3 :         if ( cbfunction == GDALTermProgress ) {
   43497             :           arg8 = GDALTermProgress;
   43498             :         } else {
   43499           3 :           if (!PyCallable_Check(obj7)) {
   43500           0 :             PyErr_SetString( PyExc_RuntimeError,
   43501             :               "Object given is not a Python function" );
   43502           0 :             SWIG_fail;
   43503             :           }
   43504           3 :           psProgressInfo->psPyCallback = obj7;
   43505           3 :           arg8 = PyProgressProxy;
   43506             :         }
   43507             :         
   43508             :       }
   43509             :       
   43510             :     }
   43511             :   }
   43512          62 :   if (obj8) {
   43513           3 :     {
   43514             :       /* %typemap(in) ( void* callback_data=NULL)  */
   43515           3 :       psProgressInfo->psPyCallbackData = obj8 ;
   43516             :     }
   43517             :   }
   43518          62 :   if (obj9) {
   43519           1 :     {
   43520             :       /* %typemap(in) char **dict */
   43521           1 :       arg10 = NULL;
   43522           1 :       if ( PySequence_Check( obj9 ) ) {
   43523           1 :         int bErr = FALSE;
   43524           1 :         arg10 = CSLFromPySequence(obj9, &bErr);
   43525           1 :         if ( bErr )
   43526             :         {
   43527           0 :           SWIG_fail;
   43528             :         }
   43529             :       }
   43530           0 :       else if ( PyMapping_Check( obj9 ) ) {
   43531           0 :         int bErr = FALSE;
   43532           0 :         arg10 = CSLFromPyMapping(obj9, &bErr);
   43533           0 :         if ( bErr )
   43534             :         {
   43535           0 :           SWIG_fail;
   43536             :         }
   43537             :       }
   43538             :       else {
   43539           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   43540           0 :         SWIG_fail;
   43541             :       }
   43542             :     }
   43543             :   }
   43544          62 :   {
   43545          62 :     if (!arg1) {
   43546           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   43547             :     }
   43548             :   }
   43549          62 :   {
   43550          62 :     if (!arg2) {
   43551           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   43552             :     }
   43553             :   }
   43554          62 :   {
   43555          62 :     const int bLocalUseExceptions = GetUseExceptions();
   43556          62 :     if ( bLocalUseExceptions ) {
   43557          62 :       pushErrorHandler();
   43558             :     }
   43559          62 :     {
   43560          62 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   43561          62 :       CPL_IGNORE_RET_VAL(result = (CPLErr)ReprojectImage(arg1,arg2,(char const *)arg3,(char const *)arg4,arg5,arg6,arg7,arg8,arg9,arg10));
   43562          62 :       SWIG_PYTHON_THREAD_END_ALLOW;
   43563             :     }
   43564          62 :     if ( bLocalUseExceptions ) {
   43565          62 :       popErrorHandler();
   43566             :     }
   43567             : #ifndef SED_HACKS
   43568             :     if ( bLocalUseExceptions ) {
   43569             :       CPLErr eclass = CPLGetLastErrorType();
   43570             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   43571             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   43572             :       }
   43573             :     }
   43574             : #endif
   43575             :   }
   43576          62 :   resultobj = SWIG_From_int(static_cast< int >(result));
   43577          62 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   43578          62 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   43579          62 :   {
   43580             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   43581             :     
   43582          62 :     CPLFree(psProgressInfo);
   43583             :     
   43584             :   }
   43585          62 :   {
   43586             :     /* %typemap(freearg) char **dict */
   43587          62 :     CSLDestroy( arg10 );
   43588             :   }
   43589          64 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   43590             :   return resultobj;
   43591           0 : fail:
   43592           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   43593           0 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   43594           0 :   {
   43595             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   43596             :     
   43597           0 :     CPLFree(psProgressInfo);
   43598             :     
   43599             :   }
   43600           0 :   {
   43601             :     /* %typemap(freearg) char **dict */
   43602           0 :     CSLDestroy( arg10 );
   43603             :   }
   43604             :   return NULL;
   43605             : }
   43606             : 
   43607             : 
   43608           6 : SWIGINTERN PyObject *_wrap_ComputeProximity(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   43609           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   43610           6 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   43611           6 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   43612           6 :   char **arg3 = (char **) NULL ;
   43613           6 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   43614           6 :   void *arg5 = (void *) NULL ;
   43615           6 :   void *argp1 = 0 ;
   43616           6 :   int res1 = 0 ;
   43617           6 :   void *argp2 = 0 ;
   43618           6 :   int res2 = 0 ;
   43619           6 :   PyObject * obj0 = 0 ;
   43620           6 :   PyObject * obj1 = 0 ;
   43621           6 :   PyObject * obj2 = 0 ;
   43622           6 :   PyObject * obj3 = 0 ;
   43623           6 :   PyObject * obj4 = 0 ;
   43624           6 :   char * kwnames[] = {
   43625             :     (char *)"srcBand",  (char *)"proximityBand",  (char *)"options",  (char *)"callback",  (char *)"callback_data",  NULL 
   43626             :   };
   43627           6 :   int result;
   43628             :   
   43629             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   43630           6 :   PyProgressData *psProgressInfo;
   43631           6 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   43632           6 :   psProgressInfo->nLastReported = -1;
   43633           6 :   psProgressInfo->psPyCallback = NULL;
   43634           6 :   psProgressInfo->psPyCallbackData = NULL;
   43635           6 :   arg5 = psProgressInfo;
   43636           6 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OOO:ComputeProximity", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
   43637           6 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   43638           6 :   if (!SWIG_IsOK(res1)) {
   43639           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ComputeProximity" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   43640             :   }
   43641           6 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   43642           6 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   43643           6 :   if (!SWIG_IsOK(res2)) {
   43644           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ComputeProximity" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   43645             :   }
   43646           6 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   43647           6 :   if (obj2) {
   43648           5 :     {
   43649             :       /* %typemap(in) char **dict */
   43650           5 :       arg3 = NULL;
   43651           5 :       if ( PySequence_Check( obj2 ) ) {
   43652           5 :         int bErr = FALSE;
   43653           5 :         arg3 = CSLFromPySequence(obj2, &bErr);
   43654           5 :         if ( bErr )
   43655             :         {
   43656           0 :           SWIG_fail;
   43657             :         }
   43658             :       }
   43659           0 :       else if ( PyMapping_Check( obj2 ) ) {
   43660           0 :         int bErr = FALSE;
   43661           0 :         arg3 = CSLFromPyMapping(obj2, &bErr);
   43662           0 :         if ( bErr )
   43663             :         {
   43664           0 :           SWIG_fail;
   43665             :         }
   43666             :       }
   43667             :       else {
   43668           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   43669           0 :         SWIG_fail;
   43670             :       }
   43671             :     }
   43672             :   }
   43673           6 :   if (obj3) {
   43674           3 :     {
   43675             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   43676             :       /* callback_func typemap */
   43677             :       
   43678             :       /* In some cases 0 is passed instead of None. */
   43679             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   43680           3 :       if ( PyLong_Check(obj3) || PyInt_Check(obj3) )
   43681             :       {
   43682           0 :         if( PyLong_AsLong(obj3) == 0 )
   43683             :         {
   43684           0 :           obj3 = Py_None;
   43685             :         }
   43686             :       }
   43687             :       
   43688           3 :       if (obj3 && obj3 != Py_None ) {
   43689           1 :         void* cbfunction = NULL;
   43690           1 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj3,
   43691             :             (void**)&cbfunction,
   43692             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   43693             :             SWIG_POINTER_EXCEPTION | 0 ));
   43694             :         
   43695           1 :         if ( cbfunction == GDALTermProgress ) {
   43696             :           arg4 = GDALTermProgress;
   43697             :         } else {
   43698           1 :           if (!PyCallable_Check(obj3)) {
   43699           0 :             PyErr_SetString( PyExc_RuntimeError,
   43700             :               "Object given is not a Python function" );
   43701           0 :             SWIG_fail;
   43702             :           }
   43703           1 :           psProgressInfo->psPyCallback = obj3;
   43704           1 :           arg4 = PyProgressProxy;
   43705             :         }
   43706             :         
   43707             :       }
   43708             :       
   43709             :     }
   43710             :   }
   43711           6 :   if (obj4) {
   43712           0 :     {
   43713             :       /* %typemap(in) ( void* callback_data=NULL)  */
   43714           0 :       psProgressInfo->psPyCallbackData = obj4 ;
   43715             :     }
   43716             :   }
   43717           6 :   {
   43718           6 :     if (!arg1) {
   43719           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   43720             :     }
   43721             :   }
   43722           6 :   {
   43723           6 :     if (!arg2) {
   43724           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   43725             :     }
   43726             :   }
   43727           6 :   {
   43728           6 :     const int bLocalUseExceptions = GetUseExceptions();
   43729           6 :     if ( bLocalUseExceptions ) {
   43730           6 :       pushErrorHandler();
   43731             :     }
   43732           6 :     {
   43733           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   43734           6 :       result = (int)ComputeProximity(arg1,arg2,arg3,arg4,arg5);
   43735           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   43736             :     }
   43737           6 :     if ( bLocalUseExceptions ) {
   43738           6 :       popErrorHandler();
   43739             :     }
   43740             : #ifndef SED_HACKS
   43741             :     if ( bLocalUseExceptions ) {
   43742             :       CPLErr eclass = CPLGetLastErrorType();
   43743             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   43744             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   43745             :       }
   43746             :     }
   43747             : #endif
   43748             :   }
   43749           6 :   resultobj = SWIG_From_int(static_cast< int >(result));
   43750           6 :   {
   43751             :     /* %typemap(freearg) char **dict */
   43752           6 :     CSLDestroy( arg3 );
   43753             :   }
   43754           6 :   {
   43755             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   43756             :     
   43757           6 :     CPLFree(psProgressInfo);
   43758             :     
   43759             :   }
   43760           6 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   43761             :   return resultobj;
   43762           0 : fail:
   43763           0 :   {
   43764             :     /* %typemap(freearg) char **dict */
   43765           0 :     CSLDestroy( arg3 );
   43766             :   }
   43767           0 :   {
   43768             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   43769             :     
   43770           0 :     CPLFree(psProgressInfo);
   43771             :     
   43772             :   }
   43773             :   return NULL;
   43774             : }
   43775             : 
   43776             : 
   43777          41 : SWIGINTERN PyObject *_wrap_RasterizeLayer(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   43778          41 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   43779          41 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   43780          41 :   int arg2 ;
   43781          41 :   int *arg3 = (int *) 0 ;
   43782          41 :   OGRLayerShadow *arg4 = (OGRLayerShadow *) 0 ;
   43783          41 :   void *arg5 = (void *) NULL ;
   43784          41 :   void *arg6 = (void *) NULL ;
   43785          41 :   int arg7 = (int) 0 ;
   43786          41 :   double *arg8 = (double *) NULL ;
   43787          41 :   char **arg9 = (char **) NULL ;
   43788          41 :   GDALProgressFunc arg10 = (GDALProgressFunc) NULL ;
   43789          41 :   void *arg11 = (void *) NULL ;
   43790          41 :   void *argp1 = 0 ;
   43791          41 :   int res1 = 0 ;
   43792          41 :   void *argp4 = 0 ;
   43793          41 :   int res4 = 0 ;
   43794          41 :   int res5 ;
   43795          41 :   int res6 ;
   43796          41 :   PyObject * obj0 = 0 ;
   43797          41 :   PyObject * obj1 = 0 ;
   43798          41 :   PyObject * obj2 = 0 ;
   43799          41 :   PyObject * obj3 = 0 ;
   43800          41 :   PyObject * obj4 = 0 ;
   43801          41 :   PyObject * obj5 = 0 ;
   43802          41 :   PyObject * obj6 = 0 ;
   43803          41 :   PyObject * obj7 = 0 ;
   43804          41 :   PyObject * obj8 = 0 ;
   43805          41 :   char * kwnames[] = {
   43806             :     (char *)"dataset",  (char *)"bands",  (char *)"layer",  (char *)"pfnTransformer",  (char *)"pTransformArg",  (char *)"burn_values",  (char *)"options",  (char *)"callback",  (char *)"callback_data",  NULL 
   43807             :   };
   43808          41 :   int result;
   43809             :   
   43810             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   43811          41 :   PyProgressData *psProgressInfo;
   43812          41 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   43813          41 :   psProgressInfo->nLastReported = -1;
   43814          41 :   psProgressInfo->psPyCallback = NULL;
   43815          41 :   psProgressInfo->psPyCallbackData = NULL;
   43816          41 :   arg11 = psProgressInfo;
   43817          41 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO|OOOOOO:RasterizeLayer", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8)) SWIG_fail;
   43818          41 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   43819          41 :   if (!SWIG_IsOK(res1)) {
   43820           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterizeLayer" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   43821             :   }
   43822          41 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   43823          41 :   {
   43824             :     /* %typemap(in,numinputs=1) (int nList, int* pList)*/
   43825          41 :     arg3 = CreateCIntListFromSequence(obj1, &arg2);
   43826          41 :     if( arg2 < 0 ) {
   43827           0 :       SWIG_fail;
   43828             :     }
   43829             :   }
   43830          41 :   res4 = SWIG_ConvertPtr(obj2, &argp4,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
   43831          41 :   if (!SWIG_IsOK(res4)) {
   43832           0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "RasterizeLayer" "', argument " "4"" of type '" "OGRLayerShadow *""'"); 
   43833             :   }
   43834          41 :   arg4 = reinterpret_cast< OGRLayerShadow * >(argp4);
   43835          41 :   if (obj3) {
   43836           0 :     res5 = SWIG_ConvertPtr(obj3,SWIG_as_voidptrptr(&arg5), 0, 0);
   43837           0 :     if (!SWIG_IsOK(res5)) {
   43838           0 :       SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "RasterizeLayer" "', argument " "5"" of type '" "void *""'"); 
   43839             :     }
   43840             :   }
   43841          41 :   if (obj4) {
   43842           0 :     res6 = SWIG_ConvertPtr(obj4,SWIG_as_voidptrptr(&arg6), 0, 0);
   43843           0 :     if (!SWIG_IsOK(res6)) {
   43844           0 :       SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "RasterizeLayer" "', argument " "6"" of type '" "void *""'"); 
   43845             :     }
   43846             :   }
   43847          41 :   if (obj5) {
   43848          40 :     {
   43849             :       /* %typemap(in,numinputs=1) (int nList, double* pList)*/
   43850          40 :       arg8 = CreateCDoubleListFromSequence(obj5, &arg7);
   43851          40 :       if( arg7 < 0 ) {
   43852           0 :         SWIG_fail;
   43853             :       }
   43854             :     }
   43855             :   }
   43856          41 :   if (obj6) {
   43857          40 :     {
   43858             :       /* %typemap(in) char **dict */
   43859          40 :       arg9 = NULL;
   43860          40 :       if ( PySequence_Check( obj6 ) ) {
   43861          40 :         int bErr = FALSE;
   43862          40 :         arg9 = CSLFromPySequence(obj6, &bErr);
   43863          40 :         if ( bErr )
   43864             :         {
   43865           0 :           SWIG_fail;
   43866             :         }
   43867             :       }
   43868           0 :       else if ( PyMapping_Check( obj6 ) ) {
   43869           0 :         int bErr = FALSE;
   43870           0 :         arg9 = CSLFromPyMapping(obj6, &bErr);
   43871           0 :         if ( bErr )
   43872             :         {
   43873           0 :           SWIG_fail;
   43874             :         }
   43875             :       }
   43876             :       else {
   43877           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   43878           0 :         SWIG_fail;
   43879             :       }
   43880             :     }
   43881             :   }
   43882          41 :   if (obj7) {
   43883           0 :     {
   43884             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   43885             :       /* callback_func typemap */
   43886             :       
   43887             :       /* In some cases 0 is passed instead of None. */
   43888             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   43889           0 :       if ( PyLong_Check(obj7) || PyInt_Check(obj7) )
   43890             :       {
   43891           0 :         if( PyLong_AsLong(obj7) == 0 )
   43892             :         {
   43893           0 :           obj7 = Py_None;
   43894             :         }
   43895             :       }
   43896             :       
   43897           0 :       if (obj7 && obj7 != Py_None ) {
   43898           0 :         void* cbfunction = NULL;
   43899           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj7,
   43900             :             (void**)&cbfunction,
   43901             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   43902             :             SWIG_POINTER_EXCEPTION | 0 ));
   43903             :         
   43904           0 :         if ( cbfunction == GDALTermProgress ) {
   43905             :           arg10 = GDALTermProgress;
   43906             :         } else {
   43907           0 :           if (!PyCallable_Check(obj7)) {
   43908           0 :             PyErr_SetString( PyExc_RuntimeError,
   43909             :               "Object given is not a Python function" );
   43910           0 :             SWIG_fail;
   43911             :           }
   43912           0 :           psProgressInfo->psPyCallback = obj7;
   43913           0 :           arg10 = PyProgressProxy;
   43914             :         }
   43915             :         
   43916             :       }
   43917             :       
   43918             :     }
   43919             :   }
   43920          41 :   if (obj8) {
   43921           0 :     {
   43922             :       /* %typemap(in) ( void* callback_data=NULL)  */
   43923           0 :       psProgressInfo->psPyCallbackData = obj8 ;
   43924             :     }
   43925             :   }
   43926          41 :   {
   43927          41 :     if (!arg1) {
   43928           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   43929             :     }
   43930             :   }
   43931          41 :   {
   43932          41 :     if (!arg4) {
   43933           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   43934             :     }
   43935             :   }
   43936          41 :   {
   43937          41 :     const int bLocalUseExceptions = GetUseExceptions();
   43938          41 :     if ( bLocalUseExceptions ) {
   43939          41 :       pushErrorHandler();
   43940             :     }
   43941          41 :     {
   43942          41 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   43943          41 :       result = (int)RasterizeLayer(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
   43944          41 :       SWIG_PYTHON_THREAD_END_ALLOW;
   43945             :     }
   43946          41 :     if ( bLocalUseExceptions ) {
   43947          41 :       popErrorHandler();
   43948             :     }
   43949             : #ifndef SED_HACKS
   43950             :     if ( bLocalUseExceptions ) {
   43951             :       CPLErr eclass = CPLGetLastErrorType();
   43952             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   43953             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   43954             :       }
   43955             :     }
   43956             : #endif
   43957             :   }
   43958          41 :   resultobj = SWIG_From_int(static_cast< int >(result));
   43959          41 :   {
   43960             :     /* %typemap(freearg) (int nList, int* pList) */
   43961          41 :     free(arg3);
   43962             :   }
   43963          41 :   {
   43964             :     /* %typemap(freearg) (int nList, double* pList) */
   43965          41 :     free(arg8);
   43966             :   }
   43967          41 :   {
   43968             :     /* %typemap(freearg) char **dict */
   43969          41 :     CSLDestroy( arg9 );
   43970             :   }
   43971          41 :   {
   43972             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   43973             :     
   43974          41 :     CPLFree(psProgressInfo);
   43975             :     
   43976             :   }
   43977          41 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   43978             :   return resultobj;
   43979           0 : fail:
   43980           0 :   {
   43981             :     /* %typemap(freearg) (int nList, int* pList) */
   43982           0 :     free(arg3);
   43983             :   }
   43984           0 :   {
   43985             :     /* %typemap(freearg) (int nList, double* pList) */
   43986           0 :     free(arg8);
   43987             :   }
   43988           0 :   {
   43989             :     /* %typemap(freearg) char **dict */
   43990           0 :     CSLDestroy( arg9 );
   43991             :   }
   43992           0 :   {
   43993             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   43994             :     
   43995           0 :     CPLFree(psProgressInfo);
   43996             :     
   43997             :   }
   43998             :   return NULL;
   43999             : }
   44000             : 
   44001             : 
   44002          21 : SWIGINTERN PyObject *_wrap_Polygonize(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   44003          21 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   44004          21 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   44005          21 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   44006          21 :   OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
   44007          21 :   int arg4 ;
   44008          21 :   char **arg5 = (char **) NULL ;
   44009          21 :   GDALProgressFunc arg6 = (GDALProgressFunc) NULL ;
   44010          21 :   void *arg7 = (void *) NULL ;
   44011          21 :   void *argp1 = 0 ;
   44012          21 :   int res1 = 0 ;
   44013          21 :   void *argp2 = 0 ;
   44014          21 :   int res2 = 0 ;
   44015          21 :   void *argp3 = 0 ;
   44016          21 :   int res3 = 0 ;
   44017          21 :   int val4 ;
   44018          21 :   int ecode4 = 0 ;
   44019          21 :   PyObject * obj0 = 0 ;
   44020          21 :   PyObject * obj1 = 0 ;
   44021          21 :   PyObject * obj2 = 0 ;
   44022          21 :   PyObject * obj3 = 0 ;
   44023          21 :   PyObject * obj4 = 0 ;
   44024          21 :   PyObject * obj5 = 0 ;
   44025          21 :   PyObject * obj6 = 0 ;
   44026          21 :   char * kwnames[] = {
   44027             :     (char *)"srcBand",  (char *)"maskBand",  (char *)"outLayer",  (char *)"iPixValField",  (char *)"options",  (char *)"callback",  (char *)"callback_data",  NULL 
   44028             :   };
   44029          21 :   int result;
   44030             :   
   44031             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   44032          21 :   PyProgressData *psProgressInfo;
   44033          21 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   44034          21 :   psProgressInfo->nLastReported = -1;
   44035          21 :   psProgressInfo->psPyCallback = NULL;
   44036          21 :   psProgressInfo->psPyCallbackData = NULL;
   44037          21 :   arg7 = psProgressInfo;
   44038          21 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO|OOO:Polygonize", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
   44039          21 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   44040          21 :   if (!SWIG_IsOK(res1)) {
   44041           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Polygonize" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   44042             :   }
   44043          21 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   44044          21 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   44045          21 :   if (!SWIG_IsOK(res2)) {
   44046           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Polygonize" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   44047             :   }
   44048          21 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   44049          21 :   res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
   44050          21 :   if (!SWIG_IsOK(res3)) {
   44051           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Polygonize" "', argument " "3"" of type '" "OGRLayerShadow *""'"); 
   44052             :   }
   44053          21 :   arg3 = reinterpret_cast< OGRLayerShadow * >(argp3);
   44054          21 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   44055          21 :   if (!SWIG_IsOK(ecode4)) {
   44056           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Polygonize" "', argument " "4"" of type '" "int""'");
   44057             :   } 
   44058          21 :   arg4 = static_cast< int >(val4);
   44059          21 :   if (obj4) {
   44060          14 :     {
   44061             :       /* %typemap(in) char **dict */
   44062          14 :       arg5 = NULL;
   44063          14 :       if ( PySequence_Check( obj4 ) ) {
   44064          14 :         int bErr = FALSE;
   44065          14 :         arg5 = CSLFromPySequence(obj4, &bErr);
   44066          14 :         if ( bErr )
   44067             :         {
   44068           0 :           SWIG_fail;
   44069             :         }
   44070             :       }
   44071           0 :       else if ( PyMapping_Check( obj4 ) ) {
   44072           0 :         int bErr = FALSE;
   44073           0 :         arg5 = CSLFromPyMapping(obj4, &bErr);
   44074           0 :         if ( bErr )
   44075             :         {
   44076           0 :           SWIG_fail;
   44077             :         }
   44078             :       }
   44079             :       else {
   44080           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   44081           0 :         SWIG_fail;
   44082             :       }
   44083             :     }
   44084             :   }
   44085          21 :   if (obj5) {
   44086          12 :     {
   44087             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   44088             :       /* callback_func typemap */
   44089             :       
   44090             :       /* In some cases 0 is passed instead of None. */
   44091             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   44092          12 :       if ( PyLong_Check(obj5) || PyInt_Check(obj5) )
   44093             :       {
   44094           0 :         if( PyLong_AsLong(obj5) == 0 )
   44095             :         {
   44096           0 :           obj5 = Py_None;
   44097             :         }
   44098             :       }
   44099             :       
   44100          12 :       if (obj5 && obj5 != Py_None ) {
   44101           7 :         void* cbfunction = NULL;
   44102           7 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj5,
   44103             :             (void**)&cbfunction,
   44104             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   44105             :             SWIG_POINTER_EXCEPTION | 0 ));
   44106             :         
   44107           7 :         if ( cbfunction == GDALTermProgress ) {
   44108             :           arg6 = GDALTermProgress;
   44109             :         } else {
   44110           7 :           if (!PyCallable_Check(obj5)) {
   44111           0 :             PyErr_SetString( PyExc_RuntimeError,
   44112             :               "Object given is not a Python function" );
   44113           0 :             SWIG_fail;
   44114             :           }
   44115           7 :           psProgressInfo->psPyCallback = obj5;
   44116           7 :           arg6 = PyProgressProxy;
   44117             :         }
   44118             :         
   44119             :       }
   44120             :       
   44121             :     }
   44122             :   }
   44123          21 :   if (obj6) {
   44124           0 :     {
   44125             :       /* %typemap(in) ( void* callback_data=NULL)  */
   44126           0 :       psProgressInfo->psPyCallbackData = obj6 ;
   44127             :     }
   44128             :   }
   44129          21 :   {
   44130          21 :     if (!arg1) {
   44131           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   44132             :     }
   44133             :   }
   44134          21 :   {
   44135          21 :     if (!arg3) {
   44136           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   44137             :     }
   44138             :   }
   44139          21 :   {
   44140          21 :     const int bLocalUseExceptions = GetUseExceptions();
   44141          21 :     if ( bLocalUseExceptions ) {
   44142          21 :       pushErrorHandler();
   44143             :     }
   44144          21 :     {
   44145          21 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   44146          21 :       result = (int)Polygonize(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   44147          21 :       SWIG_PYTHON_THREAD_END_ALLOW;
   44148             :     }
   44149          21 :     if ( bLocalUseExceptions ) {
   44150          21 :       popErrorHandler();
   44151             :     }
   44152             : #ifndef SED_HACKS
   44153             :     if ( bLocalUseExceptions ) {
   44154             :       CPLErr eclass = CPLGetLastErrorType();
   44155             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   44156             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   44157             :       }
   44158             :     }
   44159             : #endif
   44160             :   }
   44161          21 :   resultobj = SWIG_From_int(static_cast< int >(result));
   44162          21 :   {
   44163             :     /* %typemap(freearg) char **dict */
   44164          21 :     CSLDestroy( arg5 );
   44165             :   }
   44166          21 :   {
   44167             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   44168             :     
   44169          21 :     CPLFree(psProgressInfo);
   44170             :     
   44171             :   }
   44172          21 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   44173             :   return resultobj;
   44174           0 : fail:
   44175           0 :   {
   44176             :     /* %typemap(freearg) char **dict */
   44177           0 :     CSLDestroy( arg5 );
   44178             :   }
   44179           0 :   {
   44180             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   44181             :     
   44182           0 :     CPLFree(psProgressInfo);
   44183             :     
   44184             :   }
   44185             :   return NULL;
   44186             : }
   44187             : 
   44188             : 
   44189           1 : SWIGINTERN PyObject *_wrap_FPolygonize(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   44190           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   44191           1 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   44192           1 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   44193           1 :   OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
   44194           1 :   int arg4 ;
   44195           1 :   char **arg5 = (char **) NULL ;
   44196           1 :   GDALProgressFunc arg6 = (GDALProgressFunc) NULL ;
   44197           1 :   void *arg7 = (void *) NULL ;
   44198           1 :   void *argp1 = 0 ;
   44199           1 :   int res1 = 0 ;
   44200           1 :   void *argp2 = 0 ;
   44201           1 :   int res2 = 0 ;
   44202           1 :   void *argp3 = 0 ;
   44203           1 :   int res3 = 0 ;
   44204           1 :   int val4 ;
   44205           1 :   int ecode4 = 0 ;
   44206           1 :   PyObject * obj0 = 0 ;
   44207           1 :   PyObject * obj1 = 0 ;
   44208           1 :   PyObject * obj2 = 0 ;
   44209           1 :   PyObject * obj3 = 0 ;
   44210           1 :   PyObject * obj4 = 0 ;
   44211           1 :   PyObject * obj5 = 0 ;
   44212           1 :   PyObject * obj6 = 0 ;
   44213           1 :   char * kwnames[] = {
   44214             :     (char *)"srcBand",  (char *)"maskBand",  (char *)"outLayer",  (char *)"iPixValField",  (char *)"options",  (char *)"callback",  (char *)"callback_data",  NULL 
   44215             :   };
   44216           1 :   int result;
   44217             :   
   44218             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   44219           1 :   PyProgressData *psProgressInfo;
   44220           1 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   44221           1 :   psProgressInfo->nLastReported = -1;
   44222           1 :   psProgressInfo->psPyCallback = NULL;
   44223           1 :   psProgressInfo->psPyCallbackData = NULL;
   44224           1 :   arg7 = psProgressInfo;
   44225           1 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO|OOO:FPolygonize", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
   44226           1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   44227           1 :   if (!SWIG_IsOK(res1)) {
   44228           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FPolygonize" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   44229             :   }
   44230           1 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   44231           1 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   44232           1 :   if (!SWIG_IsOK(res2)) {
   44233           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FPolygonize" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   44234             :   }
   44235           1 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   44236           1 :   res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
   44237           1 :   if (!SWIG_IsOK(res3)) {
   44238           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "FPolygonize" "', argument " "3"" of type '" "OGRLayerShadow *""'"); 
   44239             :   }
   44240           1 :   arg3 = reinterpret_cast< OGRLayerShadow * >(argp3);
   44241           1 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   44242           1 :   if (!SWIG_IsOK(ecode4)) {
   44243           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "FPolygonize" "', argument " "4"" of type '" "int""'");
   44244             :   } 
   44245           1 :   arg4 = static_cast< int >(val4);
   44246           1 :   if (obj4) {
   44247           0 :     {
   44248             :       /* %typemap(in) char **dict */
   44249           0 :       arg5 = NULL;
   44250           0 :       if ( PySequence_Check( obj4 ) ) {
   44251           0 :         int bErr = FALSE;
   44252           0 :         arg5 = CSLFromPySequence(obj4, &bErr);
   44253           0 :         if ( bErr )
   44254             :         {
   44255           0 :           SWIG_fail;
   44256             :         }
   44257             :       }
   44258           0 :       else if ( PyMapping_Check( obj4 ) ) {
   44259           0 :         int bErr = FALSE;
   44260           0 :         arg5 = CSLFromPyMapping(obj4, &bErr);
   44261           0 :         if ( bErr )
   44262             :         {
   44263           0 :           SWIG_fail;
   44264             :         }
   44265             :       }
   44266             :       else {
   44267           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   44268           0 :         SWIG_fail;
   44269             :       }
   44270             :     }
   44271             :   }
   44272           1 :   if (obj5) {
   44273           0 :     {
   44274             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   44275             :       /* callback_func typemap */
   44276             :       
   44277             :       /* In some cases 0 is passed instead of None. */
   44278             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   44279           0 :       if ( PyLong_Check(obj5) || PyInt_Check(obj5) )
   44280             :       {
   44281           0 :         if( PyLong_AsLong(obj5) == 0 )
   44282             :         {
   44283           0 :           obj5 = Py_None;
   44284             :         }
   44285             :       }
   44286             :       
   44287           0 :       if (obj5 && obj5 != Py_None ) {
   44288           0 :         void* cbfunction = NULL;
   44289           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj5,
   44290             :             (void**)&cbfunction,
   44291             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   44292             :             SWIG_POINTER_EXCEPTION | 0 ));
   44293             :         
   44294           0 :         if ( cbfunction == GDALTermProgress ) {
   44295             :           arg6 = GDALTermProgress;
   44296             :         } else {
   44297           0 :           if (!PyCallable_Check(obj5)) {
   44298           0 :             PyErr_SetString( PyExc_RuntimeError,
   44299             :               "Object given is not a Python function" );
   44300           0 :             SWIG_fail;
   44301             :           }
   44302           0 :           psProgressInfo->psPyCallback = obj5;
   44303           0 :           arg6 = PyProgressProxy;
   44304             :         }
   44305             :         
   44306             :       }
   44307             :       
   44308             :     }
   44309             :   }
   44310           1 :   if (obj6) {
   44311           0 :     {
   44312             :       /* %typemap(in) ( void* callback_data=NULL)  */
   44313           0 :       psProgressInfo->psPyCallbackData = obj6 ;
   44314             :     }
   44315             :   }
   44316           1 :   {
   44317           1 :     if (!arg1) {
   44318           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   44319             :     }
   44320             :   }
   44321           1 :   {
   44322           1 :     if (!arg3) {
   44323           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   44324             :     }
   44325             :   }
   44326           1 :   {
   44327           1 :     const int bLocalUseExceptions = GetUseExceptions();
   44328           1 :     if ( bLocalUseExceptions ) {
   44329           1 :       pushErrorHandler();
   44330             :     }
   44331           1 :     {
   44332           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   44333           1 :       result = (int)FPolygonize(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   44334           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   44335             :     }
   44336           1 :     if ( bLocalUseExceptions ) {
   44337           1 :       popErrorHandler();
   44338             :     }
   44339             : #ifndef SED_HACKS
   44340             :     if ( bLocalUseExceptions ) {
   44341             :       CPLErr eclass = CPLGetLastErrorType();
   44342             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   44343             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   44344             :       }
   44345             :     }
   44346             : #endif
   44347             :   }
   44348           1 :   resultobj = SWIG_From_int(static_cast< int >(result));
   44349           1 :   {
   44350             :     /* %typemap(freearg) char **dict */
   44351           1 :     CSLDestroy( arg5 );
   44352             :   }
   44353           1 :   {
   44354             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   44355             :     
   44356           1 :     CPLFree(psProgressInfo);
   44357             :     
   44358             :   }
   44359           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   44360             :   return resultobj;
   44361           0 : fail:
   44362           0 :   {
   44363             :     /* %typemap(freearg) char **dict */
   44364           0 :     CSLDestroy( arg5 );
   44365             :   }
   44366           0 :   {
   44367             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   44368             :     
   44369           0 :     CPLFree(psProgressInfo);
   44370             :     
   44371             :   }
   44372             :   return NULL;
   44373             : }
   44374             : 
   44375             : 
   44376          29 : SWIGINTERN PyObject *_wrap_FillNodata(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   44377          29 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   44378          29 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   44379          29 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   44380          29 :   double arg3 ;
   44381          29 :   int arg4 ;
   44382          29 :   char **arg5 = (char **) NULL ;
   44383          29 :   GDALProgressFunc arg6 = (GDALProgressFunc) NULL ;
   44384          29 :   void *arg7 = (void *) NULL ;
   44385          29 :   void *argp1 = 0 ;
   44386          29 :   int res1 = 0 ;
   44387          29 :   void *argp2 = 0 ;
   44388          29 :   int res2 = 0 ;
   44389          29 :   double val3 ;
   44390          29 :   int ecode3 = 0 ;
   44391          29 :   int val4 ;
   44392          29 :   int ecode4 = 0 ;
   44393          29 :   PyObject * obj0 = 0 ;
   44394          29 :   PyObject * obj1 = 0 ;
   44395          29 :   PyObject * obj2 = 0 ;
   44396          29 :   PyObject * obj3 = 0 ;
   44397          29 :   PyObject * obj4 = 0 ;
   44398          29 :   PyObject * obj5 = 0 ;
   44399          29 :   PyObject * obj6 = 0 ;
   44400          29 :   char * kwnames[] = {
   44401             :     (char *)"targetBand",  (char *)"maskBand",  (char *)"maxSearchDist",  (char *)"smoothingIterations",  (char *)"options",  (char *)"callback",  (char *)"callback_data",  NULL 
   44402             :   };
   44403          29 :   int result;
   44404             :   
   44405             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   44406          29 :   PyProgressData *psProgressInfo;
   44407          29 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   44408          29 :   psProgressInfo->nLastReported = -1;
   44409          29 :   psProgressInfo->psPyCallback = NULL;
   44410          29 :   psProgressInfo->psPyCallbackData = NULL;
   44411          29 :   arg7 = psProgressInfo;
   44412          29 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO|OOO:FillNodata", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
   44413          29 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   44414          29 :   if (!SWIG_IsOK(res1)) {
   44415           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FillNodata" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   44416             :   }
   44417          29 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   44418          29 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   44419          29 :   if (!SWIG_IsOK(res2)) {
   44420           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FillNodata" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   44421             :   }
   44422          29 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   44423          29 :   ecode3 = SWIG_AsVal_double(obj2, &val3);
   44424          29 :   if (!SWIG_IsOK(ecode3)) {
   44425           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FillNodata" "', argument " "3"" of type '" "double""'");
   44426             :   } 
   44427          29 :   arg3 = static_cast< double >(val3);
   44428          29 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   44429          29 :   if (!SWIG_IsOK(ecode4)) {
   44430           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "FillNodata" "', argument " "4"" of type '" "int""'");
   44431             :   } 
   44432          29 :   arg4 = static_cast< int >(val4);
   44433          29 :   if (obj4) {
   44434          26 :     {
   44435             :       /* %typemap(in) char **dict */
   44436          26 :       arg5 = NULL;
   44437          26 :       if ( PySequence_Check( obj4 ) ) {
   44438          26 :         int bErr = FALSE;
   44439          26 :         arg5 = CSLFromPySequence(obj4, &bErr);
   44440          26 :         if ( bErr )
   44441             :         {
   44442           0 :           SWIG_fail;
   44443             :         }
   44444             :       }
   44445           0 :       else if ( PyMapping_Check( obj4 ) ) {
   44446           0 :         int bErr = FALSE;
   44447           0 :         arg5 = CSLFromPyMapping(obj4, &bErr);
   44448           0 :         if ( bErr )
   44449             :         {
   44450           0 :           SWIG_fail;
   44451             :         }
   44452             :       }
   44453             :       else {
   44454           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   44455           0 :         SWIG_fail;
   44456             :       }
   44457             :     }
   44458             :   }
   44459          29 :   if (obj5) {
   44460           4 :     {
   44461             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   44462             :       /* callback_func typemap */
   44463             :       
   44464             :       /* In some cases 0 is passed instead of None. */
   44465             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   44466           4 :       if ( PyLong_Check(obj5) || PyInt_Check(obj5) )
   44467             :       {
   44468           0 :         if( PyLong_AsLong(obj5) == 0 )
   44469             :         {
   44470           0 :           obj5 = Py_None;
   44471             :         }
   44472             :       }
   44473             :       
   44474           4 :       if (obj5 && obj5 != Py_None ) {
   44475           4 :         void* cbfunction = NULL;
   44476           4 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj5,
   44477             :             (void**)&cbfunction,
   44478             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   44479             :             SWIG_POINTER_EXCEPTION | 0 ));
   44480             :         
   44481           4 :         if ( cbfunction == GDALTermProgress ) {
   44482             :           arg6 = GDALTermProgress;
   44483             :         } else {
   44484           4 :           if (!PyCallable_Check(obj5)) {
   44485           0 :             PyErr_SetString( PyExc_RuntimeError,
   44486             :               "Object given is not a Python function" );
   44487           0 :             SWIG_fail;
   44488             :           }
   44489           4 :           psProgressInfo->psPyCallback = obj5;
   44490           4 :           arg6 = PyProgressProxy;
   44491             :         }
   44492             :         
   44493             :       }
   44494             :       
   44495             :     }
   44496             :   }
   44497          29 :   if (obj6) {
   44498           0 :     {
   44499             :       /* %typemap(in) ( void* callback_data=NULL)  */
   44500           0 :       psProgressInfo->psPyCallbackData = obj6 ;
   44501             :     }
   44502             :   }
   44503          29 :   {
   44504          29 :     if (!arg1) {
   44505           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   44506             :     }
   44507             :   }
   44508          29 :   {
   44509          29 :     const int bLocalUseExceptions = GetUseExceptions();
   44510          29 :     if ( bLocalUseExceptions ) {
   44511          29 :       pushErrorHandler();
   44512             :     }
   44513          29 :     {
   44514          29 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   44515          29 :       result = (int)FillNodata(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   44516          29 :       SWIG_PYTHON_THREAD_END_ALLOW;
   44517             :     }
   44518          29 :     if ( bLocalUseExceptions ) {
   44519          29 :       popErrorHandler();
   44520             :     }
   44521             : #ifndef SED_HACKS
   44522             :     if ( bLocalUseExceptions ) {
   44523             :       CPLErr eclass = CPLGetLastErrorType();
   44524             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   44525             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   44526             :       }
   44527             :     }
   44528             : #endif
   44529             :   }
   44530          29 :   resultobj = SWIG_From_int(static_cast< int >(result));
   44531          29 :   {
   44532             :     /* %typemap(freearg) char **dict */
   44533          29 :     CSLDestroy( arg5 );
   44534             :   }
   44535          29 :   {
   44536             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   44537             :     
   44538          29 :     CPLFree(psProgressInfo);
   44539             :     
   44540             :   }
   44541          29 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   44542             :   return resultobj;
   44543           0 : fail:
   44544           0 :   {
   44545             :     /* %typemap(freearg) char **dict */
   44546           0 :     CSLDestroy( arg5 );
   44547             :   }
   44548           0 :   {
   44549             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   44550             :     
   44551           0 :     CPLFree(psProgressInfo);
   44552             :     
   44553             :   }
   44554             :   return NULL;
   44555             : }
   44556             : 
   44557             : 
   44558          10 : SWIGINTERN PyObject *_wrap_SieveFilter(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   44559          10 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   44560          10 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   44561          10 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   44562          10 :   GDALRasterBandShadow *arg3 = (GDALRasterBandShadow *) 0 ;
   44563          10 :   int arg4 ;
   44564          10 :   int arg5 = (int) 4 ;
   44565          10 :   char **arg6 = (char **) NULL ;
   44566          10 :   GDALProgressFunc arg7 = (GDALProgressFunc) NULL ;
   44567          10 :   void *arg8 = (void *) NULL ;
   44568          10 :   void *argp1 = 0 ;
   44569          10 :   int res1 = 0 ;
   44570          10 :   void *argp2 = 0 ;
   44571          10 :   int res2 = 0 ;
   44572          10 :   void *argp3 = 0 ;
   44573          10 :   int res3 = 0 ;
   44574          10 :   int val4 ;
   44575          10 :   int ecode4 = 0 ;
   44576          10 :   int val5 ;
   44577          10 :   int ecode5 = 0 ;
   44578          10 :   PyObject * obj0 = 0 ;
   44579          10 :   PyObject * obj1 = 0 ;
   44580          10 :   PyObject * obj2 = 0 ;
   44581          10 :   PyObject * obj3 = 0 ;
   44582          10 :   PyObject * obj4 = 0 ;
   44583          10 :   PyObject * obj5 = 0 ;
   44584          10 :   PyObject * obj6 = 0 ;
   44585          10 :   PyObject * obj7 = 0 ;
   44586          10 :   char * kwnames[] = {
   44587             :     (char *)"srcBand",  (char *)"maskBand",  (char *)"dstBand",  (char *)"threshold",  (char *)"connectedness",  (char *)"options",  (char *)"callback",  (char *)"callback_data",  NULL 
   44588             :   };
   44589          10 :   int result;
   44590             :   
   44591             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   44592          10 :   PyProgressData *psProgressInfo;
   44593          10 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   44594          10 :   psProgressInfo->nLastReported = -1;
   44595          10 :   psProgressInfo->psPyCallback = NULL;
   44596          10 :   psProgressInfo->psPyCallbackData = NULL;
   44597          10 :   arg8 = psProgressInfo;
   44598          10 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO|OOOO:SieveFilter", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7)) SWIG_fail;
   44599          10 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   44600          10 :   if (!SWIG_IsOK(res1)) {
   44601           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SieveFilter" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   44602             :   }
   44603          10 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   44604          10 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   44605          10 :   if (!SWIG_IsOK(res2)) {
   44606           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SieveFilter" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   44607             :   }
   44608          10 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   44609          10 :   res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   44610          10 :   if (!SWIG_IsOK(res3)) {
   44611           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SieveFilter" "', argument " "3"" of type '" "GDALRasterBandShadow *""'"); 
   44612             :   }
   44613          10 :   arg3 = reinterpret_cast< GDALRasterBandShadow * >(argp3);
   44614          10 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   44615          10 :   if (!SWIG_IsOK(ecode4)) {
   44616           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SieveFilter" "', argument " "4"" of type '" "int""'");
   44617             :   } 
   44618          10 :   arg4 = static_cast< int >(val4);
   44619          10 :   if (obj4) {
   44620          10 :     ecode5 = SWIG_AsVal_int(obj4, &val5);
   44621          10 :     if (!SWIG_IsOK(ecode5)) {
   44622           0 :       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SieveFilter" "', argument " "5"" of type '" "int""'");
   44623             :     } 
   44624             :     arg5 = static_cast< int >(val5);
   44625             :   }
   44626          10 :   if (obj5) {
   44627           0 :     {
   44628             :       /* %typemap(in) char **dict */
   44629           0 :       arg6 = NULL;
   44630           0 :       if ( PySequence_Check( obj5 ) ) {
   44631           0 :         int bErr = FALSE;
   44632           0 :         arg6 = CSLFromPySequence(obj5, &bErr);
   44633           0 :         if ( bErr )
   44634             :         {
   44635           0 :           SWIG_fail;
   44636             :         }
   44637             :       }
   44638           0 :       else if ( PyMapping_Check( obj5 ) ) {
   44639           0 :         int bErr = FALSE;
   44640           0 :         arg6 = CSLFromPyMapping(obj5, &bErr);
   44641           0 :         if ( bErr )
   44642             :         {
   44643           0 :           SWIG_fail;
   44644             :         }
   44645             :       }
   44646             :       else {
   44647           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   44648           0 :         SWIG_fail;
   44649             :       }
   44650             :     }
   44651             :   }
   44652          10 :   if (obj6) {
   44653           2 :     {
   44654             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   44655             :       /* callback_func typemap */
   44656             :       
   44657             :       /* In some cases 0 is passed instead of None. */
   44658             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   44659           2 :       if ( PyLong_Check(obj6) || PyInt_Check(obj6) )
   44660             :       {
   44661           0 :         if( PyLong_AsLong(obj6) == 0 )
   44662             :         {
   44663           0 :           obj6 = Py_None;
   44664             :         }
   44665             :       }
   44666             :       
   44667           2 :       if (obj6 && obj6 != Py_None ) {
   44668           2 :         void* cbfunction = NULL;
   44669           2 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj6,
   44670             :             (void**)&cbfunction,
   44671             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   44672             :             SWIG_POINTER_EXCEPTION | 0 ));
   44673             :         
   44674           2 :         if ( cbfunction == GDALTermProgress ) {
   44675             :           arg7 = GDALTermProgress;
   44676             :         } else {
   44677           2 :           if (!PyCallable_Check(obj6)) {
   44678           0 :             PyErr_SetString( PyExc_RuntimeError,
   44679             :               "Object given is not a Python function" );
   44680           0 :             SWIG_fail;
   44681             :           }
   44682           2 :           psProgressInfo->psPyCallback = obj6;
   44683           2 :           arg7 = PyProgressProxy;
   44684             :         }
   44685             :         
   44686             :       }
   44687             :       
   44688             :     }
   44689             :   }
   44690          10 :   if (obj7) {
   44691           0 :     {
   44692             :       /* %typemap(in) ( void* callback_data=NULL)  */
   44693           0 :       psProgressInfo->psPyCallbackData = obj7 ;
   44694             :     }
   44695             :   }
   44696          10 :   {
   44697          10 :     if (!arg1) {
   44698           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   44699             :     }
   44700             :   }
   44701          10 :   {
   44702          10 :     if (!arg3) {
   44703           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   44704             :     }
   44705             :   }
   44706          10 :   {
   44707          10 :     const int bLocalUseExceptions = GetUseExceptions();
   44708          10 :     if ( bLocalUseExceptions ) {
   44709          10 :       pushErrorHandler();
   44710             :     }
   44711          10 :     {
   44712          10 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   44713          10 :       result = (int)SieveFilter(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
   44714          10 :       SWIG_PYTHON_THREAD_END_ALLOW;
   44715             :     }
   44716          10 :     if ( bLocalUseExceptions ) {
   44717          10 :       popErrorHandler();
   44718             :     }
   44719             : #ifndef SED_HACKS
   44720             :     if ( bLocalUseExceptions ) {
   44721             :       CPLErr eclass = CPLGetLastErrorType();
   44722             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   44723             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   44724             :       }
   44725             :     }
   44726             : #endif
   44727             :   }
   44728          10 :   resultobj = SWIG_From_int(static_cast< int >(result));
   44729          10 :   {
   44730             :     /* %typemap(freearg) char **dict */
   44731          10 :     CSLDestroy( arg6 );
   44732             :   }
   44733          10 :   {
   44734             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   44735             :     
   44736          10 :     CPLFree(psProgressInfo);
   44737             :     
   44738             :   }
   44739          10 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   44740             :   return resultobj;
   44741           0 : fail:
   44742           0 :   {
   44743             :     /* %typemap(freearg) char **dict */
   44744           0 :     CSLDestroy( arg6 );
   44745             :   }
   44746           0 :   {
   44747             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   44748             :     
   44749           0 :     CPLFree(psProgressInfo);
   44750             :     
   44751             :   }
   44752             :   return NULL;
   44753             : }
   44754             : 
   44755             : 
   44756           2 : SWIGINTERN PyObject *_wrap_RegenerateOverviews(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   44757           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   44758           2 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   44759           2 :   int arg2 ;
   44760           2 :   GDALRasterBandShadow **arg3 = (GDALRasterBandShadow **) 0 ;
   44761           2 :   char *arg4 = (char *) "average" ;
   44762           2 :   GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
   44763           2 :   void *arg6 = (void *) NULL ;
   44764           2 :   void *argp1 = 0 ;
   44765           2 :   int res1 = 0 ;
   44766           2 :   int res4 ;
   44767           2 :   char *buf4 = 0 ;
   44768           2 :   int alloc4 = 0 ;
   44769           2 :   PyObject * obj0 = 0 ;
   44770           2 :   PyObject * obj1 = 0 ;
   44771           2 :   PyObject * obj2 = 0 ;
   44772           2 :   PyObject * obj3 = 0 ;
   44773           2 :   PyObject * obj4 = 0 ;
   44774           2 :   char * kwnames[] = {
   44775             :     (char *)"srcBand",  (char *)"overviewBandCount",  (char *)"resampling",  (char *)"callback",  (char *)"callback_data",  NULL 
   44776             :   };
   44777           2 :   int result;
   44778             :   
   44779             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   44780           2 :   PyProgressData *psProgressInfo;
   44781           2 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   44782           2 :   psProgressInfo->nLastReported = -1;
   44783           2 :   psProgressInfo->psPyCallback = NULL;
   44784           2 :   psProgressInfo->psPyCallbackData = NULL;
   44785           2 :   arg6 = psProgressInfo;
   44786           2 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OOO:RegenerateOverviews", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
   44787           2 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   44788           2 :   if (!SWIG_IsOK(res1)) {
   44789           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RegenerateOverviews" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   44790             :   }
   44791           2 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   44792           2 :   {
   44793             :     /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALRasterBandShadow *optional_##GDALRasterBandShadow)*/
   44794           2 :     if ( !PySequence_Check(obj1) ) {
   44795           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   44796           0 :       SWIG_fail;
   44797             :     }
   44798           2 :     Py_ssize_t size = PySequence_Size(obj1);
   44799           2 :     if( size > (Py_ssize_t)INT_MAX ) {
   44800           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   44801           0 :       SWIG_fail;
   44802             :     }
   44803           2 :     if( (size_t)size > SIZE_MAX / sizeof(GDALRasterBandShadow*) ) {
   44804           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   44805           0 :       SWIG_fail;
   44806             :     }
   44807           2 :     arg2 = (int)size;
   44808           2 :     arg3 = (GDALRasterBandShadow**) VSIMalloc(arg2*sizeof(GDALRasterBandShadow*));
   44809           2 :     if( !arg3) {
   44810           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   44811           0 :       SWIG_fail;
   44812             :     }
   44813             :     
   44814           6 :     for( int i = 0; i<arg2; i++ ) {
   44815           4 :       PyObject *o = PySequence_GetItem(obj1,i);
   44816           4 :       GDALRasterBandShadow* rawobjectpointer = NULL;
   44817           4 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALRasterBandShadow, SWIG_POINTER_EXCEPTION | 0 ));
   44818           4 :       if (!rawobjectpointer) {
   44819           0 :         Py_DECREF(o);
   44820           0 :         PyErr_SetString(PyExc_TypeError, "object of wrong GDALRasterBandShadow");
   44821           0 :         SWIG_fail;
   44822             :       }
   44823           4 :       arg3[i] = rawobjectpointer;
   44824           4 :       Py_DECREF(o);
   44825             :       
   44826             :     }
   44827             :   }
   44828           2 :   if (obj2) {
   44829           2 :     res4 = SWIG_AsCharPtrAndSize(obj2, &buf4, NULL, &alloc4);
   44830           2 :     if (!SWIG_IsOK(res4)) {
   44831           0 :       SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "RegenerateOverviews" "', argument " "4"" of type '" "char const *""'");
   44832             :     }
   44833           2 :     arg4 = reinterpret_cast< char * >(buf4);
   44834             :   }
   44835           2 :   if (obj3) {
   44836           0 :     {
   44837             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   44838             :       /* callback_func typemap */
   44839             :       
   44840             :       /* In some cases 0 is passed instead of None. */
   44841             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   44842           0 :       if ( PyLong_Check(obj3) || PyInt_Check(obj3) )
   44843             :       {
   44844           0 :         if( PyLong_AsLong(obj3) == 0 )
   44845             :         {
   44846           0 :           obj3 = Py_None;
   44847             :         }
   44848             :       }
   44849             :       
   44850           0 :       if (obj3 && obj3 != Py_None ) {
   44851           0 :         void* cbfunction = NULL;
   44852           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj3,
   44853             :             (void**)&cbfunction,
   44854             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   44855             :             SWIG_POINTER_EXCEPTION | 0 ));
   44856             :         
   44857           0 :         if ( cbfunction == GDALTermProgress ) {
   44858             :           arg5 = GDALTermProgress;
   44859             :         } else {
   44860           0 :           if (!PyCallable_Check(obj3)) {
   44861           0 :             PyErr_SetString( PyExc_RuntimeError,
   44862             :               "Object given is not a Python function" );
   44863           0 :             SWIG_fail;
   44864             :           }
   44865           0 :           psProgressInfo->psPyCallback = obj3;
   44866           0 :           arg5 = PyProgressProxy;
   44867             :         }
   44868             :         
   44869             :       }
   44870             :       
   44871             :     }
   44872             :   }
   44873           2 :   if (obj4) {
   44874           0 :     {
   44875             :       /* %typemap(in) ( void* callback_data=NULL)  */
   44876           0 :       psProgressInfo->psPyCallbackData = obj4 ;
   44877             :     }
   44878             :   }
   44879           2 :   {
   44880           2 :     if (!arg1) {
   44881           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   44882             :     }
   44883             :   }
   44884           2 :   {
   44885           2 :     const int bLocalUseExceptions = GetUseExceptions();
   44886           2 :     if ( bLocalUseExceptions ) {
   44887           0 :       pushErrorHandler();
   44888             :     }
   44889           2 :     {
   44890           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   44891           2 :       result = (int)RegenerateOverviews(arg1,arg2,arg3,(char const *)arg4,arg5,arg6);
   44892           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   44893             :     }
   44894           2 :     if ( bLocalUseExceptions ) {
   44895           0 :       popErrorHandler();
   44896             :     }
   44897             : #ifndef SED_HACKS
   44898             :     if ( bLocalUseExceptions ) {
   44899             :       CPLErr eclass = CPLGetLastErrorType();
   44900             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   44901             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   44902             :       }
   44903             :     }
   44904             : #endif
   44905             :   }
   44906           2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   44907           2 :   {
   44908             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALRasterBandShadow **poObjects)*/
   44909           2 :     CPLFree( arg3 );
   44910             :   }
   44911           2 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   44912           2 :   {
   44913             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   44914             :     
   44915           2 :     CPLFree(psProgressInfo);
   44916             :     
   44917             :   }
   44918           2 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   44919             :   return resultobj;
   44920           0 : fail:
   44921           0 :   {
   44922             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALRasterBandShadow **poObjects)*/
   44923           0 :     CPLFree( arg3 );
   44924             :   }
   44925           0 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   44926           0 :   {
   44927             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   44928             :     
   44929           0 :     CPLFree(psProgressInfo);
   44930             :     
   44931             :   }
   44932             :   return NULL;
   44933             : }
   44934             : 
   44935             : 
   44936         244 : SWIGINTERN PyObject *_wrap_RegenerateOverview(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   44937         244 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   44938         244 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   44939         244 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   44940         244 :   char *arg3 = (char *) "average" ;
   44941         244 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   44942         244 :   void *arg5 = (void *) NULL ;
   44943         244 :   void *argp1 = 0 ;
   44944         244 :   int res1 = 0 ;
   44945         244 :   void *argp2 = 0 ;
   44946         244 :   int res2 = 0 ;
   44947         244 :   int res3 ;
   44948         244 :   char *buf3 = 0 ;
   44949         244 :   int alloc3 = 0 ;
   44950         244 :   PyObject * obj0 = 0 ;
   44951         244 :   PyObject * obj1 = 0 ;
   44952         244 :   PyObject * obj2 = 0 ;
   44953         244 :   PyObject * obj3 = 0 ;
   44954         244 :   PyObject * obj4 = 0 ;
   44955         244 :   char * kwnames[] = {
   44956             :     (char *)"srcBand",  (char *)"overviewBand",  (char *)"resampling",  (char *)"callback",  (char *)"callback_data",  NULL 
   44957             :   };
   44958         244 :   int result;
   44959             :   
   44960             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   44961         244 :   PyProgressData *psProgressInfo;
   44962         244 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   44963         244 :   psProgressInfo->nLastReported = -1;
   44964         244 :   psProgressInfo->psPyCallback = NULL;
   44965         244 :   psProgressInfo->psPyCallbackData = NULL;
   44966         244 :   arg5 = psProgressInfo;
   44967         244 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OOO:RegenerateOverview", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
   44968         244 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   44969         244 :   if (!SWIG_IsOK(res1)) {
   44970           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RegenerateOverview" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   44971             :   }
   44972         244 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   44973         244 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   44974         244 :   if (!SWIG_IsOK(res2)) {
   44975           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RegenerateOverview" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   44976             :   }
   44977         244 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   44978         244 :   if (obj2) {
   44979         244 :     res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
   44980         244 :     if (!SWIG_IsOK(res3)) {
   44981           0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "RegenerateOverview" "', argument " "3"" of type '" "char const *""'");
   44982             :     }
   44983         244 :     arg3 = reinterpret_cast< char * >(buf3);
   44984             :   }
   44985         244 :   if (obj3) {
   44986           0 :     {
   44987             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   44988             :       /* callback_func typemap */
   44989             :       
   44990             :       /* In some cases 0 is passed instead of None. */
   44991             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   44992           0 :       if ( PyLong_Check(obj3) || PyInt_Check(obj3) )
   44993             :       {
   44994           0 :         if( PyLong_AsLong(obj3) == 0 )
   44995             :         {
   44996           0 :           obj3 = Py_None;
   44997             :         }
   44998             :       }
   44999             :       
   45000           0 :       if (obj3 && obj3 != Py_None ) {
   45001           0 :         void* cbfunction = NULL;
   45002           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj3,
   45003             :             (void**)&cbfunction,
   45004             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   45005             :             SWIG_POINTER_EXCEPTION | 0 ));
   45006             :         
   45007           0 :         if ( cbfunction == GDALTermProgress ) {
   45008             :           arg4 = GDALTermProgress;
   45009             :         } else {
   45010           0 :           if (!PyCallable_Check(obj3)) {
   45011           0 :             PyErr_SetString( PyExc_RuntimeError,
   45012             :               "Object given is not a Python function" );
   45013           0 :             SWIG_fail;
   45014             :           }
   45015           0 :           psProgressInfo->psPyCallback = obj3;
   45016           0 :           arg4 = PyProgressProxy;
   45017             :         }
   45018             :         
   45019             :       }
   45020             :       
   45021             :     }
   45022             :   }
   45023         244 :   if (obj4) {
   45024           0 :     {
   45025             :       /* %typemap(in) ( void* callback_data=NULL)  */
   45026           0 :       psProgressInfo->psPyCallbackData = obj4 ;
   45027             :     }
   45028             :   }
   45029         244 :   {
   45030         244 :     if (!arg1) {
   45031           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   45032             :     }
   45033             :   }
   45034         244 :   {
   45035         244 :     if (!arg2) {
   45036           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   45037             :     }
   45038             :   }
   45039         244 :   {
   45040         244 :     const int bLocalUseExceptions = GetUseExceptions();
   45041         244 :     if ( bLocalUseExceptions ) {
   45042         242 :       pushErrorHandler();
   45043             :     }
   45044         244 :     {
   45045         244 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   45046         244 :       result = (int)RegenerateOverview(arg1,arg2,(char const *)arg3,arg4,arg5);
   45047         244 :       SWIG_PYTHON_THREAD_END_ALLOW;
   45048             :     }
   45049         244 :     if ( bLocalUseExceptions ) {
   45050         242 :       popErrorHandler();
   45051             :     }
   45052             : #ifndef SED_HACKS
   45053             :     if ( bLocalUseExceptions ) {
   45054             :       CPLErr eclass = CPLGetLastErrorType();
   45055             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   45056             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   45057             :       }
   45058             :     }
   45059             : #endif
   45060             :   }
   45061         244 :   resultobj = SWIG_From_int(static_cast< int >(result));
   45062         244 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   45063         244 :   {
   45064             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   45065             :     
   45066         244 :     CPLFree(psProgressInfo);
   45067             :     
   45068             :   }
   45069         244 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   45070             :   return resultobj;
   45071           0 : fail:
   45072           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   45073           0 :   {
   45074             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   45075             :     
   45076           0 :     CPLFree(psProgressInfo);
   45077             :     
   45078             :   }
   45079             :   return NULL;
   45080             : }
   45081             : 
   45082             : 
   45083           3 : SWIGINTERN PyObject *_wrap_ContourGenerate(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   45084           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   45085           3 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   45086           3 :   double arg2 ;
   45087           3 :   double arg3 ;
   45088           3 :   int arg4 ;
   45089           3 :   double *arg5 = (double *) 0 ;
   45090           3 :   int arg6 ;
   45091           3 :   double arg7 ;
   45092           3 :   OGRLayerShadow *arg8 = (OGRLayerShadow *) 0 ;
   45093           3 :   int arg9 ;
   45094           3 :   int arg10 ;
   45095           3 :   GDALProgressFunc arg11 = (GDALProgressFunc) NULL ;
   45096           3 :   void *arg12 = (void *) NULL ;
   45097           3 :   void *argp1 = 0 ;
   45098           3 :   int res1 = 0 ;
   45099           3 :   double val2 ;
   45100           3 :   int ecode2 = 0 ;
   45101           3 :   double val3 ;
   45102           3 :   int ecode3 = 0 ;
   45103           3 :   int val6 ;
   45104           3 :   int ecode6 = 0 ;
   45105           3 :   double val7 ;
   45106           3 :   int ecode7 = 0 ;
   45107           3 :   void *argp8 = 0 ;
   45108           3 :   int res8 = 0 ;
   45109           3 :   int val9 ;
   45110           3 :   int ecode9 = 0 ;
   45111           3 :   int val10 ;
   45112           3 :   int ecode10 = 0 ;
   45113           3 :   PyObject * obj0 = 0 ;
   45114           3 :   PyObject * obj1 = 0 ;
   45115           3 :   PyObject * obj2 = 0 ;
   45116           3 :   PyObject * obj3 = 0 ;
   45117           3 :   PyObject * obj4 = 0 ;
   45118           3 :   PyObject * obj5 = 0 ;
   45119           3 :   PyObject * obj6 = 0 ;
   45120           3 :   PyObject * obj7 = 0 ;
   45121           3 :   PyObject * obj8 = 0 ;
   45122           3 :   PyObject * obj9 = 0 ;
   45123           3 :   PyObject * obj10 = 0 ;
   45124           3 :   char * kwnames[] = {
   45125             :     (char *)"srcBand",  (char *)"contourInterval",  (char *)"contourBase",  (char *)"fixedLevelCount",  (char *)"useNoData",  (char *)"noDataValue",  (char *)"dstLayer",  (char *)"idField",  (char *)"elevField",  (char *)"callback",  (char *)"callback_data",  NULL 
   45126             :   };
   45127           3 :   int result;
   45128             :   
   45129             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   45130           3 :   PyProgressData *psProgressInfo;
   45131           3 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   45132           3 :   psProgressInfo->nLastReported = -1;
   45133           3 :   psProgressInfo->psPyCallback = NULL;
   45134           3 :   psProgressInfo->psPyCallbackData = NULL;
   45135           3 :   arg12 = psProgressInfo;
   45136           3 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOOOO|OO:ContourGenerate", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10)) SWIG_fail;
   45137           3 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   45138           3 :   if (!SWIG_IsOK(res1)) {
   45139           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContourGenerate" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   45140             :   }
   45141           3 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   45142           3 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   45143           3 :   if (!SWIG_IsOK(ecode2)) {
   45144           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ContourGenerate" "', argument " "2"" of type '" "double""'");
   45145             :   } 
   45146           3 :   arg2 = static_cast< double >(val2);
   45147           3 :   ecode3 = SWIG_AsVal_double(obj2, &val3);
   45148           3 :   if (!SWIG_IsOK(ecode3)) {
   45149           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ContourGenerate" "', argument " "3"" of type '" "double""'");
   45150             :   } 
   45151           3 :   arg3 = static_cast< double >(val3);
   45152           3 :   {
   45153             :     /* %typemap(in,numinputs=1) (int nList, double* pList)*/
   45154           3 :     arg5 = CreateCDoubleListFromSequence(obj3, &arg4);
   45155           3 :     if( arg4 < 0 ) {
   45156           0 :       SWIG_fail;
   45157             :     }
   45158             :   }
   45159           3 :   ecode6 = SWIG_AsVal_int(obj4, &val6);
   45160           3 :   if (!SWIG_IsOK(ecode6)) {
   45161           0 :     SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "ContourGenerate" "', argument " "6"" of type '" "int""'");
   45162             :   } 
   45163           3 :   arg6 = static_cast< int >(val6);
   45164           3 :   ecode7 = SWIG_AsVal_double(obj5, &val7);
   45165           3 :   if (!SWIG_IsOK(ecode7)) {
   45166           0 :     SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "ContourGenerate" "', argument " "7"" of type '" "double""'");
   45167             :   } 
   45168           3 :   arg7 = static_cast< double >(val7);
   45169           3 :   res8 = SWIG_ConvertPtr(obj6, &argp8,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
   45170           3 :   if (!SWIG_IsOK(res8)) {
   45171           0 :     SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "ContourGenerate" "', argument " "8"" of type '" "OGRLayerShadow *""'"); 
   45172             :   }
   45173           3 :   arg8 = reinterpret_cast< OGRLayerShadow * >(argp8);
   45174           3 :   ecode9 = SWIG_AsVal_int(obj7, &val9);
   45175           3 :   if (!SWIG_IsOK(ecode9)) {
   45176           0 :     SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "ContourGenerate" "', argument " "9"" of type '" "int""'");
   45177             :   } 
   45178           3 :   arg9 = static_cast< int >(val9);
   45179           3 :   ecode10 = SWIG_AsVal_int(obj8, &val10);
   45180           3 :   if (!SWIG_IsOK(ecode10)) {
   45181           0 :     SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "ContourGenerate" "', argument " "10"" of type '" "int""'");
   45182             :   } 
   45183           3 :   arg10 = static_cast< int >(val10);
   45184           3 :   if (obj9) {
   45185           0 :     {
   45186             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   45187             :       /* callback_func typemap */
   45188             :       
   45189             :       /* In some cases 0 is passed instead of None. */
   45190             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   45191           0 :       if ( PyLong_Check(obj9) || PyInt_Check(obj9) )
   45192             :       {
   45193           0 :         if( PyLong_AsLong(obj9) == 0 )
   45194             :         {
   45195           0 :           obj9 = Py_None;
   45196             :         }
   45197             :       }
   45198             :       
   45199           0 :       if (obj9 && obj9 != Py_None ) {
   45200           0 :         void* cbfunction = NULL;
   45201           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj9,
   45202             :             (void**)&cbfunction,
   45203             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   45204             :             SWIG_POINTER_EXCEPTION | 0 ));
   45205             :         
   45206           0 :         if ( cbfunction == GDALTermProgress ) {
   45207             :           arg11 = GDALTermProgress;
   45208             :         } else {
   45209           0 :           if (!PyCallable_Check(obj9)) {
   45210           0 :             PyErr_SetString( PyExc_RuntimeError,
   45211             :               "Object given is not a Python function" );
   45212           0 :             SWIG_fail;
   45213             :           }
   45214           0 :           psProgressInfo->psPyCallback = obj9;
   45215           0 :           arg11 = PyProgressProxy;
   45216             :         }
   45217             :         
   45218             :       }
   45219             :       
   45220             :     }
   45221             :   }
   45222           3 :   if (obj10) {
   45223           0 :     {
   45224             :       /* %typemap(in) ( void* callback_data=NULL)  */
   45225           0 :       psProgressInfo->psPyCallbackData = obj10 ;
   45226             :     }
   45227             :   }
   45228           3 :   {
   45229           3 :     if (!arg1) {
   45230           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   45231             :     }
   45232             :   }
   45233           3 :   {
   45234           3 :     if (!arg8) {
   45235           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   45236             :     }
   45237             :   }
   45238           3 :   {
   45239           3 :     const int bLocalUseExceptions = GetUseExceptions();
   45240           3 :     if ( bLocalUseExceptions ) {
   45241           3 :       pushErrorHandler();
   45242             :     }
   45243           3 :     {
   45244           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   45245           3 :       result = (int)ContourGenerate(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12);
   45246           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   45247             :     }
   45248           3 :     if ( bLocalUseExceptions ) {
   45249           3 :       popErrorHandler();
   45250             :     }
   45251             : #ifndef SED_HACKS
   45252             :     if ( bLocalUseExceptions ) {
   45253             :       CPLErr eclass = CPLGetLastErrorType();
   45254             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   45255             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   45256             :       }
   45257             :     }
   45258             : #endif
   45259             :   }
   45260           3 :   resultobj = SWIG_From_int(static_cast< int >(result));
   45261           3 :   {
   45262             :     /* %typemap(freearg) (int nList, double* pList) */
   45263           3 :     free(arg5);
   45264             :   }
   45265           3 :   {
   45266             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   45267             :     
   45268           3 :     CPLFree(psProgressInfo);
   45269             :     
   45270             :   }
   45271           3 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   45272             :   return resultobj;
   45273           0 : fail:
   45274           0 :   {
   45275             :     /* %typemap(freearg) (int nList, double* pList) */
   45276           0 :     free(arg5);
   45277             :   }
   45278           0 :   {
   45279             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   45280             :     
   45281           0 :     CPLFree(psProgressInfo);
   45282             :     
   45283             :   }
   45284             :   return NULL;
   45285             : }
   45286             : 
   45287             : 
   45288          14 : SWIGINTERN PyObject *_wrap_ContourGenerateEx(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   45289          14 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   45290          14 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   45291          14 :   OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
   45292          14 :   char **arg3 = (char **) NULL ;
   45293          14 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   45294          14 :   void *arg5 = (void *) NULL ;
   45295          14 :   void *argp1 = 0 ;
   45296          14 :   int res1 = 0 ;
   45297          14 :   void *argp2 = 0 ;
   45298          14 :   int res2 = 0 ;
   45299          14 :   PyObject * obj0 = 0 ;
   45300          14 :   PyObject * obj1 = 0 ;
   45301          14 :   PyObject * obj2 = 0 ;
   45302          14 :   PyObject * obj3 = 0 ;
   45303          14 :   PyObject * obj4 = 0 ;
   45304          14 :   char * kwnames[] = {
   45305             :     (char *)"srcBand",  (char *)"dstLayer",  (char *)"options",  (char *)"callback",  (char *)"callback_data",  NULL 
   45306             :   };
   45307          14 :   int result;
   45308             :   
   45309             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   45310          14 :   PyProgressData *psProgressInfo;
   45311          14 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   45312          14 :   psProgressInfo->nLastReported = -1;
   45313          14 :   psProgressInfo->psPyCallback = NULL;
   45314          14 :   psProgressInfo->psPyCallbackData = NULL;
   45315          14 :   arg5 = psProgressInfo;
   45316          14 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OOO:ContourGenerateEx", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
   45317          14 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   45318          14 :   if (!SWIG_IsOK(res1)) {
   45319           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContourGenerateEx" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   45320             :   }
   45321          14 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   45322          14 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
   45323          14 :   if (!SWIG_IsOK(res2)) {
   45324           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ContourGenerateEx" "', argument " "2"" of type '" "OGRLayerShadow *""'"); 
   45325             :   }
   45326          14 :   arg2 = reinterpret_cast< OGRLayerShadow * >(argp2);
   45327          14 :   if (obj2) {
   45328          14 :     {
   45329             :       /* %typemap(in) char **dict */
   45330          14 :       arg3 = NULL;
   45331          14 :       if ( PySequence_Check( obj2 ) ) {
   45332          14 :         int bErr = FALSE;
   45333          14 :         arg3 = CSLFromPySequence(obj2, &bErr);
   45334          14 :         if ( bErr )
   45335             :         {
   45336           0 :           SWIG_fail;
   45337             :         }
   45338             :       }
   45339           0 :       else if ( PyMapping_Check( obj2 ) ) {
   45340           0 :         int bErr = FALSE;
   45341           0 :         arg3 = CSLFromPyMapping(obj2, &bErr);
   45342           0 :         if ( bErr )
   45343             :         {
   45344           0 :           SWIG_fail;
   45345             :         }
   45346             :       }
   45347             :       else {
   45348           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   45349           0 :         SWIG_fail;
   45350             :       }
   45351             :     }
   45352             :   }
   45353          14 :   if (obj3) {
   45354           0 :     {
   45355             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   45356             :       /* callback_func typemap */
   45357             :       
   45358             :       /* In some cases 0 is passed instead of None. */
   45359             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   45360           0 :       if ( PyLong_Check(obj3) || PyInt_Check(obj3) )
   45361             :       {
   45362           0 :         if( PyLong_AsLong(obj3) == 0 )
   45363             :         {
   45364           0 :           obj3 = Py_None;
   45365             :         }
   45366             :       }
   45367             :       
   45368           0 :       if (obj3 && obj3 != Py_None ) {
   45369           0 :         void* cbfunction = NULL;
   45370           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj3,
   45371             :             (void**)&cbfunction,
   45372             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   45373             :             SWIG_POINTER_EXCEPTION | 0 ));
   45374             :         
   45375           0 :         if ( cbfunction == GDALTermProgress ) {
   45376             :           arg4 = GDALTermProgress;
   45377             :         } else {
   45378           0 :           if (!PyCallable_Check(obj3)) {
   45379           0 :             PyErr_SetString( PyExc_RuntimeError,
   45380             :               "Object given is not a Python function" );
   45381           0 :             SWIG_fail;
   45382             :           }
   45383           0 :           psProgressInfo->psPyCallback = obj3;
   45384           0 :           arg4 = PyProgressProxy;
   45385             :         }
   45386             :         
   45387             :       }
   45388             :       
   45389             :     }
   45390             :   }
   45391          14 :   if (obj4) {
   45392           0 :     {
   45393             :       /* %typemap(in) ( void* callback_data=NULL)  */
   45394           0 :       psProgressInfo->psPyCallbackData = obj4 ;
   45395             :     }
   45396             :   }
   45397          14 :   {
   45398          14 :     if (!arg1) {
   45399           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   45400             :     }
   45401             :   }
   45402          14 :   {
   45403          14 :     if (!arg2) {
   45404           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   45405             :     }
   45406             :   }
   45407          14 :   {
   45408          14 :     const int bLocalUseExceptions = GetUseExceptions();
   45409          14 :     if ( bLocalUseExceptions ) {
   45410          14 :       pushErrorHandler();
   45411             :     }
   45412          14 :     {
   45413          14 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   45414          14 :       result = (int)ContourGenerateEx(arg1,arg2,arg3,arg4,arg5);
   45415          14 :       SWIG_PYTHON_THREAD_END_ALLOW;
   45416             :     }
   45417          14 :     if ( bLocalUseExceptions ) {
   45418          14 :       popErrorHandler();
   45419             :     }
   45420             : #ifndef SED_HACKS
   45421             :     if ( bLocalUseExceptions ) {
   45422             :       CPLErr eclass = CPLGetLastErrorType();
   45423             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   45424             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   45425             :       }
   45426             :     }
   45427             : #endif
   45428             :   }
   45429          14 :   resultobj = SWIG_From_int(static_cast< int >(result));
   45430          14 :   {
   45431             :     /* %typemap(freearg) char **dict */
   45432          14 :     CSLDestroy( arg3 );
   45433             :   }
   45434          14 :   {
   45435             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   45436             :     
   45437          14 :     CPLFree(psProgressInfo);
   45438             :     
   45439             :   }
   45440          19 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   45441             :   return resultobj;
   45442           0 : fail:
   45443           0 :   {
   45444             :     /* %typemap(freearg) char **dict */
   45445           0 :     CSLDestroy( arg3 );
   45446             :   }
   45447           0 :   {
   45448             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   45449             :     
   45450           0 :     CPLFree(psProgressInfo);
   45451             :     
   45452             :   }
   45453             :   return NULL;
   45454             : }
   45455             : 
   45456             : 
   45457           1 : SWIGINTERN PyObject *_wrap_ViewshedGenerate(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   45458           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   45459           1 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   45460           1 :   char *arg2 = (char *) 0 ;
   45461           1 :   char *arg3 = (char *) 0 ;
   45462           1 :   char **arg4 = (char **) 0 ;
   45463           1 :   double arg5 ;
   45464           1 :   double arg6 ;
   45465           1 :   double arg7 ;
   45466           1 :   double arg8 ;
   45467           1 :   double arg9 ;
   45468           1 :   double arg10 ;
   45469           1 :   double arg11 ;
   45470           1 :   double arg12 ;
   45471           1 :   double arg13 ;
   45472           1 :   GDALViewshedMode arg14 ;
   45473           1 :   double arg15 ;
   45474           1 :   GDALProgressFunc arg16 = (GDALProgressFunc) NULL ;
   45475           1 :   void *arg17 = (void *) NULL ;
   45476           1 :   GDALViewshedOutputType arg18 = (GDALViewshedOutputType) GVOT_NORMAL ;
   45477           1 :   char **arg19 = (char **) NULL ;
   45478           1 :   void *argp1 = 0 ;
   45479           1 :   int res1 = 0 ;
   45480           1 :   int res2 ;
   45481           1 :   char *buf2 = 0 ;
   45482           1 :   int alloc2 = 0 ;
   45483           1 :   int res3 ;
   45484           1 :   char *buf3 = 0 ;
   45485           1 :   int alloc3 = 0 ;
   45486           1 :   double val5 ;
   45487           1 :   int ecode5 = 0 ;
   45488           1 :   double val6 ;
   45489           1 :   int ecode6 = 0 ;
   45490           1 :   double val7 ;
   45491           1 :   int ecode7 = 0 ;
   45492           1 :   double val8 ;
   45493           1 :   int ecode8 = 0 ;
   45494           1 :   double val9 ;
   45495           1 :   int ecode9 = 0 ;
   45496           1 :   double val10 ;
   45497           1 :   int ecode10 = 0 ;
   45498           1 :   double val11 ;
   45499           1 :   int ecode11 = 0 ;
   45500           1 :   double val12 ;
   45501           1 :   int ecode12 = 0 ;
   45502           1 :   double val13 ;
   45503           1 :   int ecode13 = 0 ;
   45504           1 :   int val14 ;
   45505           1 :   int ecode14 = 0 ;
   45506           1 :   double val15 ;
   45507           1 :   int ecode15 = 0 ;
   45508           1 :   int val18 ;
   45509           1 :   int ecode18 = 0 ;
   45510           1 :   PyObject * obj0 = 0 ;
   45511           1 :   PyObject * obj1 = 0 ;
   45512           1 :   PyObject * obj2 = 0 ;
   45513           1 :   PyObject * obj3 = 0 ;
   45514           1 :   PyObject * obj4 = 0 ;
   45515           1 :   PyObject * obj5 = 0 ;
   45516           1 :   PyObject * obj6 = 0 ;
   45517           1 :   PyObject * obj7 = 0 ;
   45518           1 :   PyObject * obj8 = 0 ;
   45519           1 :   PyObject * obj9 = 0 ;
   45520           1 :   PyObject * obj10 = 0 ;
   45521           1 :   PyObject * obj11 = 0 ;
   45522           1 :   PyObject * obj12 = 0 ;
   45523           1 :   PyObject * obj13 = 0 ;
   45524           1 :   PyObject * obj14 = 0 ;
   45525           1 :   PyObject * obj15 = 0 ;
   45526           1 :   PyObject * obj16 = 0 ;
   45527           1 :   PyObject * obj17 = 0 ;
   45528           1 :   PyObject * obj18 = 0 ;
   45529           1 :   char * kwnames[] = {
   45530             :     (char *)"srcBand",  (char *)"driverName",  (char *)"targetRasterName",  (char *)"creationOptions",  (char *)"observerX",  (char *)"observerY",  (char *)"observerHeight",  (char *)"targetHeight",  (char *)"visibleVal",  (char *)"invisibleVal",  (char *)"outOfRangeVal",  (char *)"noDataVal",  (char *)"dfCurvCoeff",  (char *)"mode",  (char *)"maxDistance",  (char *)"callback",  (char *)"callback_data",  (char *)"heightMode",  (char *)"options",  NULL 
   45531             :   };
   45532           1 :   GDALDatasetShadow *result = 0 ;
   45533             :   
   45534             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   45535           1 :   PyProgressData *psProgressInfo;
   45536           1 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   45537           1 :   psProgressInfo->nLastReported = -1;
   45538           1 :   psProgressInfo->psPyCallback = NULL;
   45539           1 :   psProgressInfo->psPyCallbackData = NULL;
   45540           1 :   arg17 = psProgressInfo;
   45541           1 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOOOOOOOOOO|OOOO:ViewshedGenerate", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10, &obj11, &obj12, &obj13, &obj14, &obj15, &obj16, &obj17, &obj18)) SWIG_fail;
   45542           1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   45543           1 :   if (!SWIG_IsOK(res1)) {
   45544           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewshedGenerate" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   45545             :   }
   45546           1 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   45547           1 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   45548           1 :   if (!SWIG_IsOK(res2)) {
   45549           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewshedGenerate" "', argument " "2"" of type '" "char const *""'");
   45550             :   }
   45551           1 :   arg2 = reinterpret_cast< char * >(buf2);
   45552           1 :   res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
   45553           1 :   if (!SWIG_IsOK(res3)) {
   45554           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewshedGenerate" "', argument " "3"" of type '" "char const *""'");
   45555             :   }
   45556           1 :   arg3 = reinterpret_cast< char * >(buf3);
   45557           1 :   {
   45558             :     /* %typemap(in) char **dict */
   45559           1 :     arg4 = NULL;
   45560           1 :     if ( PySequence_Check( obj3 ) ) {
   45561           1 :       int bErr = FALSE;
   45562           1 :       arg4 = CSLFromPySequence(obj3, &bErr);
   45563           1 :       if ( bErr )
   45564             :       {
   45565           0 :         SWIG_fail;
   45566             :       }
   45567             :     }
   45568           0 :     else if ( PyMapping_Check( obj3 ) ) {
   45569           0 :       int bErr = FALSE;
   45570           0 :       arg4 = CSLFromPyMapping(obj3, &bErr);
   45571           0 :       if ( bErr )
   45572             :       {
   45573           0 :         SWIG_fail;
   45574             :       }
   45575             :     }
   45576             :     else {
   45577           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   45578           0 :       SWIG_fail;
   45579             :     }
   45580             :   }
   45581           1 :   ecode5 = SWIG_AsVal_double(obj4, &val5);
   45582           1 :   if (!SWIG_IsOK(ecode5)) {
   45583           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "ViewshedGenerate" "', argument " "5"" of type '" "double""'");
   45584             :   } 
   45585           1 :   arg5 = static_cast< double >(val5);
   45586           1 :   ecode6 = SWIG_AsVal_double(obj5, &val6);
   45587           1 :   if (!SWIG_IsOK(ecode6)) {
   45588           0 :     SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "ViewshedGenerate" "', argument " "6"" of type '" "double""'");
   45589             :   } 
   45590           1 :   arg6 = static_cast< double >(val6);
   45591           1 :   ecode7 = SWIG_AsVal_double(obj6, &val7);
   45592           1 :   if (!SWIG_IsOK(ecode7)) {
   45593           0 :     SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "ViewshedGenerate" "', argument " "7"" of type '" "double""'");
   45594             :   } 
   45595           1 :   arg7 = static_cast< double >(val7);
   45596           1 :   ecode8 = SWIG_AsVal_double(obj7, &val8);
   45597           1 :   if (!SWIG_IsOK(ecode8)) {
   45598           0 :     SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "ViewshedGenerate" "', argument " "8"" of type '" "double""'");
   45599             :   } 
   45600           1 :   arg8 = static_cast< double >(val8);
   45601           1 :   ecode9 = SWIG_AsVal_double(obj8, &val9);
   45602           1 :   if (!SWIG_IsOK(ecode9)) {
   45603           0 :     SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "ViewshedGenerate" "', argument " "9"" of type '" "double""'");
   45604             :   } 
   45605           1 :   arg9 = static_cast< double >(val9);
   45606           1 :   ecode10 = SWIG_AsVal_double(obj9, &val10);
   45607           1 :   if (!SWIG_IsOK(ecode10)) {
   45608           0 :     SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "ViewshedGenerate" "', argument " "10"" of type '" "double""'");
   45609             :   } 
   45610           1 :   arg10 = static_cast< double >(val10);
   45611           1 :   ecode11 = SWIG_AsVal_double(obj10, &val11);
   45612           1 :   if (!SWIG_IsOK(ecode11)) {
   45613           0 :     SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "ViewshedGenerate" "', argument " "11"" of type '" "double""'");
   45614             :   } 
   45615           1 :   arg11 = static_cast< double >(val11);
   45616           1 :   ecode12 = SWIG_AsVal_double(obj11, &val12);
   45617           1 :   if (!SWIG_IsOK(ecode12)) {
   45618           0 :     SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "ViewshedGenerate" "', argument " "12"" of type '" "double""'");
   45619             :   } 
   45620           1 :   arg12 = static_cast< double >(val12);
   45621           1 :   ecode13 = SWIG_AsVal_double(obj12, &val13);
   45622           1 :   if (!SWIG_IsOK(ecode13)) {
   45623           0 :     SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "ViewshedGenerate" "', argument " "13"" of type '" "double""'");
   45624             :   } 
   45625           1 :   arg13 = static_cast< double >(val13);
   45626           1 :   ecode14 = SWIG_AsVal_int(obj13, &val14);
   45627           1 :   if (!SWIG_IsOK(ecode14)) {
   45628           0 :     SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "ViewshedGenerate" "', argument " "14"" of type '" "GDALViewshedMode""'");
   45629             :   } 
   45630           1 :   arg14 = static_cast< GDALViewshedMode >(val14);
   45631           1 :   ecode15 = SWIG_AsVal_double(obj14, &val15);
   45632           1 :   if (!SWIG_IsOK(ecode15)) {
   45633           0 :     SWIG_exception_fail(SWIG_ArgError(ecode15), "in method '" "ViewshedGenerate" "', argument " "15"" of type '" "double""'");
   45634             :   } 
   45635           1 :   arg15 = static_cast< double >(val15);
   45636           1 :   if (obj15) {
   45637           0 :     {
   45638             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   45639             :       /* callback_func typemap */
   45640             :       
   45641             :       /* In some cases 0 is passed instead of None. */
   45642             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   45643           0 :       if ( PyLong_Check(obj15) || PyInt_Check(obj15) )
   45644             :       {
   45645           0 :         if( PyLong_AsLong(obj15) == 0 )
   45646             :         {
   45647           0 :           obj15 = Py_None;
   45648             :         }
   45649             :       }
   45650             :       
   45651           0 :       if (obj15 && obj15 != Py_None ) {
   45652           0 :         void* cbfunction = NULL;
   45653           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj15,
   45654             :             (void**)&cbfunction,
   45655             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   45656             :             SWIG_POINTER_EXCEPTION | 0 ));
   45657             :         
   45658           0 :         if ( cbfunction == GDALTermProgress ) {
   45659             :           arg16 = GDALTermProgress;
   45660             :         } else {
   45661           0 :           if (!PyCallable_Check(obj15)) {
   45662           0 :             PyErr_SetString( PyExc_RuntimeError,
   45663             :               "Object given is not a Python function" );
   45664           0 :             SWIG_fail;
   45665             :           }
   45666           0 :           psProgressInfo->psPyCallback = obj15;
   45667           0 :           arg16 = PyProgressProxy;
   45668             :         }
   45669             :         
   45670             :       }
   45671             :       
   45672             :     }
   45673             :   }
   45674           1 :   if (obj16) {
   45675           0 :     {
   45676             :       /* %typemap(in) ( void* callback_data=NULL)  */
   45677           0 :       psProgressInfo->psPyCallbackData = obj16 ;
   45678             :     }
   45679             :   }
   45680           1 :   if (obj17) {
   45681           1 :     ecode18 = SWIG_AsVal_int(obj17, &val18);
   45682           1 :     if (!SWIG_IsOK(ecode18)) {
   45683           0 :       SWIG_exception_fail(SWIG_ArgError(ecode18), "in method '" "ViewshedGenerate" "', argument " "18"" of type '" "GDALViewshedOutputType""'");
   45684             :     } 
   45685           1 :     arg18 = static_cast< GDALViewshedOutputType >(val18);
   45686             :   }
   45687           1 :   if (obj18) {
   45688           1 :     {
   45689             :       /* %typemap(in) char **dict */
   45690           1 :       arg19 = NULL;
   45691           1 :       if ( PySequence_Check( obj18 ) ) {
   45692           1 :         int bErr = FALSE;
   45693           1 :         arg19 = CSLFromPySequence(obj18, &bErr);
   45694           1 :         if ( bErr )
   45695             :         {
   45696           0 :           SWIG_fail;
   45697             :         }
   45698             :       }
   45699           0 :       else if ( PyMapping_Check( obj18 ) ) {
   45700           0 :         int bErr = FALSE;
   45701           0 :         arg19 = CSLFromPyMapping(obj18, &bErr);
   45702           0 :         if ( bErr )
   45703             :         {
   45704           0 :           SWIG_fail;
   45705             :         }
   45706             :       }
   45707             :       else {
   45708           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   45709           0 :         SWIG_fail;
   45710             :       }
   45711             :     }
   45712             :   }
   45713           1 :   {
   45714           1 :     if (!arg1) {
   45715           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   45716             :     }
   45717             :   }
   45718           1 :   {
   45719           1 :     const int bLocalUseExceptions = GetUseExceptions();
   45720           1 :     if ( bLocalUseExceptions ) {
   45721           1 :       pushErrorHandler();
   45722             :     }
   45723           1 :     {
   45724           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   45725           1 :       result = (GDALDatasetShadow *)ViewshedGenerate(arg1,(char const *)arg2,(char const *)arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18,arg19);
   45726           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   45727             :     }
   45728           1 :     if ( bLocalUseExceptions ) {
   45729           1 :       popErrorHandler();
   45730             :     }
   45731             : #ifndef SED_HACKS
   45732             :     if ( bLocalUseExceptions ) {
   45733             :       CPLErr eclass = CPLGetLastErrorType();
   45734             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   45735             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   45736             :       }
   45737             :     }
   45738             : #endif
   45739             :   }
   45740           1 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   45741           1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   45742           1 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   45743           1 :   {
   45744             :     /* %typemap(freearg) char **dict */
   45745           1 :     CSLDestroy( arg4 );
   45746             :   }
   45747           1 :   {
   45748             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   45749             :     
   45750           1 :     CPLFree(psProgressInfo);
   45751             :     
   45752             :   }
   45753           1 :   {
   45754             :     /* %typemap(freearg) char **dict */
   45755           1 :     CSLDestroy( arg19 );
   45756             :   }
   45757           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   45758             :   return resultobj;
   45759           0 : fail:
   45760           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   45761           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   45762           0 :   {
   45763             :     /* %typemap(freearg) char **dict */
   45764           0 :     CSLDestroy( arg4 );
   45765             :   }
   45766           0 :   {
   45767             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   45768             :     
   45769           0 :     CPLFree(psProgressInfo);
   45770             :     
   45771             :   }
   45772           0 :   {
   45773             :     /* %typemap(freearg) char **dict */
   45774           0 :     CSLDestroy( arg19 );
   45775             :   }
   45776             :   return NULL;
   45777             : }
   45778             : 
   45779             : 
   45780           6 : SWIGINTERN PyObject *_wrap_IsLineOfSightVisible(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   45781           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   45782           6 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   45783           6 :   int arg2 ;
   45784           6 :   int arg3 ;
   45785           6 :   double arg4 ;
   45786           6 :   int arg5 ;
   45787           6 :   int arg6 ;
   45788           6 :   double arg7 ;
   45789           6 :   bool *arg8 = (bool *) 0 ;
   45790           6 :   int *arg9 = (int *) 0 ;
   45791           6 :   int *arg10 = (int *) 0 ;
   45792           6 :   char **arg11 = (char **) NULL ;
   45793           6 :   void *argp1 = 0 ;
   45794           6 :   int res1 = 0 ;
   45795           6 :   int val2 ;
   45796           6 :   int ecode2 = 0 ;
   45797           6 :   int val3 ;
   45798           6 :   int ecode3 = 0 ;
   45799           6 :   double val4 ;
   45800           6 :   int ecode4 = 0 ;
   45801           6 :   int val5 ;
   45802           6 :   int ecode5 = 0 ;
   45803           6 :   int val6 ;
   45804           6 :   int ecode6 = 0 ;
   45805           6 :   double val7 ;
   45806           6 :   int ecode7 = 0 ;
   45807           6 :   bool visible8 = 0 ;
   45808           6 :   int nxintersection8 = 0 ;
   45809           6 :   int nyintersection8 = 0 ;
   45810           6 :   PyObject * obj0 = 0 ;
   45811           6 :   PyObject * obj1 = 0 ;
   45812           6 :   PyObject * obj2 = 0 ;
   45813           6 :   PyObject * obj3 = 0 ;
   45814           6 :   PyObject * obj4 = 0 ;
   45815           6 :   PyObject * obj5 = 0 ;
   45816           6 :   PyObject * obj6 = 0 ;
   45817           6 :   PyObject * obj7 = 0 ;
   45818           6 :   char * kwnames[] = {
   45819             :     (char *)"band",  (char *)"xA",  (char *)"yA",  (char *)"zA",  (char *)"xB",  (char *)"yB",  (char *)"zB",  (char *)"options",  NULL 
   45820             :   };
   45821             :   
   45822           6 :   {
   45823             :     /* %typemap(in) (bool *pbVisible, int *pnXIntersection, int *pnYIntersection) */
   45824           6 :     arg8 = &visible8;
   45825           6 :     arg9 = &nxintersection8;
   45826           6 :     arg10 = &nyintersection8;
   45827             :   }
   45828           6 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOO|O:IsLineOfSightVisible", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7)) SWIG_fail;
   45829           6 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   45830           6 :   if (!SWIG_IsOK(res1)) {
   45831           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IsLineOfSightVisible" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   45832             :   }
   45833           6 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   45834           6 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   45835           6 :   if (!SWIG_IsOK(ecode2)) {
   45836           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IsLineOfSightVisible" "', argument " "2"" of type '" "int""'");
   45837             :   } 
   45838           6 :   arg2 = static_cast< int >(val2);
   45839           6 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   45840           6 :   if (!SWIG_IsOK(ecode3)) {
   45841           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IsLineOfSightVisible" "', argument " "3"" of type '" "int""'");
   45842             :   } 
   45843           6 :   arg3 = static_cast< int >(val3);
   45844           6 :   ecode4 = SWIG_AsVal_double(obj3, &val4);
   45845           6 :   if (!SWIG_IsOK(ecode4)) {
   45846           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IsLineOfSightVisible" "', argument " "4"" of type '" "double""'");
   45847             :   } 
   45848           6 :   arg4 = static_cast< double >(val4);
   45849           6 :   ecode5 = SWIG_AsVal_int(obj4, &val5);
   45850           6 :   if (!SWIG_IsOK(ecode5)) {
   45851           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "IsLineOfSightVisible" "', argument " "5"" of type '" "int""'");
   45852             :   } 
   45853           6 :   arg5 = static_cast< int >(val5);
   45854           6 :   ecode6 = SWIG_AsVal_int(obj5, &val6);
   45855           6 :   if (!SWIG_IsOK(ecode6)) {
   45856           0 :     SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "IsLineOfSightVisible" "', argument " "6"" of type '" "int""'");
   45857             :   } 
   45858           6 :   arg6 = static_cast< int >(val6);
   45859           6 :   ecode7 = SWIG_AsVal_double(obj6, &val7);
   45860           6 :   if (!SWIG_IsOK(ecode7)) {
   45861           0 :     SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "IsLineOfSightVisible" "', argument " "7"" of type '" "double""'");
   45862             :   } 
   45863           6 :   arg7 = static_cast< double >(val7);
   45864           6 :   if (obj7) {
   45865           0 :     {
   45866             :       /* %typemap(in) char **dict */
   45867           0 :       arg11 = NULL;
   45868           0 :       if ( PySequence_Check( obj7 ) ) {
   45869           0 :         int bErr = FALSE;
   45870           0 :         arg11 = CSLFromPySequence(obj7, &bErr);
   45871           0 :         if ( bErr )
   45872             :         {
   45873           0 :           SWIG_fail;
   45874             :         }
   45875             :       }
   45876           0 :       else if ( PyMapping_Check( obj7 ) ) {
   45877           0 :         int bErr = FALSE;
   45878           0 :         arg11 = CSLFromPyMapping(obj7, &bErr);
   45879           0 :         if ( bErr )
   45880             :         {
   45881           0 :           SWIG_fail;
   45882             :         }
   45883             :       }
   45884             :       else {
   45885           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   45886           0 :         SWIG_fail;
   45887             :       }
   45888             :     }
   45889             :   }
   45890           6 :   {
   45891           6 :     if (!arg1) {
   45892           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   45893             :     }
   45894             :   }
   45895           5 :   {
   45896           5 :     const int bLocalUseExceptions = GetUseExceptions();
   45897           5 :     if ( bLocalUseExceptions ) {
   45898           5 :       pushErrorHandler();
   45899             :     }
   45900           5 :     {
   45901           5 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   45902           5 :       IsLineOfSightVisible(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
   45903           5 :       SWIG_PYTHON_THREAD_END_ALLOW;
   45904             :     }
   45905           5 :     if ( bLocalUseExceptions ) {
   45906           5 :       popErrorHandler();
   45907             :     }
   45908             : #ifndef SED_HACKS
   45909             :     if ( bLocalUseExceptions ) {
   45910             :       CPLErr eclass = CPLGetLastErrorType();
   45911             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   45912             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   45913             :       }
   45914             :     }
   45915             : #endif
   45916             :   }
   45917           5 :   resultobj = SWIG_Py_Void();
   45918           5 :   {
   45919             :     /* %typemap(argout) (bool *pbVisible, int *pnXIntersection, int *pnYIntersection)  */
   45920           5 :     PyObject *r = PyTuple_New( 3 );
   45921           5 :     PyTuple_SetItem( r, 0, PyBool_FromLong(*arg8) );
   45922           5 :     PyTuple_SetItem( r, 1, PyLong_FromLong(*arg9) );
   45923           5 :     PyTuple_SetItem( r, 2, PyLong_FromLong(*arg10) );
   45924           5 :     resultobj = t_output_helper(resultobj,r);
   45925             :   }
   45926           5 :   {
   45927             :     /* %typemap(freearg) char **dict */
   45928           5 :     CSLDestroy( arg11 );
   45929             :   }
   45930           7 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   45931             :   return resultobj;
   45932           1 : fail:
   45933           1 :   {
   45934             :     /* %typemap(freearg) char **dict */
   45935           1 :     CSLDestroy( arg11 );
   45936             :   }
   45937             :   return NULL;
   45938             : }
   45939             : 
   45940             : 
   45941          20 : SWIGINTERN PyObject *_wrap_AutoCreateWarpedVRT(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   45942          20 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   45943          20 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   45944          20 :   char *arg2 = (char *) 0 ;
   45945          20 :   char *arg3 = (char *) 0 ;
   45946          20 :   GDALResampleAlg arg4 = (GDALResampleAlg) GRA_NearestNeighbour ;
   45947          20 :   double arg5 = (double) 0.0 ;
   45948          20 :   void *argp1 = 0 ;
   45949          20 :   int res1 = 0 ;
   45950          20 :   int res2 ;
   45951          20 :   char *buf2 = 0 ;
   45952          20 :   int alloc2 = 0 ;
   45953          20 :   int res3 ;
   45954          20 :   char *buf3 = 0 ;
   45955          20 :   int alloc3 = 0 ;
   45956          20 :   int val4 ;
   45957          20 :   int ecode4 = 0 ;
   45958          20 :   double val5 ;
   45959          20 :   int ecode5 = 0 ;
   45960          20 :   PyObject *swig_obj[5] ;
   45961          20 :   GDALDatasetShadow *result = 0 ;
   45962             :   
   45963          20 :   if (!SWIG_Python_UnpackTuple(args, "AutoCreateWarpedVRT", 1, 5, swig_obj)) SWIG_fail;
   45964          20 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   45965          20 :   if (!SWIG_IsOK(res1)) {
   45966           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AutoCreateWarpedVRT" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   45967             :   }
   45968          20 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   45969          20 :   if (swig_obj[1]) {
   45970           9 :     res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   45971           9 :     if (!SWIG_IsOK(res2)) {
   45972           0 :       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AutoCreateWarpedVRT" "', argument " "2"" of type '" "char const *""'");
   45973             :     }
   45974           9 :     arg2 = reinterpret_cast< char * >(buf2);
   45975             :   }
   45976          20 :   if (swig_obj[2]) {
   45977           9 :     res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   45978           9 :     if (!SWIG_IsOK(res3)) {
   45979           0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "AutoCreateWarpedVRT" "', argument " "3"" of type '" "char const *""'");
   45980             :     }
   45981           9 :     arg3 = reinterpret_cast< char * >(buf3);
   45982             :   }
   45983          20 :   if (swig_obj[3]) {
   45984           3 :     ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
   45985           3 :     if (!SWIG_IsOK(ecode4)) {
   45986           0 :       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "AutoCreateWarpedVRT" "', argument " "4"" of type '" "GDALResampleAlg""'");
   45987             :     } 
   45988           3 :     arg4 = static_cast< GDALResampleAlg >(val4);
   45989             :   }
   45990          20 :   if (swig_obj[4]) {
   45991           3 :     ecode5 = SWIG_AsVal_double(swig_obj[4], &val5);
   45992           3 :     if (!SWIG_IsOK(ecode5)) {
   45993           0 :       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "AutoCreateWarpedVRT" "', argument " "5"" of type '" "double""'");
   45994             :     } 
   45995           3 :     arg5 = static_cast< double >(val5);
   45996             :   }
   45997          20 :   {
   45998          20 :     if (!arg1) {
   45999           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   46000             :     }
   46001             :   }
   46002          20 :   {
   46003          20 :     const int bLocalUseExceptions = GetUseExceptions();
   46004          20 :     if ( bLocalUseExceptions ) {
   46005          20 :       pushErrorHandler();
   46006             :     }
   46007          20 :     {
   46008          20 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46009          20 :       result = (GDALDatasetShadow *)AutoCreateWarpedVRT(arg1,(char const *)arg2,(char const *)arg3,arg4,arg5);
   46010          20 :       SWIG_PYTHON_THREAD_END_ALLOW;
   46011             :     }
   46012          20 :     if ( bLocalUseExceptions ) {
   46013          20 :       popErrorHandler();
   46014             :     }
   46015             : #ifndef SED_HACKS
   46016             :     if ( bLocalUseExceptions ) {
   46017             :       CPLErr eclass = CPLGetLastErrorType();
   46018             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   46019             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   46020             :       }
   46021             :     }
   46022             : #endif
   46023             :   }
   46024          20 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   46025          20 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   46026          20 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   46027          21 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   46028             :   return resultobj;
   46029           0 : fail:
   46030           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   46031           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   46032             :   return NULL;
   46033             : }
   46034             : 
   46035             : 
   46036           8 : SWIGINTERN PyObject *_wrap_CreatePansharpenedVRT(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46037           8 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46038           8 :   char *arg1 = (char *) 0 ;
   46039           8 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   46040           8 :   int arg3 ;
   46041           8 :   GDALRasterBandShadow **arg4 = (GDALRasterBandShadow **) 0 ;
   46042           8 :   int res1 ;
   46043           8 :   char *buf1 = 0 ;
   46044           8 :   int alloc1 = 0 ;
   46045           8 :   void *argp2 = 0 ;
   46046           8 :   int res2 = 0 ;
   46047           8 :   PyObject *swig_obj[3] ;
   46048           8 :   GDALDatasetShadow *result = 0 ;
   46049             :   
   46050           8 :   if (!SWIG_Python_UnpackTuple(args, "CreatePansharpenedVRT", 3, 3, swig_obj)) SWIG_fail;
   46051           8 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   46052           8 :   if (!SWIG_IsOK(res1)) {
   46053           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CreatePansharpenedVRT" "', argument " "1"" of type '" "char const *""'");
   46054             :   }
   46055           8 :   arg1 = reinterpret_cast< char * >(buf1);
   46056           8 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   46057           8 :   if (!SWIG_IsOK(res2)) {
   46058           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CreatePansharpenedVRT" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   46059             :   }
   46060           8 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   46061           8 :   {
   46062             :     /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALRasterBandShadow *optional_##GDALRasterBandShadow)*/
   46063           8 :     if ( !PySequence_Check(swig_obj[2]) ) {
   46064           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   46065           0 :       SWIG_fail;
   46066             :     }
   46067           8 :     Py_ssize_t size = PySequence_Size(swig_obj[2]);
   46068           8 :     if( size > (Py_ssize_t)INT_MAX ) {
   46069           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   46070           0 :       SWIG_fail;
   46071             :     }
   46072           8 :     if( (size_t)size > SIZE_MAX / sizeof(GDALRasterBandShadow*) ) {
   46073           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   46074           0 :       SWIG_fail;
   46075             :     }
   46076           8 :     arg3 = (int)size;
   46077           8 :     arg4 = (GDALRasterBandShadow**) VSIMalloc(arg3*sizeof(GDALRasterBandShadow*));
   46078           8 :     if( !arg4) {
   46079           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   46080           0 :       SWIG_fail;
   46081             :     }
   46082             :     
   46083          30 :     for( int i = 0; i<arg3; i++ ) {
   46084          22 :       PyObject *o = PySequence_GetItem(swig_obj[2],i);
   46085          22 :       GDALRasterBandShadow* rawobjectpointer = NULL;
   46086          22 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALRasterBandShadow, SWIG_POINTER_EXCEPTION | 0 ));
   46087          22 :       if (!rawobjectpointer) {
   46088           0 :         Py_DECREF(o);
   46089           0 :         PyErr_SetString(PyExc_TypeError, "object of wrong GDALRasterBandShadow");
   46090           0 :         SWIG_fail;
   46091             :       }
   46092          22 :       arg4[i] = rawobjectpointer;
   46093          22 :       Py_DECREF(o);
   46094             :       
   46095             :     }
   46096             :   }
   46097           8 :   {
   46098           8 :     if (!arg2) {
   46099           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   46100             :     }
   46101             :   }
   46102           8 :   {
   46103           8 :     const int bLocalUseExceptions = GetUseExceptions();
   46104           8 :     if ( bLocalUseExceptions ) {
   46105           2 :       pushErrorHandler();
   46106             :     }
   46107           8 :     {
   46108           8 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46109           8 :       result = (GDALDatasetShadow *)CreatePansharpenedVRT((char const *)arg1,arg2,arg3,arg4);
   46110           8 :       SWIG_PYTHON_THREAD_END_ALLOW;
   46111             :     }
   46112           8 :     if ( bLocalUseExceptions ) {
   46113           2 :       popErrorHandler();
   46114             :     }
   46115             : #ifndef SED_HACKS
   46116             :     if ( bLocalUseExceptions ) {
   46117             :       CPLErr eclass = CPLGetLastErrorType();
   46118             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   46119             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   46120             :       }
   46121             :     }
   46122             : #endif
   46123             :   }
   46124           8 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   46125           8 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   46126           8 :   {
   46127             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALRasterBandShadow **poObjects)*/
   46128           8 :     CPLFree( arg4 );
   46129             :   }
   46130           8 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   46131             :   return resultobj;
   46132           0 : fail:
   46133           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   46134           0 :   {
   46135             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALRasterBandShadow **poObjects)*/
   46136           0 :     CPLFree( arg4 );
   46137             :   }
   46138             :   return NULL;
   46139             : }
   46140             : 
   46141             : 
   46142          68 : SWIGINTERN PyObject *_wrap_delete_GDALTransformerInfoShadow(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46143          68 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46144          68 :   GDALTransformerInfoShadow *arg1 = (GDALTransformerInfoShadow *) 0 ;
   46145          68 :   void *argp1 = 0 ;
   46146          68 :   int res1 = 0 ;
   46147          68 :   PyObject *swig_obj[1] ;
   46148             :   
   46149          68 :   if (!args) SWIG_fail;
   46150          68 :   swig_obj[0] = args;
   46151          68 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALTransformerInfoShadow, SWIG_POINTER_DISOWN |  0 );
   46152          68 :   if (!SWIG_IsOK(res1)) {
   46153           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALTransformerInfoShadow" "', argument " "1"" of type '" "GDALTransformerInfoShadow *""'"); 
   46154             :   }
   46155          68 :   arg1 = reinterpret_cast< GDALTransformerInfoShadow * >(argp1);
   46156          68 :   {
   46157          68 :     const int bLocalUseExceptions = GetUseExceptions();
   46158          68 :     if ( bLocalUseExceptions ) {
   46159          67 :       pushErrorHandler();
   46160             :     }
   46161          68 :     {
   46162          68 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46163          68 :       delete_GDALTransformerInfoShadow(arg1);
   46164          68 :       SWIG_PYTHON_THREAD_END_ALLOW;
   46165             :     }
   46166          68 :     if ( bLocalUseExceptions ) {
   46167          67 :       popErrorHandler();
   46168             :     }
   46169             : #ifndef SED_HACKS
   46170             :     if ( bLocalUseExceptions ) {
   46171             :       CPLErr eclass = CPLGetLastErrorType();
   46172             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   46173             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   46174             :       }
   46175             :     }
   46176             : #endif
   46177             :   }
   46178          68 :   resultobj = SWIG_Py_Void();
   46179          68 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   46180             :   return resultobj;
   46181             : fail:
   46182             :   return NULL;
   46183             : }
   46184             : 
   46185             : 
   46186             : SWIGINTERN PyObject *_wrap_GDALTransformerInfoShadow_TransformPoint__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
   46187             :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46188             :   GDALTransformerInfoShadow *arg1 = (GDALTransformerInfoShadow *) 0 ;
   46189             :   int arg2 ;
   46190             :   double *arg3 ;
   46191             :   void *argp1 = 0 ;
   46192             :   int res1 = 0 ;
   46193             :   int val2 ;
   46194             :   int ecode2 = 0 ;
   46195             :   double argin3[3] ;
   46196             :   int result;
   46197             :   
   46198             :   if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
   46199             :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALTransformerInfoShadow, 0 |  0 );
   46200             :   if (!SWIG_IsOK(res1)) {
   46201             :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDALTransformerInfoShadow_TransformPoint" "', argument " "1"" of type '" "GDALTransformerInfoShadow *""'"); 
   46202             :   }
   46203             :   arg1 = reinterpret_cast< GDALTransformerInfoShadow * >(argp1);
   46204             :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   46205             :   if (!SWIG_IsOK(ecode2)) {
   46206             :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GDALTransformerInfoShadow_TransformPoint" "', argument " "2"" of type '" "int""'");
   46207             :   } 
   46208             :   arg2 = static_cast< int >(val2);
   46209             :   {
   46210             :     /* %typemap(in) (double argin3[ANY]) */
   46211             :     arg3 = argin3;
   46212             :     if (! PySequence_Check(swig_obj[2]) ) {
   46213             :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   46214             :       SWIG_fail;
   46215             :     }
   46216             :     Py_ssize_t seq_size = PySequence_Size(swig_obj[2]);
   46217             :     if ( seq_size != 3 ) {
   46218             :       PyErr_SetString(PyExc_TypeError, "sequence must have length ##size");
   46219             :       SWIG_fail;
   46220             :     }
   46221             :     for (unsigned int i=0; i<3; i++) {
   46222             :       PyObject *o = PySequence_GetItem(swig_obj[2],i);
   46223             :       double val;
   46224             :       if ( !PyArg_Parse(o, "d", &val ) ) {
   46225             :         PyErr_SetString(PyExc_TypeError, "not a number");
   46226             :         Py_DECREF(o);
   46227             :         SWIG_fail;
   46228             :       }
   46229             :       arg3[i] =  val;
   46230             :       Py_DECREF(o);
   46231             :     }
   46232             :   }
   46233             :   {
   46234             :     const int bLocalUseExceptions = GetUseExceptions();
   46235             :     if ( bLocalUseExceptions ) {
   46236             :       pushErrorHandler();
   46237             :     }
   46238             :     {
   46239             :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46240             :       result = (int)GDALTransformerInfoShadow_TransformPoint__SWIG_0(arg1,arg2,arg3);
   46241             :       SWIG_PYTHON_THREAD_END_ALLOW;
   46242             :     }
   46243             :     if ( bLocalUseExceptions ) {
   46244             :       popErrorHandler();
   46245             :     }
   46246             : #ifndef SED_HACKS
   46247             :     if ( bLocalUseExceptions ) {
   46248             :       CPLErr eclass = CPLGetLastErrorType();
   46249             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   46250             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   46251             :       }
   46252             :     }
   46253             : #endif
   46254             :   }
   46255             :   resultobj = SWIG_From_int(static_cast< int >(result));
   46256             :   {
   46257             :     /* %typemap(argout) (double argout[ANY]) */
   46258             :     PyObject *out = CreateTupleFromDoubleArray( arg3, 3 );
   46259             :     resultobj = t_output_helper(resultobj,out);
   46260             :   }
   46261             :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   46262             :   return resultobj;
   46263             : fail:
   46264             :   return NULL;
   46265             : }
   46266             : 
   46267             : 
   46268             : SWIGINTERN PyObject *_wrap_GDALTransformerInfoShadow_TransformPoint__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
   46269             :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46270             :   GDALTransformerInfoShadow *arg1 = (GDALTransformerInfoShadow *) 0 ;
   46271             :   double *arg2 ;
   46272             :   int arg3 ;
   46273             :   double arg4 ;
   46274             :   double arg5 ;
   46275             :   double arg6 = (double) 0.0 ;
   46276             :   void *argp1 = 0 ;
   46277             :   int res1 = 0 ;
   46278             :   double argout2[3] ;
   46279             :   int val3 ;
   46280             :   int ecode3 = 0 ;
   46281             :   double val4 ;
   46282             :   int ecode4 = 0 ;
   46283             :   double val5 ;
   46284             :   int ecode5 = 0 ;
   46285             :   double val6 ;
   46286             :   int ecode6 = 0 ;
   46287             :   int result;
   46288             :   
   46289             :   {
   46290             :     /* %typemap(in,numinputs=0) (double argout2[ANY]) */
   46291             :     memset(argout2, 0, sizeof(argout2));
   46292             :     arg2 = argout2;
   46293             :   }
   46294             :   if ((nobjs < 4) || (nobjs > 5)) SWIG_fail;
   46295             :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALTransformerInfoShadow, 0 |  0 );
   46296             :   if (!SWIG_IsOK(res1)) {
   46297             :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDALTransformerInfoShadow_TransformPoint" "', argument " "1"" of type '" "GDALTransformerInfoShadow *""'"); 
   46298             :   }
   46299             :   arg1 = reinterpret_cast< GDALTransformerInfoShadow * >(argp1);
   46300             :   ecode3 = SWIG_AsVal_int(swig_obj[1], &val3);
   46301             :   if (!SWIG_IsOK(ecode3)) {
   46302             :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "GDALTransformerInfoShadow_TransformPoint" "', argument " "3"" of type '" "int""'");
   46303             :   } 
   46304             :   arg3 = static_cast< int >(val3);
   46305             :   ecode4 = SWIG_AsVal_double(swig_obj[2], &val4);
   46306             :   if (!SWIG_IsOK(ecode4)) {
   46307             :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "GDALTransformerInfoShadow_TransformPoint" "', argument " "4"" of type '" "double""'");
   46308             :   } 
   46309             :   arg4 = static_cast< double >(val4);
   46310             :   ecode5 = SWIG_AsVal_double(swig_obj[3], &val5);
   46311             :   if (!SWIG_IsOK(ecode5)) {
   46312             :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "GDALTransformerInfoShadow_TransformPoint" "', argument " "5"" of type '" "double""'");
   46313             :   } 
   46314             :   arg5 = static_cast< double >(val5);
   46315             :   if (swig_obj[4]) {
   46316             :     ecode6 = SWIG_AsVal_double(swig_obj[4], &val6);
   46317             :     if (!SWIG_IsOK(ecode6)) {
   46318             :       SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "GDALTransformerInfoShadow_TransformPoint" "', argument " "6"" of type '" "double""'");
   46319             :     } 
   46320             :     arg6 = static_cast< double >(val6);
   46321             :   }
   46322             :   {
   46323             :     const int bLocalUseExceptions = GetUseExceptions();
   46324             :     if ( bLocalUseExceptions ) {
   46325             :       pushErrorHandler();
   46326             :     }
   46327             :     {
   46328             :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46329             :       result = (int)GDALTransformerInfoShadow_TransformPoint__SWIG_1(arg1,arg2,arg3,arg4,arg5,arg6);
   46330             :       SWIG_PYTHON_THREAD_END_ALLOW;
   46331             :     }
   46332             :     if ( bLocalUseExceptions ) {
   46333             :       popErrorHandler();
   46334             :     }
   46335             : #ifndef SED_HACKS
   46336             :     if ( bLocalUseExceptions ) {
   46337             :       CPLErr eclass = CPLGetLastErrorType();
   46338             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   46339             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   46340             :       }
   46341             :     }
   46342             : #endif
   46343             :   }
   46344             :   resultobj = SWIG_From_int(static_cast< int >(result));
   46345             :   {
   46346             :     /* %typemap(argout) (double argout[ANY]) */
   46347             :     PyObject *out = CreateTupleFromDoubleArray( arg2, 3 );
   46348             :     resultobj = t_output_helper(resultobj,out);
   46349             :   }
   46350             :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   46351             :   return resultobj;
   46352             : fail:
   46353             :   return NULL;
   46354             : }
   46355             : 
   46356             : 
   46357        8674 : SWIGINTERN PyObject *_wrap_GDALTransformerInfoShadow_TransformPoint(PyObject *self, PyObject *args) {
   46358        8674 :   Py_ssize_t argc;
   46359        8674 :   PyObject *argv[6] = {
   46360             :     0
   46361             :   };
   46362             :   
   46363        8674 :   if (!(argc = SWIG_Python_UnpackTuple(args, "GDALTransformerInfoShadow_TransformPoint", 0, 5, argv))) SWIG_fail;
   46364        8674 :   --argc;
   46365        8674 :   if (argc == 3) {
   46366           0 :     int _v;
   46367           0 :     void *vptr = 0;
   46368           0 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_GDALTransformerInfoShadow, 0);
   46369           0 :     _v = SWIG_CheckState(res);
   46370           0 :     if (_v) {
   46371           0 :       {
   46372           0 :         int res = SWIG_AsVal_int(argv[1], NULL);
   46373           0 :         _v = SWIG_CheckState(res);
   46374             :       }
   46375           0 :       if (_v) {
   46376           0 :         void *vptr = 0;
   46377           0 :         int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_double, 0);
   46378           0 :         _v = SWIG_CheckState(res);
   46379           0 :         if (_v) {
   46380           0 :           return _wrap_GDALTransformerInfoShadow_TransformPoint__SWIG_0(self, argc, argv);
   46381             :         }
   46382             :       }
   46383             :     }
   46384             :   }
   46385        8674 :   if ((argc >= 4) && (argc <= 5)) {
   46386        8674 :     int _v;
   46387        8674 :     void *vptr = 0;
   46388        8674 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_GDALTransformerInfoShadow, 0);
   46389        8674 :     _v = SWIG_CheckState(res);
   46390        8674 :     if (_v) {
   46391        8674 :       {
   46392        8674 :         int res = SWIG_AsVal_int(argv[1], NULL);
   46393        8674 :         _v = SWIG_CheckState(res);
   46394             :       }
   46395        8674 :       if (_v) {
   46396        8674 :         {
   46397        8674 :           int res = SWIG_AsVal_double(argv[2], NULL);
   46398        8674 :           _v = SWIG_CheckState(res);
   46399             :         }
   46400        8674 :         if (_v) {
   46401        8674 :           {
   46402        8674 :             int res = SWIG_AsVal_double(argv[3], NULL);
   46403        8674 :             _v = SWIG_CheckState(res);
   46404             :           }
   46405        8674 :           if (_v) {
   46406        8674 :             if (argc <= 4) {
   46407        8674 :               return _wrap_GDALTransformerInfoShadow_TransformPoint__SWIG_1(self, argc, argv);
   46408             :             }
   46409          39 :             {
   46410          39 :               int res = SWIG_AsVal_double(argv[4], NULL);
   46411          39 :               _v = SWIG_CheckState(res);
   46412             :             }
   46413          39 :             if (_v) {
   46414          39 :               return _wrap_GDALTransformerInfoShadow_TransformPoint__SWIG_1(self, argc, argv);
   46415             :             }
   46416             :           }
   46417             :         }
   46418             :       }
   46419             :     }
   46420             :   }
   46421             :   
   46422           0 : fail:
   46423           0 :   SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'GDALTransformerInfoShadow_TransformPoint'.\n"
   46424             :     "  Possible C/C++ prototypes are:\n"
   46425             :     "    GDALTransformerInfoShadow::TransformPoint(int,double [3])\n"
   46426             :     "    GDALTransformerInfoShadow::TransformPoint(double [3],int,double,double,double)\n");
   46427             :   return 0;
   46428             : }
   46429             : 
   46430             : 
   46431           4 : SWIGINTERN PyObject *_wrap_GDALTransformerInfoShadow_TransformPoints(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46432           4 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46433           4 :   GDALTransformerInfoShadow *arg1 = (GDALTransformerInfoShadow *) 0 ;
   46434           4 :   int arg2 ;
   46435           4 :   int arg3 ;
   46436           4 :   double *arg4 = (double *) 0 ;
   46437           4 :   double *arg5 = (double *) 0 ;
   46438           4 :   double *arg6 = (double *) 0 ;
   46439           4 :   int *arg7 = (int *) 0 ;
   46440           4 :   void *argp1 = 0 ;
   46441           4 :   int res1 = 0 ;
   46442           4 :   int val2 ;
   46443           4 :   int ecode2 = 0 ;
   46444           4 :   PyObject *swig_obj[3] ;
   46445           4 :   int result;
   46446             :   
   46447           4 :   if (!SWIG_Python_UnpackTuple(args, "GDALTransformerInfoShadow_TransformPoints", 3, 3, swig_obj)) SWIG_fail;
   46448           4 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALTransformerInfoShadow, 0 |  0 );
   46449           4 :   if (!SWIG_IsOK(res1)) {
   46450           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDALTransformerInfoShadow_TransformPoints" "', argument " "1"" of type '" "GDALTransformerInfoShadow *""'"); 
   46451             :   }
   46452           4 :   arg1 = reinterpret_cast< GDALTransformerInfoShadow * >(argp1);
   46453           4 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   46454           4 :   if (!SWIG_IsOK(ecode2)) {
   46455           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GDALTransformerInfoShadow_TransformPoints" "', argument " "2"" of type '" "int""'");
   46456             :   } 
   46457           4 :   arg2 = static_cast< int >(val2);
   46458           4 :   {
   46459             :     /*  typemap(in,numinputs=1) (int nCount, double *x, double *y, double *z, int* panSuccess) */
   46460           4 :     if ( !PySequence_Check(swig_obj[2]) ) {
   46461           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   46462           0 :       SWIG_fail;
   46463             :     }
   46464             :     
   46465           4 :     Py_ssize_t size = PySequence_Size(swig_obj[2]);
   46466           4 :     if( size != (int)size ) {
   46467           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   46468           0 :       SWIG_fail;
   46469             :     }
   46470           4 :     arg3 = (int)size;
   46471           4 :     arg4 = (double*) VSIMalloc(arg3*sizeof(double));
   46472           4 :     arg5 = (double*) VSIMalloc(arg3*sizeof(double));
   46473           4 :     arg6 = (double*) VSIMalloc(arg3*sizeof(double));
   46474           4 :     arg7 = (int*) VSIMalloc(arg3*sizeof(int));
   46475             :     
   46476           4 :     if (arg4 == NULL || arg5 == NULL || arg6 == NULL || arg7 == NULL)
   46477             :     {
   46478           0 :       PyErr_SetString( PyExc_RuntimeError, "Out of memory" );
   46479           0 :       SWIG_fail;
   46480             :     }
   46481             :     
   46482           4 :     if (!DecomposeSequenceOfCoordinates(swig_obj[2],arg3,arg4,arg5,arg6)) {
   46483           0 :       SWIG_fail;
   46484             :     }
   46485             :   }
   46486           4 :   {
   46487           4 :     const int bLocalUseExceptions = GetUseExceptions();
   46488           4 :     if ( bLocalUseExceptions ) {
   46489           4 :       pushErrorHandler();
   46490             :     }
   46491           4 :     {
   46492           4 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46493           4 :       result = (int)GDALTransformerInfoShadow_TransformPoints(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   46494           4 :       SWIG_PYTHON_THREAD_END_ALLOW;
   46495             :     }
   46496           4 :     if ( bLocalUseExceptions ) {
   46497           4 :       popErrorHandler();
   46498             :     }
   46499             : #ifndef SED_HACKS
   46500             :     if ( bLocalUseExceptions ) {
   46501             :       CPLErr eclass = CPLGetLastErrorType();
   46502             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   46503             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   46504             :       }
   46505             :     }
   46506             : #endif
   46507             :   }
   46508           4 :   resultobj = SWIG_From_int(static_cast< int >(result));
   46509           4 :   {
   46510             :     /* %typemap(argout)  (int nCount, double *x, double *y, double *z, int* panSuccess) */
   46511           4 :     Py_DECREF(resultobj);
   46512           4 :     PyObject *xyz = PyList_New( arg3 );
   46513           4 :     if( !xyz ) {
   46514           0 :       SWIG_fail;
   46515             :     }
   46516           4 :     PyObject *success = PyList_New( arg3 );
   46517           4 :     if( !success ) {
   46518           0 :       Py_DECREF(xyz);
   46519           0 :       SWIG_fail;
   46520             :     }
   46521          35 :     for( int i=0; i< arg3; i++ ) {
   46522          31 :       PyObject *tuple = PyTuple_New( 3 );
   46523          31 :       PyTuple_SetItem( tuple, 0, PyFloat_FromDouble( (arg4)[i] ) );
   46524          31 :       PyTuple_SetItem( tuple, 1, PyFloat_FromDouble( (arg5)[i] ) );
   46525          31 :       PyTuple_SetItem( tuple, 2, PyFloat_FromDouble( (arg6)[i] ) );
   46526          31 :       PyList_SetItem( xyz, i, tuple );
   46527          31 :       PyList_SetItem( success, i, Py_BuildValue( "i",  (arg7)[i]) );
   46528             :     }
   46529           4 :     resultobj = PyTuple_New( 2 );
   46530           4 :     PyTuple_SetItem( resultobj, 0, xyz );
   46531           4 :     PyTuple_SetItem( resultobj, 1, success );
   46532             :   }
   46533           4 :   {
   46534             :     /* %typemap(freearg)  (int nCount, double *x, double *y, double *z, int* panSuccess) */
   46535           4 :     VSIFree(arg4);
   46536           4 :     VSIFree(arg5);
   46537           4 :     VSIFree(arg6);
   46538           4 :     VSIFree(arg7);
   46539             :   }
   46540           4 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   46541             :   return resultobj;
   46542           0 : fail:
   46543           0 :   {
   46544             :     /* %typemap(freearg)  (int nCount, double *x, double *y, double *z, int* panSuccess) */
   46545           0 :     VSIFree(arg4);
   46546           0 :     VSIFree(arg5);
   46547           0 :     VSIFree(arg6);
   46548           0 :     VSIFree(arg7);
   46549             :   }
   46550             :   return NULL;
   46551             : }
   46552             : 
   46553             : 
   46554           1 : SWIGINTERN PyObject *_wrap_GDALTransformerInfoShadow_TransformGeolocations(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   46555           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46556           1 :   GDALTransformerInfoShadow *arg1 = (GDALTransformerInfoShadow *) 0 ;
   46557           1 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   46558           1 :   GDALRasterBandShadow *arg3 = (GDALRasterBandShadow *) 0 ;
   46559           1 :   GDALRasterBandShadow *arg4 = (GDALRasterBandShadow *) 0 ;
   46560           1 :   GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
   46561           1 :   void *arg6 = (void *) NULL ;
   46562           1 :   char **arg7 = (char **) NULL ;
   46563           1 :   void *argp1 = 0 ;
   46564           1 :   int res1 = 0 ;
   46565           1 :   void *argp2 = 0 ;
   46566           1 :   int res2 = 0 ;
   46567           1 :   void *argp3 = 0 ;
   46568           1 :   int res3 = 0 ;
   46569           1 :   void *argp4 = 0 ;
   46570           1 :   int res4 = 0 ;
   46571           1 :   PyObject * obj0 = 0 ;
   46572           1 :   PyObject * obj1 = 0 ;
   46573           1 :   PyObject * obj2 = 0 ;
   46574           1 :   PyObject * obj3 = 0 ;
   46575           1 :   PyObject * obj4 = 0 ;
   46576           1 :   PyObject * obj5 = 0 ;
   46577           1 :   PyObject * obj6 = 0 ;
   46578           1 :   char * kwnames[] = {
   46579             :     (char *)"self",  (char *)"xBand",  (char *)"yBand",  (char *)"zBand",  (char *)"callback",  (char *)"callback_data",  (char *)"options",  NULL 
   46580             :   };
   46581           1 :   int result;
   46582             :   
   46583             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   46584           1 :   PyProgressData *psProgressInfo;
   46585           1 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   46586           1 :   psProgressInfo->nLastReported = -1;
   46587           1 :   psProgressInfo->psPyCallback = NULL;
   46588           1 :   psProgressInfo->psPyCallbackData = NULL;
   46589           1 :   arg6 = psProgressInfo;
   46590           1 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO|OOO:GDALTransformerInfoShadow_TransformGeolocations", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
   46591           1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALTransformerInfoShadow, 0 |  0 );
   46592           1 :   if (!SWIG_IsOK(res1)) {
   46593           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDALTransformerInfoShadow_TransformGeolocations" "', argument " "1"" of type '" "GDALTransformerInfoShadow *""'"); 
   46594             :   }
   46595           1 :   arg1 = reinterpret_cast< GDALTransformerInfoShadow * >(argp1);
   46596           1 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   46597           1 :   if (!SWIG_IsOK(res2)) {
   46598           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GDALTransformerInfoShadow_TransformGeolocations" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   46599             :   }
   46600           1 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   46601           1 :   res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   46602           1 :   if (!SWIG_IsOK(res3)) {
   46603           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "GDALTransformerInfoShadow_TransformGeolocations" "', argument " "3"" of type '" "GDALRasterBandShadow *""'"); 
   46604             :   }
   46605           1 :   arg3 = reinterpret_cast< GDALRasterBandShadow * >(argp3);
   46606           1 :   res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   46607           1 :   if (!SWIG_IsOK(res4)) {
   46608           0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "GDALTransformerInfoShadow_TransformGeolocations" "', argument " "4"" of type '" "GDALRasterBandShadow *""'"); 
   46609             :   }
   46610           1 :   arg4 = reinterpret_cast< GDALRasterBandShadow * >(argp4);
   46611           1 :   if (obj4) {
   46612           0 :     {
   46613             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   46614             :       /* callback_func typemap */
   46615             :       
   46616             :       /* In some cases 0 is passed instead of None. */
   46617             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   46618           0 :       if ( PyLong_Check(obj4) || PyInt_Check(obj4) )
   46619             :       {
   46620           0 :         if( PyLong_AsLong(obj4) == 0 )
   46621             :         {
   46622           0 :           obj4 = Py_None;
   46623             :         }
   46624             :       }
   46625             :       
   46626           0 :       if (obj4 && obj4 != Py_None ) {
   46627           0 :         void* cbfunction = NULL;
   46628           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj4,
   46629             :             (void**)&cbfunction,
   46630             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   46631             :             SWIG_POINTER_EXCEPTION | 0 ));
   46632             :         
   46633           0 :         if ( cbfunction == GDALTermProgress ) {
   46634             :           arg5 = GDALTermProgress;
   46635             :         } else {
   46636           0 :           if (!PyCallable_Check(obj4)) {
   46637           0 :             PyErr_SetString( PyExc_RuntimeError,
   46638             :               "Object given is not a Python function" );
   46639           0 :             SWIG_fail;
   46640             :           }
   46641           0 :           psProgressInfo->psPyCallback = obj4;
   46642           0 :           arg5 = PyProgressProxy;
   46643             :         }
   46644             :         
   46645             :       }
   46646             :       
   46647             :     }
   46648             :   }
   46649           1 :   if (obj5) {
   46650           0 :     {
   46651             :       /* %typemap(in) ( void* callback_data=NULL)  */
   46652           0 :       psProgressInfo->psPyCallbackData = obj5 ;
   46653             :     }
   46654             :   }
   46655           1 :   if (obj6) {
   46656           0 :     {
   46657             :       /* %typemap(in) char **dict */
   46658           0 :       arg7 = NULL;
   46659           0 :       if ( PySequence_Check( obj6 ) ) {
   46660           0 :         int bErr = FALSE;
   46661           0 :         arg7 = CSLFromPySequence(obj6, &bErr);
   46662           0 :         if ( bErr )
   46663             :         {
   46664           0 :           SWIG_fail;
   46665             :         }
   46666             :       }
   46667           0 :       else if ( PyMapping_Check( obj6 ) ) {
   46668           0 :         int bErr = FALSE;
   46669           0 :         arg7 = CSLFromPyMapping(obj6, &bErr);
   46670           0 :         if ( bErr )
   46671             :         {
   46672           0 :           SWIG_fail;
   46673             :         }
   46674             :       }
   46675             :       else {
   46676           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   46677           0 :         SWIG_fail;
   46678             :       }
   46679             :     }
   46680             :   }
   46681           1 :   {
   46682           1 :     if (!arg2) {
   46683           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   46684             :     }
   46685             :   }
   46686           1 :   {
   46687           1 :     if (!arg3) {
   46688           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   46689             :     }
   46690             :   }
   46691           1 :   {
   46692           1 :     if (!arg4) {
   46693           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   46694             :     }
   46695             :   }
   46696           1 :   {
   46697           1 :     const int bLocalUseExceptions = GetUseExceptions();
   46698           1 :     if ( bLocalUseExceptions ) {
   46699           1 :       pushErrorHandler();
   46700             :     }
   46701           1 :     {
   46702           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46703           1 :       result = (int)GDALTransformerInfoShadow_TransformGeolocations(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   46704           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   46705             :     }
   46706           1 :     if ( bLocalUseExceptions ) {
   46707           1 :       popErrorHandler();
   46708             :     }
   46709             : #ifndef SED_HACKS
   46710             :     if ( bLocalUseExceptions ) {
   46711             :       CPLErr eclass = CPLGetLastErrorType();
   46712             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   46713             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   46714             :       }
   46715             :     }
   46716             : #endif
   46717             :   }
   46718           1 :   resultobj = SWIG_From_int(static_cast< int >(result));
   46719           1 :   {
   46720             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   46721             :     
   46722           1 :     CPLFree(psProgressInfo);
   46723             :     
   46724             :   }
   46725           1 :   {
   46726             :     /* %typemap(freearg) char **dict */
   46727           1 :     CSLDestroy( arg7 );
   46728             :   }
   46729           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   46730             :   return resultobj;
   46731           0 : fail:
   46732           0 :   {
   46733             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   46734             :     
   46735           0 :     CPLFree(psProgressInfo);
   46736             :     
   46737             :   }
   46738           0 :   {
   46739             :     /* %typemap(freearg) char **dict */
   46740           0 :     CSLDestroy( arg7 );
   46741             :   }
   46742             :   return NULL;
   46743             : }
   46744             : 
   46745             : 
   46746         271 : SWIGINTERN PyObject *GDALTransformerInfoShadow_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46747         271 :   PyObject *obj;
   46748         271 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   46749         271 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALTransformerInfoShadow, SWIG_NewClientData(obj));
   46750         271 :   return SWIG_Py_Void();
   46751             : }
   46752             : 
   46753          76 : SWIGINTERN PyObject *_wrap_Transformer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46754          76 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46755          76 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   46756          76 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   46757          76 :   char **arg3 = (char **) 0 ;
   46758          76 :   void *argp1 = 0 ;
   46759          76 :   int res1 = 0 ;
   46760          76 :   void *argp2 = 0 ;
   46761          76 :   int res2 = 0 ;
   46762          76 :   PyObject *swig_obj[3] ;
   46763          76 :   GDALTransformerInfoShadow *result = 0 ;
   46764             :   
   46765          76 :   if (!SWIG_Python_UnpackTuple(args, "Transformer", 3, 3, swig_obj)) SWIG_fail;
   46766          76 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   46767          76 :   if (!SWIG_IsOK(res1)) {
   46768           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Transformer" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   46769             :   }
   46770          76 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   46771          76 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   46772          76 :   if (!SWIG_IsOK(res2)) {
   46773           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Transformer" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   46774             :   }
   46775          76 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   46776          76 :   {
   46777             :     /* %typemap(in) char **dict */
   46778          76 :     arg3 = NULL;
   46779          76 :     if ( PySequence_Check( swig_obj[2] ) ) {
   46780          76 :       int bErr = FALSE;
   46781          76 :       arg3 = CSLFromPySequence(swig_obj[2], &bErr);
   46782          76 :       if ( bErr )
   46783             :       {
   46784           0 :         SWIG_fail;
   46785             :       }
   46786             :     }
   46787           0 :     else if ( PyMapping_Check( swig_obj[2] ) ) {
   46788           0 :       int bErr = FALSE;
   46789           0 :       arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
   46790           0 :       if ( bErr )
   46791             :       {
   46792           0 :         SWIG_fail;
   46793             :       }
   46794             :     }
   46795             :     else {
   46796           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   46797           0 :       SWIG_fail;
   46798             :     }
   46799             :   }
   46800          76 :   {
   46801          76 :     const int bLocalUseExceptions = GetUseExceptions();
   46802          76 :     if ( bLocalUseExceptions ) {
   46803          74 :       pushErrorHandler();
   46804             :     }
   46805          76 :     {
   46806          76 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46807          76 :       result = (GDALTransformerInfoShadow *)Transformer(arg1,arg2,arg3);
   46808          76 :       SWIG_PYTHON_THREAD_END_ALLOW;
   46809             :     }
   46810          76 :     if ( bLocalUseExceptions ) {
   46811          74 :       popErrorHandler();
   46812             :     }
   46813             : #ifndef SED_HACKS
   46814             :     if ( bLocalUseExceptions ) {
   46815             :       CPLErr eclass = CPLGetLastErrorType();
   46816             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   46817             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   46818             :       }
   46819             :     }
   46820             : #endif
   46821             :   }
   46822          76 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALTransformerInfoShadow, SWIG_POINTER_OWN |  0 );
   46823          76 :   {
   46824             :     /* %typemap(freearg) char **dict */
   46825          76 :     CSLDestroy( arg3 );
   46826             :   }
   46827          82 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   46828             :   return resultobj;
   46829           0 : fail:
   46830           0 :   {
   46831             :     /* %typemap(freearg) char **dict */
   46832           0 :     CSLDestroy( arg3 );
   46833             :   }
   46834             :   return NULL;
   46835             : }
   46836             : 
   46837             : 
   46838           2 : SWIGINTERN PyObject *_wrap_SuggestedWarpOutputRes_width_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46839           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46840           2 :   SuggestedWarpOutputRes *arg1 = (SuggestedWarpOutputRes *) 0 ;
   46841           2 :   void *argp1 = 0 ;
   46842           2 :   int res1 = 0 ;
   46843           2 :   PyObject *swig_obj[1] ;
   46844           2 :   int result;
   46845             :   
   46846           2 :   if (!args) SWIG_fail;
   46847           2 :   swig_obj[0] = args;
   46848           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SuggestedWarpOutputRes, 0 |  0 );
   46849           2 :   if (!SWIG_IsOK(res1)) {
   46850           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SuggestedWarpOutputRes_width_get" "', argument " "1"" of type '" "SuggestedWarpOutputRes *""'"); 
   46851             :   }
   46852           2 :   arg1 = reinterpret_cast< SuggestedWarpOutputRes * >(argp1);
   46853           2 :   {
   46854           2 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46855           2 :     result = (int) ((arg1)->width);
   46856           2 :     SWIG_PYTHON_THREAD_END_ALLOW;
   46857             :   }
   46858           2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   46859           2 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   46860             :   return resultobj;
   46861             : fail:
   46862             :   return NULL;
   46863             : }
   46864             : 
   46865             : 
   46866           2 : SWIGINTERN PyObject *_wrap_SuggestedWarpOutputRes_height_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46867           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46868           2 :   SuggestedWarpOutputRes *arg1 = (SuggestedWarpOutputRes *) 0 ;
   46869           2 :   void *argp1 = 0 ;
   46870           2 :   int res1 = 0 ;
   46871           2 :   PyObject *swig_obj[1] ;
   46872           2 :   int result;
   46873             :   
   46874           2 :   if (!args) SWIG_fail;
   46875           2 :   swig_obj[0] = args;
   46876           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SuggestedWarpOutputRes, 0 |  0 );
   46877           2 :   if (!SWIG_IsOK(res1)) {
   46878           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SuggestedWarpOutputRes_height_get" "', argument " "1"" of type '" "SuggestedWarpOutputRes *""'"); 
   46879             :   }
   46880           2 :   arg1 = reinterpret_cast< SuggestedWarpOutputRes * >(argp1);
   46881           2 :   {
   46882           2 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46883           2 :     result = (int) ((arg1)->height);
   46884           2 :     SWIG_PYTHON_THREAD_END_ALLOW;
   46885             :   }
   46886           2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   46887           2 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   46888             :   return resultobj;
   46889             : fail:
   46890             :   return NULL;
   46891             : }
   46892             : 
   46893             : 
   46894           3 : SWIGINTERN PyObject *_wrap_SuggestedWarpOutputRes_xmin_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46895           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46896           3 :   SuggestedWarpOutputRes *arg1 = (SuggestedWarpOutputRes *) 0 ;
   46897           3 :   void *argp1 = 0 ;
   46898           3 :   int res1 = 0 ;
   46899           3 :   PyObject *swig_obj[1] ;
   46900           3 :   double result;
   46901             :   
   46902           3 :   if (!args) SWIG_fail;
   46903           3 :   swig_obj[0] = args;
   46904           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SuggestedWarpOutputRes, 0 |  0 );
   46905           3 :   if (!SWIG_IsOK(res1)) {
   46906           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SuggestedWarpOutputRes_xmin_get" "', argument " "1"" of type '" "SuggestedWarpOutputRes *""'"); 
   46907             :   }
   46908           3 :   arg1 = reinterpret_cast< SuggestedWarpOutputRes * >(argp1);
   46909           3 :   {
   46910           3 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46911           3 :     result = (double) ((arg1)->xmin);
   46912           3 :     SWIG_PYTHON_THREAD_END_ALLOW;
   46913             :   }
   46914           3 :   resultobj = SWIG_From_double(static_cast< double >(result));
   46915           3 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   46916             :   return resultobj;
   46917             : fail:
   46918             :   return NULL;
   46919             : }
   46920             : 
   46921             : 
   46922           3 : SWIGINTERN PyObject *_wrap_SuggestedWarpOutputRes_ymin_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46923           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46924           3 :   SuggestedWarpOutputRes *arg1 = (SuggestedWarpOutputRes *) 0 ;
   46925           3 :   void *argp1 = 0 ;
   46926           3 :   int res1 = 0 ;
   46927           3 :   PyObject *swig_obj[1] ;
   46928           3 :   double result;
   46929             :   
   46930           3 :   if (!args) SWIG_fail;
   46931           3 :   swig_obj[0] = args;
   46932           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SuggestedWarpOutputRes, 0 |  0 );
   46933           3 :   if (!SWIG_IsOK(res1)) {
   46934           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SuggestedWarpOutputRes_ymin_get" "', argument " "1"" of type '" "SuggestedWarpOutputRes *""'"); 
   46935             :   }
   46936           3 :   arg1 = reinterpret_cast< SuggestedWarpOutputRes * >(argp1);
   46937           3 :   {
   46938           3 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46939           3 :     result = (double) ((arg1)->ymin);
   46940           3 :     SWIG_PYTHON_THREAD_END_ALLOW;
   46941             :   }
   46942           3 :   resultobj = SWIG_From_double(static_cast< double >(result));
   46943           3 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   46944             :   return resultobj;
   46945             : fail:
   46946             :   return NULL;
   46947             : }
   46948             : 
   46949             : 
   46950           3 : SWIGINTERN PyObject *_wrap_SuggestedWarpOutputRes_xmax_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46951           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46952           3 :   SuggestedWarpOutputRes *arg1 = (SuggestedWarpOutputRes *) 0 ;
   46953           3 :   void *argp1 = 0 ;
   46954           3 :   int res1 = 0 ;
   46955           3 :   PyObject *swig_obj[1] ;
   46956           3 :   double result;
   46957             :   
   46958           3 :   if (!args) SWIG_fail;
   46959           3 :   swig_obj[0] = args;
   46960           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SuggestedWarpOutputRes, 0 |  0 );
   46961           3 :   if (!SWIG_IsOK(res1)) {
   46962           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SuggestedWarpOutputRes_xmax_get" "', argument " "1"" of type '" "SuggestedWarpOutputRes *""'"); 
   46963             :   }
   46964           3 :   arg1 = reinterpret_cast< SuggestedWarpOutputRes * >(argp1);
   46965           3 :   {
   46966           3 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46967           3 :     result = (double) ((arg1)->xmax);
   46968           3 :     SWIG_PYTHON_THREAD_END_ALLOW;
   46969             :   }
   46970           3 :   resultobj = SWIG_From_double(static_cast< double >(result));
   46971           3 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   46972             :   return resultobj;
   46973             : fail:
   46974             :   return NULL;
   46975             : }
   46976             : 
   46977             : 
   46978           3 : SWIGINTERN PyObject *_wrap_SuggestedWarpOutputRes_ymax_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46979           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46980           3 :   SuggestedWarpOutputRes *arg1 = (SuggestedWarpOutputRes *) 0 ;
   46981           3 :   void *argp1 = 0 ;
   46982           3 :   int res1 = 0 ;
   46983           3 :   PyObject *swig_obj[1] ;
   46984           3 :   double result;
   46985             :   
   46986           3 :   if (!args) SWIG_fail;
   46987           3 :   swig_obj[0] = args;
   46988           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SuggestedWarpOutputRes, 0 |  0 );
   46989           3 :   if (!SWIG_IsOK(res1)) {
   46990           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SuggestedWarpOutputRes_ymax_get" "', argument " "1"" of type '" "SuggestedWarpOutputRes *""'"); 
   46991             :   }
   46992           3 :   arg1 = reinterpret_cast< SuggestedWarpOutputRes * >(argp1);
   46993           3 :   {
   46994           3 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46995           3 :     result = (double) ((arg1)->ymax);
   46996           3 :     SWIG_PYTHON_THREAD_END_ALLOW;
   46997             :   }
   46998           3 :   resultobj = SWIG_From_double(static_cast< double >(result));
   46999           3 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   47000             :   return resultobj;
   47001             : fail:
   47002             :   return NULL;
   47003             : }
   47004             : 
   47005             : 
   47006           3 : SWIGINTERN PyObject *_wrap_delete_SuggestedWarpOutputRes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   47007           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   47008           3 :   SuggestedWarpOutputRes *arg1 = (SuggestedWarpOutputRes *) 0 ;
   47009           3 :   void *argp1 = 0 ;
   47010           3 :   int res1 = 0 ;
   47011           3 :   PyObject *swig_obj[1] ;
   47012             :   
   47013           3 :   if (!args) SWIG_fail;
   47014           3 :   swig_obj[0] = args;
   47015           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SuggestedWarpOutputRes, SWIG_POINTER_DISOWN |  0 );
   47016           3 :   if (!SWIG_IsOK(res1)) {
   47017           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SuggestedWarpOutputRes" "', argument " "1"" of type '" "SuggestedWarpOutputRes *""'"); 
   47018             :   }
   47019           3 :   arg1 = reinterpret_cast< SuggestedWarpOutputRes * >(argp1);
   47020           3 :   {
   47021           3 :     const int bLocalUseExceptions = GetUseExceptions();
   47022           3 :     if ( bLocalUseExceptions ) {
   47023           3 :       pushErrorHandler();
   47024             :     }
   47025           3 :     {
   47026           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   47027           3 :       delete_SuggestedWarpOutputRes(arg1);
   47028           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   47029             :     }
   47030           3 :     if ( bLocalUseExceptions ) {
   47031           3 :       popErrorHandler();
   47032             :     }
   47033             : #ifndef SED_HACKS
   47034             :     if ( bLocalUseExceptions ) {
   47035             :       CPLErr eclass = CPLGetLastErrorType();
   47036             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   47037             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   47038             :       }
   47039             :     }
   47040             : #endif
   47041             :   }
   47042           3 :   resultobj = SWIG_Py_Void();
   47043           3 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   47044             :   return resultobj;
   47045             : fail:
   47046             :   return NULL;
   47047             : }
   47048             : 
   47049             : 
   47050           2 : SWIGINTERN PyObject *_wrap_SuggestedWarpOutputRes_GetGeotransform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   47051           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   47052           2 :   SuggestedWarpOutputRes *arg1 = (SuggestedWarpOutputRes *) 0 ;
   47053           2 :   double *arg2 ;
   47054           2 :   void *argp1 = 0 ;
   47055           2 :   int res1 = 0 ;
   47056           2 :   double argout2[6] ;
   47057           2 :   PyObject *swig_obj[1] ;
   47058             :   
   47059           2 :   {
   47060             :     /* %typemap(in,numinputs=0) (double argout2[ANY]) */
   47061           2 :     memset(argout2, 0, sizeof(argout2));
   47062           2 :     arg2 = argout2;
   47063             :   }
   47064           2 :   if (!args) SWIG_fail;
   47065           2 :   swig_obj[0] = args;
   47066           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SuggestedWarpOutputRes, 0 |  0 );
   47067           2 :   if (!SWIG_IsOK(res1)) {
   47068           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SuggestedWarpOutputRes_GetGeotransform" "', argument " "1"" of type '" "SuggestedWarpOutputRes *""'"); 
   47069             :   }
   47070           2 :   arg1 = reinterpret_cast< SuggestedWarpOutputRes * >(argp1);
   47071           2 :   {
   47072           2 :     const int bLocalUseExceptions = GetUseExceptions();
   47073           2 :     if ( bLocalUseExceptions ) {
   47074           2 :       pushErrorHandler();
   47075             :     }
   47076           2 :     {
   47077           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   47078           2 :       SuggestedWarpOutputRes_GetGeotransform(arg1,arg2);
   47079           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   47080             :     }
   47081           2 :     if ( bLocalUseExceptions ) {
   47082           2 :       popErrorHandler();
   47083             :     }
   47084             : #ifndef SED_HACKS
   47085             :     if ( bLocalUseExceptions ) {
   47086             :       CPLErr eclass = CPLGetLastErrorType();
   47087             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   47088             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   47089             :       }
   47090             :     }
   47091             : #endif
   47092             :   }
   47093           2 :   resultobj = SWIG_Py_Void();
   47094           2 :   {
   47095             :     /* %typemap(argout) (double argout[ANY]) */
   47096           2 :     PyObject *out = CreateTupleFromDoubleArray( arg2, 6 );
   47097           2 :     resultobj = t_output_helper(resultobj,out);
   47098             :   }
   47099           2 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   47100             :   return resultobj;
   47101             : fail:
   47102             :   return NULL;
   47103             : }
   47104             : 
   47105             : 
   47106         271 : SWIGINTERN PyObject *SuggestedWarpOutputRes_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   47107         271 :   PyObject *obj;
   47108         271 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   47109         271 :   SWIG_TypeNewClientData(SWIGTYPE_p_SuggestedWarpOutputRes, SWIG_NewClientData(obj));
   47110         271 :   return SWIG_Py_Void();
   47111             : }
   47112             : 
   47113           1 : SWIGINTERN PyObject *_wrap_SuggestedWarpOutputFromTransformer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   47114           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   47115           1 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   47116           1 :   GDALTransformerInfoShadow *arg2 = (GDALTransformerInfoShadow *) 0 ;
   47117           1 :   void *argp1 = 0 ;
   47118           1 :   int res1 = 0 ;
   47119           1 :   void *argp2 = 0 ;
   47120           1 :   int res2 = 0 ;
   47121           1 :   PyObject *swig_obj[2] ;
   47122           1 :   SuggestedWarpOutputRes *result = 0 ;
   47123             :   
   47124           1 :   if (!SWIG_Python_UnpackTuple(args, "SuggestedWarpOutputFromTransformer", 2, 2, swig_obj)) SWIG_fail;
   47125           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   47126           1 :   if (!SWIG_IsOK(res1)) {
   47127           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SuggestedWarpOutputFromTransformer" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   47128             :   }
   47129           1 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   47130           1 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALTransformerInfoShadow, 0 |  0 );
   47131           1 :   if (!SWIG_IsOK(res2)) {
   47132           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SuggestedWarpOutputFromTransformer" "', argument " "2"" of type '" "GDALTransformerInfoShadow *""'"); 
   47133             :   }
   47134           1 :   arg2 = reinterpret_cast< GDALTransformerInfoShadow * >(argp2);
   47135           1 :   {
   47136           1 :     const int bLocalUseExceptions = GetUseExceptions();
   47137           1 :     if ( bLocalUseExceptions ) {
   47138           1 :       pushErrorHandler();
   47139             :     }
   47140           1 :     {
   47141           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   47142           1 :       result = (SuggestedWarpOutputRes *)SuggestedWarpOutputFromTransformer(arg1,arg2);
   47143           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   47144             :     }
   47145           1 :     if ( bLocalUseExceptions ) {
   47146           1 :       popErrorHandler();
   47147             :     }
   47148             : #ifndef SED_HACKS
   47149             :     if ( bLocalUseExceptions ) {
   47150             :       CPLErr eclass = CPLGetLastErrorType();
   47151             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   47152             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   47153             :       }
   47154             :     }
   47155             : #endif
   47156             :   }
   47157           1 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SuggestedWarpOutputRes, SWIG_POINTER_OWN |  0 );
   47158           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   47159             :   return resultobj;
   47160             : fail:
   47161             :   return NULL;
   47162             : }
   47163             : 
   47164             : 
   47165           2 : SWIGINTERN PyObject *_wrap_SuggestedWarpOutputFromOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   47166           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   47167           2 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   47168           2 :   char **arg2 = (char **) 0 ;
   47169           2 :   void *argp1 = 0 ;
   47170           2 :   int res1 = 0 ;
   47171           2 :   PyObject *swig_obj[2] ;
   47172           2 :   SuggestedWarpOutputRes *result = 0 ;
   47173             :   
   47174           2 :   if (!SWIG_Python_UnpackTuple(args, "SuggestedWarpOutputFromOptions", 2, 2, swig_obj)) SWIG_fail;
   47175           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   47176           2 :   if (!SWIG_IsOK(res1)) {
   47177           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SuggestedWarpOutputFromOptions" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   47178             :   }
   47179           2 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   47180           2 :   {
   47181             :     /* %typemap(in) char **dict */
   47182           2 :     arg2 = NULL;
   47183           2 :     if ( PySequence_Check( swig_obj[1] ) ) {
   47184           2 :       int bErr = FALSE;
   47185           2 :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   47186           2 :       if ( bErr )
   47187             :       {
   47188           0 :         SWIG_fail;
   47189             :       }
   47190             :     }
   47191           0 :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   47192           0 :       int bErr = FALSE;
   47193           0 :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   47194           0 :       if ( bErr )
   47195             :       {
   47196           0 :         SWIG_fail;
   47197             :       }
   47198             :     }
   47199             :     else {
   47200           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   47201           0 :       SWIG_fail;
   47202             :     }
   47203             :   }
   47204           2 :   {
   47205           2 :     const int bLocalUseExceptions = GetUseExceptions();
   47206           2 :     if ( bLocalUseExceptions ) {
   47207           2 :       pushErrorHandler();
   47208             :     }
   47209           2 :     {
   47210           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   47211           2 :       result = (SuggestedWarpOutputRes *)SuggestedWarpOutputFromOptions(arg1,arg2);
   47212           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   47213             :     }
   47214           2 :     if ( bLocalUseExceptions ) {
   47215           2 :       popErrorHandler();
   47216             :     }
   47217             : #ifndef SED_HACKS
   47218             :     if ( bLocalUseExceptions ) {
   47219             :       CPLErr eclass = CPLGetLastErrorType();
   47220             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   47221             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   47222             :       }
   47223             :     }
   47224             : #endif
   47225             :   }
   47226           2 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SuggestedWarpOutputRes, SWIG_POINTER_OWN |  0 );
   47227           2 :   {
   47228             :     /* %typemap(freearg) char **dict */
   47229           2 :     CSLDestroy( arg2 );
   47230             :   }
   47231           2 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   47232             :   return resultobj;
   47233           0 : fail:
   47234           0 :   {
   47235             :     /* %typemap(freearg) char **dict */
   47236           0 :     CSLDestroy( arg2 );
   47237             :   }
   47238             :   return NULL;
   47239             : }
   47240             : 
   47241             : 
   47242          23 : SWIGINTERN PyObject *_wrap__ApplyVerticalShiftGrid(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   47243          23 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   47244          23 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   47245          23 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   47246          23 :   bool arg3 = (bool) false ;
   47247          23 :   double arg4 = (double) 1.0 ;
   47248          23 :   double arg5 = (double) 1.0 ;
   47249          23 :   char **arg6 = (char **) NULL ;
   47250          23 :   void *argp1 = 0 ;
   47251          23 :   int res1 = 0 ;
   47252          23 :   void *argp2 = 0 ;
   47253          23 :   int res2 = 0 ;
   47254          23 :   bool val3 ;
   47255          23 :   int ecode3 = 0 ;
   47256          23 :   double val4 ;
   47257          23 :   int ecode4 = 0 ;
   47258          23 :   double val5 ;
   47259          23 :   int ecode5 = 0 ;
   47260          23 :   PyObject * obj0 = 0 ;
   47261          23 :   PyObject * obj1 = 0 ;
   47262          23 :   PyObject * obj2 = 0 ;
   47263          23 :   PyObject * obj3 = 0 ;
   47264          23 :   PyObject * obj4 = 0 ;
   47265          23 :   PyObject * obj5 = 0 ;
   47266          23 :   char * kwnames[] = {
   47267             :     (char *)"src_ds",  (char *)"grid_ds",  (char *)"inverse",  (char *)"srcUnitToMeter",  (char *)"dstUnitToMeter",  (char *)"options",  NULL 
   47268             :   };
   47269          23 :   GDALDatasetShadow *result = 0 ;
   47270             :   
   47271          23 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OOOO:_ApplyVerticalShiftGrid", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
   47272          23 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   47273          23 :   if (!SWIG_IsOK(res1)) {
   47274           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_ApplyVerticalShiftGrid" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   47275             :   }
   47276          23 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   47277          23 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   47278          23 :   if (!SWIG_IsOK(res2)) {
   47279           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "_ApplyVerticalShiftGrid" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   47280             :   }
   47281          23 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   47282          23 :   if (obj2) {
   47283           1 :     ecode3 = SWIG_AsVal_bool(obj2, &val3);
   47284           1 :     if (!SWIG_IsOK(ecode3)) {
   47285           0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "_ApplyVerticalShiftGrid" "', argument " "3"" of type '" "bool""'");
   47286             :     } 
   47287             :     arg3 = static_cast< bool >(val3);
   47288             :   }
   47289          23 :   if (obj3) {
   47290           1 :     ecode4 = SWIG_AsVal_double(obj3, &val4);
   47291           1 :     if (!SWIG_IsOK(ecode4)) {
   47292           0 :       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "_ApplyVerticalShiftGrid" "', argument " "4"" of type '" "double""'");
   47293             :     } 
   47294           1 :     arg4 = static_cast< double >(val4);
   47295             :   }
   47296          23 :   if (obj4) {
   47297           1 :     ecode5 = SWIG_AsVal_double(obj4, &val5);
   47298           1 :     if (!SWIG_IsOK(ecode5)) {
   47299           0 :       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "_ApplyVerticalShiftGrid" "', argument " "5"" of type '" "double""'");
   47300             :     } 
   47301           1 :     arg5 = static_cast< double >(val5);
   47302             :   }
   47303          23 :   if (obj5) {
   47304           9 :     {
   47305             :       /* %typemap(in) char **dict */
   47306           9 :       arg6 = NULL;
   47307           9 :       if ( PySequence_Check( obj5 ) ) {
   47308           9 :         int bErr = FALSE;
   47309           9 :         arg6 = CSLFromPySequence(obj5, &bErr);
   47310           9 :         if ( bErr )
   47311             :         {
   47312           0 :           SWIG_fail;
   47313             :         }
   47314             :       }
   47315           0 :       else if ( PyMapping_Check( obj5 ) ) {
   47316           0 :         int bErr = FALSE;
   47317           0 :         arg6 = CSLFromPyMapping(obj5, &bErr);
   47318           0 :         if ( bErr )
   47319             :         {
   47320           0 :           SWIG_fail;
   47321             :         }
   47322             :       }
   47323             :       else {
   47324           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   47325           0 :         SWIG_fail;
   47326             :       }
   47327             :     }
   47328             :   }
   47329          23 :   {
   47330          23 :     if (!arg1) {
   47331           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   47332             :     }
   47333             :   }
   47334          23 :   {
   47335          23 :     if (!arg2) {
   47336           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   47337             :     }
   47338             :   }
   47339          23 :   {
   47340          23 :     const int bLocalUseExceptions = GetUseExceptions();
   47341          23 :     if ( bLocalUseExceptions ) {
   47342          12 :       pushErrorHandler();
   47343             :     }
   47344          23 :     {
   47345          23 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   47346          23 :       result = (GDALDatasetShadow *)ApplyVerticalShiftGrid(arg1,arg2,arg3,arg4,arg5,arg6);
   47347          23 :       SWIG_PYTHON_THREAD_END_ALLOW;
   47348             :     }
   47349          23 :     if ( bLocalUseExceptions ) {
   47350          12 :       popErrorHandler();
   47351             :     }
   47352             : #ifndef SED_HACKS
   47353             :     if ( bLocalUseExceptions ) {
   47354             :       CPLErr eclass = CPLGetLastErrorType();
   47355             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   47356             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   47357             :       }
   47358             :     }
   47359             : #endif
   47360             :   }
   47361          23 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   47362          23 :   {
   47363             :     /* %typemap(freearg) char **dict */
   47364          23 :     CSLDestroy( arg6 );
   47365             :   }
   47366          23 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   47367             :   return resultobj;
   47368           0 : fail:
   47369           0 :   {
   47370             :     /* %typemap(freearg) char **dict */
   47371           0 :     CSLDestroy( arg6 );
   47372             :   }
   47373             :   return NULL;
   47374             : }
   47375             : 
   47376             : 
   47377           1 : SWIGINTERN PyObject *_wrap_ApplyGeoTransform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   47378           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   47379           1 :   double *arg1 ;
   47380           1 :   double arg2 ;
   47381           1 :   double arg3 ;
   47382           1 :   double *arg4 = (double *) 0 ;
   47383           1 :   double *arg5 = (double *) 0 ;
   47384           1 :   double argin1[6] ;
   47385           1 :   double val2 ;
   47386           1 :   int ecode2 = 0 ;
   47387           1 :   double val3 ;
   47388           1 :   int ecode3 = 0 ;
   47389           1 :   double temp4 ;
   47390           1 :   int res4 = SWIG_TMPOBJ ;
   47391           1 :   double temp5 ;
   47392           1 :   int res5 = SWIG_TMPOBJ ;
   47393           1 :   PyObject *swig_obj[3] ;
   47394             :   
   47395           1 :   arg4 = &temp4;
   47396           1 :   arg5 = &temp5;
   47397           1 :   if (!SWIG_Python_UnpackTuple(args, "ApplyGeoTransform", 3, 3, swig_obj)) SWIG_fail;
   47398           1 :   {
   47399             :     /* %typemap(in) (double argin1[ANY]) */
   47400           1 :     arg1 = argin1;
   47401           1 :     if (! PySequence_Check(swig_obj[0]) ) {
   47402           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   47403           0 :       SWIG_fail;
   47404             :     }
   47405           1 :     Py_ssize_t seq_size = PySequence_Size(swig_obj[0]);
   47406           1 :     if ( seq_size != 6 ) {
   47407           0 :       PyErr_SetString(PyExc_TypeError, "sequence must have length ##size");
   47408           0 :       SWIG_fail;
   47409             :     }
   47410           7 :     for (unsigned int i=0; i<6; i++) {
   47411           6 :       PyObject *o = PySequence_GetItem(swig_obj[0],i);
   47412           6 :       double val;
   47413           6 :       if ( !PyArg_Parse(o, "d", &val ) ) {
   47414           0 :         PyErr_SetString(PyExc_TypeError, "not a number");
   47415           0 :         Py_DECREF(o);
   47416           0 :         SWIG_fail;
   47417             :       }
   47418           6 :       arg1[i] =  val;
   47419           6 :       Py_DECREF(o);
   47420             :     }
   47421             :   }
   47422           1 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   47423           1 :   if (!SWIG_IsOK(ecode2)) {
   47424           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ApplyGeoTransform" "', argument " "2"" of type '" "double""'");
   47425             :   } 
   47426           1 :   arg2 = static_cast< double >(val2);
   47427           1 :   ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
   47428           1 :   if (!SWIG_IsOK(ecode3)) {
   47429           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ApplyGeoTransform" "', argument " "3"" of type '" "double""'");
   47430             :   } 
   47431           1 :   arg3 = static_cast< double >(val3);
   47432           1 :   {
   47433           1 :     const int bLocalUseExceptions = GetUseExceptions();
   47434           1 :     if ( bLocalUseExceptions ) {
   47435           0 :       pushErrorHandler();
   47436             :     }
   47437           1 :     {
   47438           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   47439           1 :       GDALApplyGeoTransform(arg1,arg2,arg3,arg4,arg5);
   47440           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   47441             :     }
   47442           1 :     if ( bLocalUseExceptions ) {
   47443           0 :       popErrorHandler();
   47444             :     }
   47445             : #ifndef SED_HACKS
   47446             :     if ( bLocalUseExceptions ) {
   47447             :       CPLErr eclass = CPLGetLastErrorType();
   47448             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   47449             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   47450             :       }
   47451             :     }
   47452             : #endif
   47453             :   }
   47454           1 :   resultobj = SWIG_Py_Void();
   47455           1 :   if (ReturnSame(SWIG_IsTmpObj(res4))) {
   47456           1 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
   47457             :   } else {
   47458           0 :     int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   47459           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
   47460             :   }
   47461           1 :   if (ReturnSame(SWIG_IsTmpObj(res5))) {
   47462           1 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)));
   47463             :   } else {
   47464           0 :     int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   47465           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags));
   47466             :   }
   47467           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   47468             :   return resultobj;
   47469             : fail:
   47470             :   return NULL;
   47471             : }
   47472             : 
   47473             : 
   47474          17 : SWIGINTERN PyObject *_wrap_InvGeoTransform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   47475          17 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   47476          17 :   double *arg1 ;
   47477          17 :   double *arg2 ;
   47478          17 :   double argin1[6] ;
   47479          17 :   double argout2[6] ;
   47480          17 :   PyObject *swig_obj[1] ;
   47481          17 :   RETURN_NONE result;
   47482             :   
   47483          17 :   {
   47484             :     /* %typemap(in,numinputs=0) (double argout2[ANY]) */
   47485          17 :     memset(argout2, 0, sizeof(argout2));
   47486          17 :     arg2 = argout2;
   47487             :   }
   47488          17 :   if (!args) SWIG_fail;
   47489          17 :   swig_obj[0] = args;
   47490          17 :   {
   47491             :     /* %typemap(in) (double argin1[ANY]) */
   47492          17 :     arg1 = argin1;
   47493          17 :     if (! PySequence_Check(swig_obj[0]) ) {
   47494           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   47495           0 :       SWIG_fail;
   47496             :     }
   47497          17 :     Py_ssize_t seq_size = PySequence_Size(swig_obj[0]);
   47498          17 :     if ( seq_size != 6 ) {
   47499           0 :       PyErr_SetString(PyExc_TypeError, "sequence must have length ##size");
   47500           0 :       SWIG_fail;
   47501             :     }
   47502         119 :     for (unsigned int i=0; i<6; i++) {
   47503         102 :       PyObject *o = PySequence_GetItem(swig_obj[0],i);
   47504         102 :       double val;
   47505         102 :       if ( !PyArg_Parse(o, "d", &val ) ) {
   47506           0 :         PyErr_SetString(PyExc_TypeError, "not a number");
   47507           0 :         Py_DECREF(o);
   47508           0 :         SWIG_fail;
   47509             :       }
   47510         102 :       arg1[i] =  val;
   47511         102 :       Py_DECREF(o);
   47512             :     }
   47513             :   }
   47514          17 :   {
   47515          17 :     const int bLocalUseExceptions = GetUseExceptions();
   47516          17 :     if ( bLocalUseExceptions ) {
   47517           9 :       pushErrorHandler();
   47518             :     }
   47519          17 :     {
   47520          17 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   47521          17 :       result = (RETURN_NONE)GDALInvGeoTransform(arg1,arg2);
   47522          17 :       SWIG_PYTHON_THREAD_END_ALLOW;
   47523             :     }
   47524          17 :     if ( bLocalUseExceptions ) {
   47525           9 :       popErrorHandler();
   47526             :     }
   47527             : #ifndef SED_HACKS
   47528             :     if ( bLocalUseExceptions ) {
   47529             :       CPLErr eclass = CPLGetLastErrorType();
   47530             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   47531             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   47532             :       }
   47533             :     }
   47534             : #endif
   47535             :   }
   47536             :   /*%typemap(out) IF_FALSE_RETURN_NONE */
   47537          17 :   {
   47538             :     /* %typemap(argout) (double argout[ANY]) */
   47539          17 :     PyObject *out = CreateTupleFromDoubleArray( arg2, 6 );
   47540          17 :     resultobj = t_output_helper(resultobj,out);
   47541             :   }
   47542          17 :   {
   47543             :     /* %typemap(ret) IF_FALSE_RETURN_NONE */
   47544          17 :     if (result == 0 ) {
   47545           3 :       Py_XDECREF( resultobj );
   47546           3 :       resultobj = Py_None;
   47547           3 :       Py_INCREF(resultobj);
   47548             :     }
   47549          17 :     if (resultobj == 0) {
   47550           0 :       resultobj = Py_None;
   47551           0 :       Py_INCREF(resultobj);
   47552             :     }
   47553             :   }
   47554          17 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   47555             :   return resultobj;
   47556             : fail:
   47557             :   return NULL;
   47558             : }
   47559             : 
   47560             : 
   47561        3468 : SWIGINTERN PyObject *_wrap_VersionInfo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   47562        3468 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   47563        3468 :   char *arg1 = (char *) "VERSION_NUM" ;
   47564        3468 :   int res1 ;
   47565        3468 :   char *buf1 = 0 ;
   47566        3468 :   int alloc1 = 0 ;
   47567        3468 :   PyObject *swig_obj[1] ;
   47568        3468 :   char *result = 0 ;
   47569             :   
   47570        3468 :   if (!SWIG_Python_UnpackTuple(args, "VersionInfo", 0, 1, swig_obj)) SWIG_fail;
   47571        3468 :   if (swig_obj[0]) {
   47572        3468 :     res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   47573        3468 :     if (!SWIG_IsOK(res1)) {
   47574           0 :       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VersionInfo" "', argument " "1"" of type '" "char const *""'");
   47575             :     }
   47576        3468 :     arg1 = reinterpret_cast< char * >(buf1);
   47577             :   }
   47578        3468 :   {
   47579        3468 :     const int bLocalUseExceptions = GetUseExceptions();
   47580        3468 :     if ( bLocalUseExceptions ) {
   47581        2861 :       pushErrorHandler();
   47582             :     }
   47583        3468 :     {
   47584        3468 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   47585        3468 :       result = (char *)GDALVersionInfo((char const *)arg1);
   47586        3468 :       SWIG_PYTHON_THREAD_END_ALLOW;
   47587             :     }
   47588        3468 :     if ( bLocalUseExceptions ) {
   47589        2861 :       popErrorHandler();
   47590             :     }
   47591             : #ifndef SED_HACKS
   47592             :     if ( bLocalUseExceptions ) {
   47593             :       CPLErr eclass = CPLGetLastErrorType();
   47594             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   47595             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   47596             :       }
   47597             :     }
   47598             : #endif
   47599             :   }
   47600        3468 :   resultobj = SWIG_FromCharPtr((const char *)result);
   47601        3468 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   47602        3468 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   47603             :   return resultobj;
   47604           0 : fail:
   47605           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   47606             :   return NULL;
   47607             : }
   47608             : 
   47609             : 
   47610         283 : SWIGINTERN PyObject *_wrap_AllRegister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   47611         283 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   47612             :   
   47613         283 :   if (!SWIG_Python_UnpackTuple(args, "AllRegister", 0, 0, 0)) SWIG_fail;
   47614         283 :   {
   47615         283 :     const int bLocalUseExceptions = GetUseExceptions();
   47616         283 :     if ( bLocalUseExceptions ) {
   47617         232 :       pushErrorHandler();
   47618             :     }
   47619         283 :     {
   47620         283 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   47621         283 :       GDALAllRegister();
   47622         283 :       SWIG_PYTHON_THREAD_END_ALLOW;
   47623             :     }
   47624         283 :     if ( bLocalUseExceptions ) {
   47625         232 :       popErrorHandler();
   47626             :     }
   47627             : #ifndef SED_HACKS
   47628             :     if ( bLocalUseExceptions ) {
   47629             :       CPLErr eclass = CPLGetLastErrorType();
   47630             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   47631             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   47632             :       }
   47633             :     }
   47634             : #endif
   47635             :   }
   47636         283 :   resultobj = SWIG_Py_Void();
   47637         283 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   47638             :   return resultobj;
   47639           0 : fail:
   47640           0 :   return NULL;
   47641             : }
   47642             : 
   47643             : 
   47644           0 : SWIGINTERN PyObject *_wrap_GDALDestroyDriverManager(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   47645           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   47646             :   
   47647           0 :   if (!SWIG_Python_UnpackTuple(args, "GDALDestroyDriverManager", 0, 0, 0)) SWIG_fail;
   47648           0 :   {
   47649           0 :     const int bLocalUseExceptions = GetUseExceptions();
   47650           0 :     if ( bLocalUseExceptions ) {
   47651           0 :       pushErrorHandler();
   47652             :     }
   47653           0 :     {
   47654           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   47655           0 :       GDALDestroyDriverManager();
   47656           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   47657             :     }
   47658           0 :     if ( bLocalUseExceptions ) {
   47659           0 :       popErrorHandler();
   47660             :     }
   47661             : #ifndef SED_HACKS
   47662             :     if ( bLocalUseExceptions ) {
   47663             :       CPLErr eclass = CPLGetLastErrorType();
   47664             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   47665             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   47666             :       }
   47667             :     }
   47668             : #endif
   47669             :   }
   47670           0 :   resultobj = SWIG_Py_Void();
   47671           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   47672             :   return resultobj;
   47673           0 : fail:
   47674           0 :   return NULL;
   47675             : }
   47676             : 
   47677             : 
   47678          56 : SWIGINTERN PyObject *_wrap_GetCacheMax(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   47679          56 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   47680          56 :   GIntBig result;
   47681             :   
   47682          56 :   if (!SWIG_Python_UnpackTuple(args, "GetCacheMax", 0, 0, 0)) SWIG_fail;
   47683          56 :   {
   47684          56 :     const int bLocalUseExceptions = GetUseExceptions();
   47685          56 :     if ( bLocalUseExceptions ) {
   47686          26 :       pushErrorHandler();
   47687             :     }
   47688          56 :     {
   47689          56 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   47690          56 :       result = wrapper_GDALGetCacheMax();
   47691          56 :       SWIG_PYTHON_THREAD_END_ALLOW;
   47692             :     }
   47693          56 :     if ( bLocalUseExceptions ) {
   47694          26 :       popErrorHandler();
   47695             :     }
   47696             : #ifndef SED_HACKS
   47697             :     if ( bLocalUseExceptions ) {
   47698             :       CPLErr eclass = CPLGetLastErrorType();
   47699             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   47700             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   47701             :       }
   47702             :     }
   47703             : #endif
   47704             :   }
   47705          56 :   {
   47706          56 :     resultobj = PyLong_FromLongLong(result);
   47707             :   }
   47708          56 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   47709             :   return resultobj;
   47710           0 : fail:
   47711           0 :   return NULL;
   47712             : }
   47713             : 
   47714             : 
   47715           2 : SWIGINTERN PyObject *_wrap_GetCacheUsed(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   47716           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   47717           2 :   GIntBig result;
   47718             :   
   47719           2 :   if (!SWIG_Python_UnpackTuple(args, "GetCacheUsed", 0, 0, 0)) SWIG_fail;
   47720           2 :   {
   47721           2 :     const int bLocalUseExceptions = GetUseExceptions();
   47722           2 :     if ( bLocalUseExceptions ) {
   47723           0 :       pushErrorHandler();
   47724             :     }
   47725           2 :     {
   47726           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   47727           2 :       result = wrapper_GDALGetCacheUsed();
   47728           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   47729             :     }
   47730           2 :     if ( bLocalUseExceptions ) {
   47731           0 :       popErrorHandler();
   47732             :     }
   47733             : #ifndef SED_HACKS
   47734             :     if ( bLocalUseExceptions ) {
   47735             :       CPLErr eclass = CPLGetLastErrorType();
   47736             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   47737             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   47738             :       }
   47739             :     }
   47740             : #endif
   47741             :   }
   47742           2 :   {
   47743           2 :     resultobj = PyLong_FromLongLong(result);
   47744             :   }
   47745           2 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   47746             :   return resultobj;
   47747           0 : fail:
   47748           0 :   return NULL;
   47749             : }
   47750             : 
   47751             : 
   47752          76 : SWIGINTERN PyObject *_wrap_SetCacheMax(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   47753          76 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   47754          76 :   GIntBig arg1 ;
   47755          76 :   PyObject *swig_obj[1] ;
   47756             :   
   47757          76 :   if (!args) SWIG_fail;
   47758          76 :   swig_obj[0] = args;
   47759          76 :   {
   47760          76 :     arg1 = (GIntBig)PyLong_AsLongLong(swig_obj[0]);
   47761             :   }
   47762          76 :   {
   47763          76 :     const int bLocalUseExceptions = GetUseExceptions();
   47764          76 :     if ( bLocalUseExceptions ) {
   47765          20 :       pushErrorHandler();
   47766             :     }
   47767          76 :     {
   47768          76 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   47769          76 :       wrapper_GDALSetCacheMax(arg1);
   47770          76 :       SWIG_PYTHON_THREAD_END_ALLOW;
   47771             :     }
   47772          76 :     if ( bLocalUseExceptions ) {
   47773          20 :       popErrorHandler();
   47774             :     }
   47775             : #ifndef SED_HACKS
   47776             :     if ( bLocalUseExceptions ) {
   47777             :       CPLErr eclass = CPLGetLastErrorType();
   47778             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   47779             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   47780             :       }
   47781             :     }
   47782             : #endif
   47783             :   }
   47784          76 :   resultobj = SWIG_Py_Void();
   47785          76 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   47786             :   return resultobj;
   47787           0 : fail:
   47788           0 :   return NULL;
   47789             : }
   47790             : 
   47791             : 
   47792          44 : SWIGINTERN PyObject *_wrap_GetDataTypeSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   47793          44 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   47794          44 :   GDALDataType arg1 ;
   47795          44 :   PyObject *swig_obj[1] ;
   47796          44 :   int result;
   47797             :   
   47798          44 :   if (!args) SWIG_fail;
   47799          44 :   swig_obj[0] = args;
   47800          44 :   {
   47801             :     // %typemap(in) GDALDataType
   47802          44 :     int val = 0;
   47803          44 :     int ecode = SWIG_AsVal_int(swig_obj[0], &val);
   47804          44 :     if (!SWIG_IsOK(ecode)) {
   47805           0 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   47806             :     }
   47807          44 :     if( val < GDT_Unknown || val >= GDT_TypeCount )
   47808             :     {
   47809           0 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   47810             :     }
   47811          44 :     arg1 = static_cast<GDALDataType>(val);
   47812             :   }
   47813          44 :   {
   47814          44 :     const int bLocalUseExceptions = GetUseExceptions();
   47815          44 :     if ( bLocalUseExceptions ) {
   47816          22 :       pushErrorHandler();
   47817             :     }
   47818          44 :     {
   47819          44 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   47820          44 :       result = (int)GDALGetDataTypeSize(arg1);
   47821          44 :       SWIG_PYTHON_THREAD_END_ALLOW;
   47822             :     }
   47823          44 :     if ( bLocalUseExceptions ) {
   47824          22 :       popErrorHandler();
   47825             :     }
   47826             : #ifndef SED_HACKS
   47827             :     if ( bLocalUseExceptions ) {
   47828             :       CPLErr eclass = CPLGetLastErrorType();
   47829             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   47830             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   47831             :       }
   47832             :     }
   47833             : #endif
   47834             :   }
   47835          44 :   resultobj = SWIG_From_int(static_cast< int >(result));
   47836          44 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   47837             :   return resultobj;
   47838             : fail:
   47839             :   return NULL;
   47840             : }
   47841             : 
   47842             : 
   47843          58 : SWIGINTERN PyObject *_wrap_DataTypeIsComplex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   47844          58 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   47845          58 :   GDALDataType arg1 ;
   47846          58 :   PyObject *swig_obj[1] ;
   47847          58 :   int result;
   47848             :   
   47849          58 :   if (!args) SWIG_fail;
   47850          58 :   swig_obj[0] = args;
   47851          58 :   {
   47852             :     // %typemap(in) GDALDataType
   47853          58 :     int val = 0;
   47854          58 :     int ecode = SWIG_AsVal_int(swig_obj[0], &val);
   47855          58 :     if (!SWIG_IsOK(ecode)) {
   47856           0 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   47857             :     }
   47858          58 :     if( val < GDT_Unknown || val >= GDT_TypeCount )
   47859             :     {
   47860           0 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   47861             :     }
   47862          58 :     arg1 = static_cast<GDALDataType>(val);
   47863             :   }
   47864          58 :   {
   47865          58 :     const int bLocalUseExceptions = GetUseExceptions();
   47866          58 :     if ( bLocalUseExceptions ) {
   47867           0 :       pushErrorHandler();
   47868             :     }
   47869          58 :     {
   47870          58 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   47871          58 :       result = (int)GDALDataTypeIsComplex(arg1);
   47872          58 :       SWIG_PYTHON_THREAD_END_ALLOW;
   47873             :     }
   47874          58 :     if ( bLocalUseExceptions ) {
   47875           0 :       popErrorHandler();
   47876             :     }
   47877             : #ifndef SED_HACKS
   47878             :     if ( bLocalUseExceptions ) {
   47879             :       CPLErr eclass = CPLGetLastErrorType();
   47880             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   47881             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   47882             :       }
   47883             :     }
   47884             : #endif
   47885             :   }
   47886          58 :   resultobj = SWIG_From_int(static_cast< int >(result));
   47887          58 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   47888             :   return resultobj;
   47889             : fail:
   47890             :   return NULL;
   47891             : }
   47892             : 
   47893             : 
   47894        4471 : SWIGINTERN PyObject *_wrap_GetDataTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   47895        4471 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   47896        4471 :   GDALDataType arg1 ;
   47897        4471 :   PyObject *swig_obj[1] ;
   47898        4471 :   char *result = 0 ;
   47899             :   
   47900        4471 :   if (!args) SWIG_fail;
   47901        4471 :   swig_obj[0] = args;
   47902        4471 :   {
   47903             :     // %typemap(in) GDALDataType
   47904        4471 :     int val = 0;
   47905        4471 :     int ecode = SWIG_AsVal_int(swig_obj[0], &val);
   47906        4471 :     if (!SWIG_IsOK(ecode)) {
   47907           1 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   47908             :     }
   47909        4470 :     if( val < GDT_Unknown || val >= GDT_TypeCount )
   47910             :     {
   47911           2 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   47912             :     }
   47913        4468 :     arg1 = static_cast<GDALDataType>(val);
   47914             :   }
   47915        4468 :   {
   47916        4468 :     const int bLocalUseExceptions = GetUseExceptions();
   47917        4468 :     if ( bLocalUseExceptions ) {
   47918         227 :       pushErrorHandler();
   47919             :     }
   47920        4468 :     {
   47921        4468 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   47922        4468 :       result = (char *)GDALGetDataTypeName(arg1);
   47923        4468 :       SWIG_PYTHON_THREAD_END_ALLOW;
   47924             :     }
   47925        4468 :     if ( bLocalUseExceptions ) {
   47926         227 :       popErrorHandler();
   47927             :     }
   47928             : #ifndef SED_HACKS
   47929             :     if ( bLocalUseExceptions ) {
   47930             :       CPLErr eclass = CPLGetLastErrorType();
   47931             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   47932             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   47933             :       }
   47934             :     }
   47935             : #endif
   47936             :   }
   47937        4468 :   resultobj = SWIG_FromCharPtr((const char *)result);
   47938        4471 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   47939             :   return resultobj;
   47940             : fail:
   47941             :   return NULL;
   47942             : }
   47943             : 
   47944             : 
   47945           5 : SWIGINTERN PyObject *_wrap_GetDataTypeByName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   47946           5 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   47947           5 :   char *arg1 = (char *) 0 ;
   47948           5 :   int res1 ;
   47949           5 :   char *buf1 = 0 ;
   47950           5 :   int alloc1 = 0 ;
   47951           5 :   PyObject *swig_obj[1] ;
   47952           5 :   GDALDataType result;
   47953             :   
   47954           5 :   if (!args) SWIG_fail;
   47955           5 :   swig_obj[0] = args;
   47956           5 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   47957           5 :   if (!SWIG_IsOK(res1)) {
   47958           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetDataTypeByName" "', argument " "1"" of type '" "char const *""'");
   47959             :   }
   47960           5 :   arg1 = reinterpret_cast< char * >(buf1);
   47961           5 :   {
   47962           5 :     const int bLocalUseExceptions = GetUseExceptions();
   47963           5 :     if ( bLocalUseExceptions ) {
   47964           5 :       pushErrorHandler();
   47965             :     }
   47966           5 :     {
   47967           5 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   47968           5 :       result = (GDALDataType)GDALGetDataTypeByName((char const *)arg1);
   47969           5 :       SWIG_PYTHON_THREAD_END_ALLOW;
   47970             :     }
   47971           5 :     if ( bLocalUseExceptions ) {
   47972           5 :       popErrorHandler();
   47973             :     }
   47974             : #ifndef SED_HACKS
   47975             :     if ( bLocalUseExceptions ) {
   47976             :       CPLErr eclass = CPLGetLastErrorType();
   47977             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   47978             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   47979             :       }
   47980             :     }
   47981             : #endif
   47982             :   }
   47983           5 :   resultobj = SWIG_From_int(static_cast< int >(result));
   47984           5 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   47985           5 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   47986             :   return resultobj;
   47987           0 : fail:
   47988           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   47989             :   return NULL;
   47990             : }
   47991             : 
   47992             : 
   47993          55 : SWIGINTERN PyObject *_wrap_DataTypeUnion(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   47994          55 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   47995          55 :   GDALDataType arg1 ;
   47996          55 :   GDALDataType arg2 ;
   47997          55 :   PyObject *swig_obj[2] ;
   47998          55 :   GDALDataType result;
   47999             :   
   48000          55 :   if (!SWIG_Python_UnpackTuple(args, "DataTypeUnion", 2, 2, swig_obj)) SWIG_fail;
   48001          55 :   {
   48002             :     // %typemap(in) GDALDataType
   48003          55 :     int val = 0;
   48004          55 :     int ecode = SWIG_AsVal_int(swig_obj[0], &val);
   48005          55 :     if (!SWIG_IsOK(ecode)) {
   48006           0 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   48007             :     }
   48008          55 :     if( val < GDT_Unknown || val >= GDT_TypeCount )
   48009             :     {
   48010           0 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   48011             :     }
   48012          55 :     arg1 = static_cast<GDALDataType>(val);
   48013             :   }
   48014          55 :   {
   48015             :     // %typemap(in) GDALDataType
   48016          55 :     int val = 0;
   48017          55 :     int ecode = SWIG_AsVal_int(swig_obj[1], &val);
   48018          55 :     if (!SWIG_IsOK(ecode)) {
   48019           0 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   48020             :     }
   48021          55 :     if( val < GDT_Unknown || val >= GDT_TypeCount )
   48022             :     {
   48023           0 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   48024             :     }
   48025          55 :     arg2 = static_cast<GDALDataType>(val);
   48026             :   }
   48027          55 :   {
   48028          55 :     const int bLocalUseExceptions = GetUseExceptions();
   48029          55 :     if ( bLocalUseExceptions ) {
   48030          54 :       pushErrorHandler();
   48031             :     }
   48032          55 :     {
   48033          55 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   48034          55 :       result = (GDALDataType)GDALDataTypeUnion(arg1,arg2);
   48035          55 :       SWIG_PYTHON_THREAD_END_ALLOW;
   48036             :     }
   48037          55 :     if ( bLocalUseExceptions ) {
   48038          54 :       popErrorHandler();
   48039             :     }
   48040             : #ifndef SED_HACKS
   48041             :     if ( bLocalUseExceptions ) {
   48042             :       CPLErr eclass = CPLGetLastErrorType();
   48043             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   48044             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   48045             :       }
   48046             :     }
   48047             : #endif
   48048             :   }
   48049          55 :   resultobj = SWIG_From_int(static_cast< int >(result));
   48050          55 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   48051             :   return resultobj;
   48052             : fail:
   48053             :   return NULL;
   48054             : }
   48055             : 
   48056             : 
   48057          19 : SWIGINTERN PyObject *_wrap_GetColorInterpretationName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   48058          19 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   48059          19 :   GDALColorInterp arg1 ;
   48060          19 :   int val1 ;
   48061          19 :   int ecode1 = 0 ;
   48062          19 :   PyObject *swig_obj[1] ;
   48063          19 :   char *result = 0 ;
   48064             :   
   48065          19 :   if (!args) SWIG_fail;
   48066          19 :   swig_obj[0] = args;
   48067          19 :   ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
   48068          19 :   if (!SWIG_IsOK(ecode1)) {
   48069           0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GetColorInterpretationName" "', argument " "1"" of type '" "GDALColorInterp""'");
   48070             :   } 
   48071          19 :   arg1 = static_cast< GDALColorInterp >(val1);
   48072          19 :   {
   48073          19 :     const int bLocalUseExceptions = GetUseExceptions();
   48074          19 :     if ( bLocalUseExceptions ) {
   48075           2 :       pushErrorHandler();
   48076             :     }
   48077          19 :     {
   48078          19 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   48079          19 :       result = (char *)GDALGetColorInterpretationName(arg1);
   48080          19 :       SWIG_PYTHON_THREAD_END_ALLOW;
   48081             :     }
   48082          19 :     if ( bLocalUseExceptions ) {
   48083           2 :       popErrorHandler();
   48084             :     }
   48085             : #ifndef SED_HACKS
   48086             :     if ( bLocalUseExceptions ) {
   48087             :       CPLErr eclass = CPLGetLastErrorType();
   48088             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   48089             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   48090             :       }
   48091             :     }
   48092             : #endif
   48093             :   }
   48094          19 :   resultobj = SWIG_FromCharPtr((const char *)result);
   48095          19 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   48096             :   return resultobj;
   48097             : fail:
   48098             :   return NULL;
   48099             : }
   48100             : 
   48101             : 
   48102           2 : SWIGINTERN PyObject *_wrap_GetPaletteInterpretationName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   48103           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   48104           2 :   GDALPaletteInterp arg1 ;
   48105           2 :   int val1 ;
   48106           2 :   int ecode1 = 0 ;
   48107           2 :   PyObject *swig_obj[1] ;
   48108           2 :   char *result = 0 ;
   48109             :   
   48110           2 :   if (!args) SWIG_fail;
   48111           2 :   swig_obj[0] = args;
   48112           2 :   ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
   48113           2 :   if (!SWIG_IsOK(ecode1)) {
   48114           0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GetPaletteInterpretationName" "', argument " "1"" of type '" "GDALPaletteInterp""'");
   48115             :   } 
   48116           2 :   arg1 = static_cast< GDALPaletteInterp >(val1);
   48117           2 :   {
   48118           2 :     const int bLocalUseExceptions = GetUseExceptions();
   48119           2 :     if ( bLocalUseExceptions ) {
   48120           0 :       pushErrorHandler();
   48121             :     }
   48122           2 :     {
   48123           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   48124           2 :       result = (char *)GDALGetPaletteInterpretationName(arg1);
   48125           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   48126             :     }
   48127           2 :     if ( bLocalUseExceptions ) {
   48128           0 :       popErrorHandler();
   48129             :     }
   48130             : #ifndef SED_HACKS
   48131             :     if ( bLocalUseExceptions ) {
   48132             :       CPLErr eclass = CPLGetLastErrorType();
   48133             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   48134             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   48135             :       }
   48136             :     }
   48137             : #endif
   48138             :   }
   48139           2 :   resultobj = SWIG_FromCharPtr((const char *)result);
   48140           2 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   48141             :   return resultobj;
   48142             : fail:
   48143             :   return NULL;
   48144             : }
   48145             : 
   48146             : 
   48147         130 : SWIGINTERN PyObject *_wrap_DecToDMS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   48148         130 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   48149         130 :   double arg1 ;
   48150         130 :   char *arg2 = (char *) 0 ;
   48151         130 :   int arg3 = (int) 2 ;
   48152         130 :   double val1 ;
   48153         130 :   int ecode1 = 0 ;
   48154         130 :   int res2 ;
   48155         130 :   char *buf2 = 0 ;
   48156         130 :   int alloc2 = 0 ;
   48157         130 :   int val3 ;
   48158         130 :   int ecode3 = 0 ;
   48159         130 :   PyObject *swig_obj[3] ;
   48160         130 :   char *result = 0 ;
   48161             :   
   48162         130 :   if (!SWIG_Python_UnpackTuple(args, "DecToDMS", 2, 3, swig_obj)) SWIG_fail;
   48163         130 :   ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
   48164         130 :   if (!SWIG_IsOK(ecode1)) {
   48165           0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "DecToDMS" "', argument " "1"" of type '" "double""'");
   48166             :   } 
   48167         130 :   arg1 = static_cast< double >(val1);
   48168         130 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   48169         130 :   if (!SWIG_IsOK(res2)) {
   48170           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DecToDMS" "', argument " "2"" of type '" "char const *""'");
   48171             :   }
   48172         130 :   arg2 = reinterpret_cast< char * >(buf2);
   48173         130 :   if (swig_obj[2]) {
   48174         130 :     ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   48175         130 :     if (!SWIG_IsOK(ecode3)) {
   48176           0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DecToDMS" "', argument " "3"" of type '" "int""'");
   48177             :     } 
   48178             :     arg3 = static_cast< int >(val3);
   48179             :   }
   48180         130 :   {
   48181         130 :     const int bLocalUseExceptions = GetUseExceptions();
   48182         130 :     if ( bLocalUseExceptions ) {
   48183           0 :       pushErrorHandler();
   48184             :     }
   48185         130 :     {
   48186         130 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   48187         130 :       result = (char *)GDALDecToDMS(arg1,(char const *)arg2,arg3);
   48188         130 :       SWIG_PYTHON_THREAD_END_ALLOW;
   48189             :     }
   48190         130 :     if ( bLocalUseExceptions ) {
   48191           0 :       popErrorHandler();
   48192             :     }
   48193             : #ifndef SED_HACKS
   48194             :     if ( bLocalUseExceptions ) {
   48195             :       CPLErr eclass = CPLGetLastErrorType();
   48196             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   48197             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   48198             :       }
   48199             :     }
   48200             : #endif
   48201             :   }
   48202         130 :   resultobj = SWIG_FromCharPtr((const char *)result);
   48203         130 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   48204         130 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   48205             :   return resultobj;
   48206           0 : fail:
   48207           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   48208             :   return NULL;
   48209             : }
   48210             : 
   48211             : 
   48212           4 : SWIGINTERN PyObject *_wrap_PackedDMSToDec(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   48213           4 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   48214           4 :   double arg1 ;
   48215           4 :   double val1 ;
   48216           4 :   int ecode1 = 0 ;
   48217           4 :   PyObject *swig_obj[1] ;
   48218           4 :   double result;
   48219             :   
   48220           4 :   if (!args) SWIG_fail;
   48221           4 :   swig_obj[0] = args;
   48222           4 :   ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
   48223           4 :   if (!SWIG_IsOK(ecode1)) {
   48224           0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "PackedDMSToDec" "', argument " "1"" of type '" "double""'");
   48225             :   } 
   48226           4 :   arg1 = static_cast< double >(val1);
   48227           4 :   {
   48228           4 :     const int bLocalUseExceptions = GetUseExceptions();
   48229           4 :     if ( bLocalUseExceptions ) {
   48230           4 :       pushErrorHandler();
   48231             :     }
   48232           4 :     {
   48233           4 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   48234           4 :       result = (double)GDALPackedDMSToDec(arg1);
   48235           4 :       SWIG_PYTHON_THREAD_END_ALLOW;
   48236             :     }
   48237           4 :     if ( bLocalUseExceptions ) {
   48238           4 :       popErrorHandler();
   48239             :     }
   48240             : #ifndef SED_HACKS
   48241             :     if ( bLocalUseExceptions ) {
   48242             :       CPLErr eclass = CPLGetLastErrorType();
   48243             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   48244             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   48245             :       }
   48246             :     }
   48247             : #endif
   48248             :   }
   48249           4 :   resultobj = SWIG_From_double(static_cast< double >(result));
   48250           4 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   48251             :   return resultobj;
   48252             : fail:
   48253             :   return NULL;
   48254             : }
   48255             : 
   48256             : 
   48257           4 : SWIGINTERN PyObject *_wrap_DecToPackedDMS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   48258           4 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   48259           4 :   double arg1 ;
   48260           4 :   double val1 ;
   48261           4 :   int ecode1 = 0 ;
   48262           4 :   PyObject *swig_obj[1] ;
   48263           4 :   double result;
   48264             :   
   48265           4 :   if (!args) SWIG_fail;
   48266           4 :   swig_obj[0] = args;
   48267           4 :   ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
   48268           4 :   if (!SWIG_IsOK(ecode1)) {
   48269           0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "DecToPackedDMS" "', argument " "1"" of type '" "double""'");
   48270             :   } 
   48271           4 :   arg1 = static_cast< double >(val1);
   48272           4 :   {
   48273           4 :     const int bLocalUseExceptions = GetUseExceptions();
   48274           4 :     if ( bLocalUseExceptions ) {
   48275           4 :       pushErrorHandler();
   48276             :     }
   48277           4 :     {
   48278           4 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   48279           4 :       result = (double)GDALDecToPackedDMS(arg1);
   48280           4 :       SWIG_PYTHON_THREAD_END_ALLOW;
   48281             :     }
   48282           4 :     if ( bLocalUseExceptions ) {
   48283           4 :       popErrorHandler();
   48284             :     }
   48285             : #ifndef SED_HACKS
   48286             :     if ( bLocalUseExceptions ) {
   48287             :       CPLErr eclass = CPLGetLastErrorType();
   48288             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   48289             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   48290             :       }
   48291             :     }
   48292             : #endif
   48293             :   }
   48294           4 :   resultobj = SWIG_From_double(static_cast< double >(result));
   48295           4 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   48296             :   return resultobj;
   48297             : fail:
   48298             :   return NULL;
   48299             : }
   48300             : 
   48301             : 
   48302          49 : SWIGINTERN PyObject *_wrap_ParseXMLString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   48303          49 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   48304          49 :   char *arg1 = (char *) 0 ;
   48305          49 :   int res1 ;
   48306          49 :   char *buf1 = 0 ;
   48307          49 :   int alloc1 = 0 ;
   48308          49 :   PyObject *swig_obj[1] ;
   48309          49 :   CPLXMLNode *result = 0 ;
   48310             :   
   48311          49 :   if (!args) SWIG_fail;
   48312          49 :   swig_obj[0] = args;
   48313          49 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   48314          49 :   if (!SWIG_IsOK(res1)) {
   48315           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParseXMLString" "', argument " "1"" of type '" "char *""'");
   48316             :   }
   48317          49 :   arg1 = reinterpret_cast< char * >(buf1);
   48318          49 :   {
   48319          49 :     const int bLocalUseExceptions = GetUseExceptions();
   48320          49 :     if ( bLocalUseExceptions ) {
   48321          24 :       pushErrorHandler();
   48322             :     }
   48323          49 :     {
   48324          49 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   48325          49 :       result = (CPLXMLNode *)CPLParseXMLString(arg1);
   48326          49 :       SWIG_PYTHON_THREAD_END_ALLOW;
   48327             :     }
   48328          49 :     if ( bLocalUseExceptions ) {
   48329          24 :       popErrorHandler();
   48330             :     }
   48331             : #ifndef SED_HACKS
   48332             :     if ( bLocalUseExceptions ) {
   48333             :       CPLErr eclass = CPLGetLastErrorType();
   48334             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   48335             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   48336             :       }
   48337             :     }
   48338             : #endif
   48339             :   }
   48340          49 :   {
   48341             :     /* %typemap(out) (CPLXMLNode*) */
   48342             :     
   48343          49 :     CPLXMLNode *psXMLTree = result;
   48344          49 :     int         bFakeRoot = FALSE;
   48345             :     
   48346          49 :     if( psXMLTree != NULL && psXMLTree->psNext != NULL )
   48347             :     {
   48348           3 :       CPLXMLNode *psFirst = psXMLTree;
   48349             :       
   48350             :       /* create a "pseudo" root if we have multiple elements */
   48351           3 :       psXMLTree = CPLCreateXMLNode( NULL, CXT_Element, "" );
   48352           3 :       psXMLTree->psChild = psFirst;
   48353           3 :       bFakeRoot = TRUE;
   48354             :     }
   48355             :     
   48356          49 :     resultobj = XMLTreeToPyList( psXMLTree );
   48357             :     
   48358          49 :     if( bFakeRoot )
   48359             :     {
   48360           3 :       psXMLTree->psChild = NULL;
   48361           3 :       CPLDestroyXMLNode( psXMLTree );
   48362             :     }
   48363             :   }
   48364          49 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   48365          49 :   {
   48366             :     /* %typemap(ret) (CPLXMLNode*) */
   48367          49 :     if ( result ) CPLDestroyXMLNode( result );
   48368             :   }
   48369          62 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   48370             :   return resultobj;
   48371           0 : fail:
   48372           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   48373             :   return NULL;
   48374             : }
   48375             : 
   48376             : 
   48377          13 : SWIGINTERN PyObject *_wrap_SerializeXMLTree(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   48378          13 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   48379          13 :   CPLXMLNode *arg1 = (CPLXMLNode *) 0 ;
   48380          13 :   PyObject *swig_obj[1] ;
   48381          13 :   retStringAndCPLFree *result = 0 ;
   48382             :   
   48383          13 :   if (!args) SWIG_fail;
   48384          13 :   swig_obj[0] = args;
   48385          13 :   {
   48386             :     /* %typemap(python,in) (CPLXMLNode* xmlnode ) */
   48387          13 :     arg1 = PyListToXMLTree( swig_obj[0] );
   48388          13 :     if ( !arg1 ) SWIG_fail;
   48389             :   }
   48390          13 :   {
   48391          13 :     const int bLocalUseExceptions = GetUseExceptions();
   48392          13 :     if ( bLocalUseExceptions ) {
   48393           3 :       pushErrorHandler();
   48394             :     }
   48395          13 :     {
   48396          13 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   48397          13 :       result = (retStringAndCPLFree *)CPLSerializeXMLTree(arg1);
   48398          13 :       SWIG_PYTHON_THREAD_END_ALLOW;
   48399             :     }
   48400          13 :     if ( bLocalUseExceptions ) {
   48401           3 :       popErrorHandler();
   48402             :     }
   48403             : #ifndef SED_HACKS
   48404             :     if ( bLocalUseExceptions ) {
   48405             :       CPLErr eclass = CPLGetLastErrorType();
   48406             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   48407             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   48408             :       }
   48409             :     }
   48410             : #endif
   48411             :   }
   48412          13 :   {
   48413             :     /* %typemap(out) (retStringAndCPLFree*) */
   48414          13 :     Py_XDECREF(resultobj);
   48415          13 :     if(result)
   48416             :     {
   48417          13 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   48418          13 :       CPLFree(result);
   48419             :     }
   48420             :     else
   48421             :     {
   48422           0 :       resultobj = Py_None;
   48423           0 :       Py_INCREF(resultobj);
   48424             :     }
   48425             :   }
   48426          13 :   {
   48427             :     /* %typemap(freearg) (CPLXMLNode *xmlnode) */
   48428          13 :     CPLDestroyXMLNode( arg1 );
   48429             :   }
   48430          13 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   48431             :   return resultobj;
   48432           0 : fail:
   48433           0 :   {
   48434             :     /* %typemap(freearg) (CPLXMLNode *xmlnode) */
   48435           0 :     CPLDestroyXMLNode( arg1 );
   48436             :   }
   48437             :   return NULL;
   48438             : }
   48439             : 
   48440             : 
   48441          30 : SWIGINTERN PyObject *_wrap_GetJPEG2000Structure(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   48442          30 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   48443          30 :   char *arg1 = (char *) 0 ;
   48444          30 :   char **arg2 = (char **) NULL ;
   48445          30 :   int res1 ;
   48446          30 :   char *buf1 = 0 ;
   48447          30 :   int alloc1 = 0 ;
   48448          30 :   PyObject *swig_obj[2] ;
   48449          30 :   CPLXMLNode *result = 0 ;
   48450             :   
   48451          30 :   if (!SWIG_Python_UnpackTuple(args, "GetJPEG2000Structure", 1, 2, swig_obj)) SWIG_fail;
   48452          30 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   48453          30 :   if (!SWIG_IsOK(res1)) {
   48454           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetJPEG2000Structure" "', argument " "1"" of type '" "char const *""'");
   48455             :   }
   48456          30 :   arg1 = reinterpret_cast< char * >(buf1);
   48457          30 :   if (swig_obj[1]) {
   48458          30 :     {
   48459             :       /* %typemap(in) char **dict */
   48460          30 :       arg2 = NULL;
   48461          30 :       if ( PySequence_Check( swig_obj[1] ) ) {
   48462          30 :         int bErr = FALSE;
   48463          30 :         arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   48464          30 :         if ( bErr )
   48465             :         {
   48466           0 :           SWIG_fail;
   48467             :         }
   48468             :       }
   48469           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   48470           0 :         int bErr = FALSE;
   48471           0 :         arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   48472           0 :         if ( bErr )
   48473             :         {
   48474           0 :           SWIG_fail;
   48475             :         }
   48476             :       }
   48477             :       else {
   48478           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   48479           0 :         SWIG_fail;
   48480             :       }
   48481             :     }
   48482             :   }
   48483          30 :   {
   48484          30 :     if (!arg1) {
   48485           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   48486             :     }
   48487             :   }
   48488          30 :   {
   48489          30 :     const int bLocalUseExceptions = GetUseExceptions();
   48490          30 :     if ( bLocalUseExceptions ) {
   48491           0 :       pushErrorHandler();
   48492             :     }
   48493          30 :     {
   48494          30 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   48495          30 :       result = (CPLXMLNode *)GDALGetJPEG2000Structure((char const *)arg1,arg2);
   48496          30 :       SWIG_PYTHON_THREAD_END_ALLOW;
   48497             :     }
   48498          30 :     if ( bLocalUseExceptions ) {
   48499           0 :       popErrorHandler();
   48500             :     }
   48501             : #ifndef SED_HACKS
   48502             :     if ( bLocalUseExceptions ) {
   48503             :       CPLErr eclass = CPLGetLastErrorType();
   48504             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   48505             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   48506             :       }
   48507             :     }
   48508             : #endif
   48509             :   }
   48510          30 :   {
   48511             :     /* %typemap(out) (CPLXMLNode*) */
   48512             :     
   48513          30 :     CPLXMLNode *psXMLTree = result;
   48514          30 :     int         bFakeRoot = FALSE;
   48515             :     
   48516          30 :     if( psXMLTree != NULL && psXMLTree->psNext != NULL )
   48517             :     {
   48518           0 :       CPLXMLNode *psFirst = psXMLTree;
   48519             :       
   48520             :       /* create a "pseudo" root if we have multiple elements */
   48521           0 :       psXMLTree = CPLCreateXMLNode( NULL, CXT_Element, "" );
   48522           0 :       psXMLTree->psChild = psFirst;
   48523           0 :       bFakeRoot = TRUE;
   48524             :     }
   48525             :     
   48526          30 :     resultobj = XMLTreeToPyList( psXMLTree );
   48527             :     
   48528          30 :     if( bFakeRoot )
   48529             :     {
   48530           0 :       psXMLTree->psChild = NULL;
   48531           0 :       CPLDestroyXMLNode( psXMLTree );
   48532             :     }
   48533             :   }
   48534          30 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   48535          30 :   {
   48536             :     /* %typemap(freearg) char **dict */
   48537          30 :     CSLDestroy( arg2 );
   48538             :   }
   48539          30 :   {
   48540             :     /* %typemap(ret) (CPLXMLNode*) */
   48541          30 :     if ( result ) CPLDestroyXMLNode( result );
   48542             :   }
   48543          30 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   48544             :   return resultobj;
   48545           0 : fail:
   48546           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   48547           0 :   {
   48548             :     /* %typemap(freearg) char **dict */
   48549           0 :     CSLDestroy( arg2 );
   48550             :   }
   48551             :   return NULL;
   48552             : }
   48553             : 
   48554             : 
   48555           9 : SWIGINTERN PyObject *_wrap_GetJPEG2000StructureAsString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   48556           9 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   48557           9 :   char *arg1 = (char *) 0 ;
   48558           9 :   char **arg2 = (char **) NULL ;
   48559           9 :   int res1 ;
   48560           9 :   char *buf1 = 0 ;
   48561           9 :   int alloc1 = 0 ;
   48562           9 :   PyObject *swig_obj[2] ;
   48563           9 :   retStringAndCPLFree *result = 0 ;
   48564             :   
   48565           9 :   if (!SWIG_Python_UnpackTuple(args, "GetJPEG2000StructureAsString", 1, 2, swig_obj)) SWIG_fail;
   48566           9 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   48567           9 :   if (!SWIG_IsOK(res1)) {
   48568           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetJPEG2000StructureAsString" "', argument " "1"" of type '" "char const *""'");
   48569             :   }
   48570           9 :   arg1 = reinterpret_cast< char * >(buf1);
   48571           9 :   if (swig_obj[1]) {
   48572           9 :     {
   48573             :       /* %typemap(in) char **dict */
   48574           9 :       arg2 = NULL;
   48575           9 :       if ( PySequence_Check( swig_obj[1] ) ) {
   48576           9 :         int bErr = FALSE;
   48577           9 :         arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   48578           9 :         if ( bErr )
   48579             :         {
   48580           0 :           SWIG_fail;
   48581             :         }
   48582             :       }
   48583           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   48584           0 :         int bErr = FALSE;
   48585           0 :         arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   48586           0 :         if ( bErr )
   48587             :         {
   48588           0 :           SWIG_fail;
   48589             :         }
   48590             :       }
   48591             :       else {
   48592           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   48593           0 :         SWIG_fail;
   48594             :       }
   48595             :     }
   48596             :   }
   48597           9 :   {
   48598           9 :     if (!arg1) {
   48599           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   48600             :     }
   48601             :   }
   48602           9 :   {
   48603           9 :     const int bLocalUseExceptions = GetUseExceptions();
   48604           9 :     if ( bLocalUseExceptions ) {
   48605           5 :       pushErrorHandler();
   48606             :     }
   48607           9 :     {
   48608           9 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   48609           9 :       result = (retStringAndCPLFree *)GetJPEG2000StructureAsString((char const *)arg1,arg2);
   48610           9 :       SWIG_PYTHON_THREAD_END_ALLOW;
   48611             :     }
   48612           9 :     if ( bLocalUseExceptions ) {
   48613           5 :       popErrorHandler();
   48614             :     }
   48615             : #ifndef SED_HACKS
   48616             :     if ( bLocalUseExceptions ) {
   48617             :       CPLErr eclass = CPLGetLastErrorType();
   48618             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   48619             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   48620             :       }
   48621             :     }
   48622             : #endif
   48623             :   }
   48624           9 :   {
   48625             :     /* %typemap(out) (retStringAndCPLFree*) */
   48626           9 :     Py_XDECREF(resultobj);
   48627           9 :     if(result)
   48628             :     {
   48629           9 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   48630           9 :       CPLFree(result);
   48631             :     }
   48632             :     else
   48633             :     {
   48634           0 :       resultobj = Py_None;
   48635           0 :       Py_INCREF(resultobj);
   48636             :     }
   48637             :   }
   48638           9 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   48639           9 :   {
   48640             :     /* %typemap(freearg) char **dict */
   48641           9 :     CSLDestroy( arg2 );
   48642             :   }
   48643          11 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   48644             :   return resultobj;
   48645           0 : fail:
   48646           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   48647           0 :   {
   48648             :     /* %typemap(freearg) char **dict */
   48649           0 :     CSLDestroy( arg2 );
   48650             :   }
   48651             :   return NULL;
   48652             : }
   48653             : 
   48654             : 
   48655           1 : SWIGINTERN PyObject *_wrap_HasTriangulation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   48656           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   48657           1 :   int result;
   48658             :   
   48659           1 :   if (!SWIG_Python_UnpackTuple(args, "HasTriangulation", 0, 0, 0)) SWIG_fail;
   48660           1 :   {
   48661           1 :     const int bLocalUseExceptions = GetUseExceptions();
   48662           1 :     if ( bLocalUseExceptions ) {
   48663           1 :       pushErrorHandler();
   48664             :     }
   48665           1 :     {
   48666           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   48667           1 :       result = (int)GDALHasTriangulation();
   48668           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   48669             :     }
   48670           1 :     if ( bLocalUseExceptions ) {
   48671           1 :       popErrorHandler();
   48672             :     }
   48673             : #ifndef SED_HACKS
   48674             :     if ( bLocalUseExceptions ) {
   48675             :       CPLErr eclass = CPLGetLastErrorType();
   48676             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   48677             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   48678             :       }
   48679             :     }
   48680             : #endif
   48681             :   }
   48682           1 :   resultobj = SWIG_From_int(static_cast< int >(result));
   48683           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   48684             :   return resultobj;
   48685           0 : fail:
   48686           0 :   return NULL;
   48687             : }
   48688             : 
   48689             : 
   48690         373 : SWIGINTERN PyObject *_wrap_GetDriverCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   48691         373 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   48692         373 :   int result;
   48693             :   
   48694         373 :   if (!SWIG_Python_UnpackTuple(args, "GetDriverCount", 0, 0, 0)) SWIG_fail;
   48695         373 :   {
   48696         373 :     const int bLocalUseExceptions = GetUseExceptions();
   48697         373 :     if ( bLocalUseExceptions ) {
   48698         303 :       pushErrorHandler();
   48699             :     }
   48700         373 :     {
   48701         373 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   48702         373 :       result = (int)GetDriverCount();
   48703         373 :       SWIG_PYTHON_THREAD_END_ALLOW;
   48704             :     }
   48705         373 :     if ( bLocalUseExceptions ) {
   48706         303 :       popErrorHandler();
   48707             :     }
   48708             : #ifndef SED_HACKS
   48709             :     if ( bLocalUseExceptions ) {
   48710             :       CPLErr eclass = CPLGetLastErrorType();
   48711             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   48712             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   48713             :       }
   48714             :     }
   48715             : #endif
   48716             :   }
   48717         373 :   resultobj = SWIG_From_int(static_cast< int >(result));
   48718         373 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   48719             :   return resultobj;
   48720           0 : fail:
   48721           0 :   return NULL;
   48722             : }
   48723             : 
   48724             : 
   48725       10912 : SWIGINTERN PyObject *_wrap_GetDriverByName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   48726       10912 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   48727       10912 :   char *arg1 = (char *) 0 ;
   48728       10912 :   int res1 ;
   48729       10912 :   char *buf1 = 0 ;
   48730       10912 :   int alloc1 = 0 ;
   48731       10912 :   PyObject *swig_obj[1] ;
   48732       10912 :   GDALDriverShadow *result = 0 ;
   48733             :   
   48734       10912 :   if (!args) SWIG_fail;
   48735       10912 :   swig_obj[0] = args;
   48736       10912 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   48737       10912 :   if (!SWIG_IsOK(res1)) {
   48738           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetDriverByName" "', argument " "1"" of type '" "char const *""'");
   48739             :   }
   48740       10912 :   arg1 = reinterpret_cast< char * >(buf1);
   48741       10912 :   {
   48742       10912 :     if (!arg1) {
   48743           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   48744             :     }
   48745             :   }
   48746       10912 :   {
   48747       10912 :     const int bLocalUseExceptions = GetUseExceptions();
   48748       10912 :     if ( bLocalUseExceptions ) {
   48749        6807 :       pushErrorHandler();
   48750             :     }
   48751       10912 :     {
   48752       10912 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   48753       10912 :       result = (GDALDriverShadow *)GetDriverByName((char const *)arg1);
   48754       10912 :       SWIG_PYTHON_THREAD_END_ALLOW;
   48755             :     }
   48756       10912 :     if ( bLocalUseExceptions ) {
   48757        6807 :       popErrorHandler();
   48758             :     }
   48759             : #ifndef SED_HACKS
   48760             :     if ( bLocalUseExceptions ) {
   48761             :       CPLErr eclass = CPLGetLastErrorType();
   48762             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   48763             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   48764             :       }
   48765             :     }
   48766             : #endif
   48767             :   }
   48768       10912 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   48769       10912 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   48770       10912 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   48771             :   return resultobj;
   48772           0 : fail:
   48773           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   48774             :   return NULL;
   48775             : }
   48776             : 
   48777             : 
   48778       85801 : SWIGINTERN PyObject *_wrap_GetDriver(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   48779       85801 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   48780       85801 :   int arg1 ;
   48781       85801 :   int val1 ;
   48782       85801 :   int ecode1 = 0 ;
   48783       85801 :   PyObject *swig_obj[1] ;
   48784       85801 :   GDALDriverShadow *result = 0 ;
   48785             :   
   48786       85801 :   if (!args) SWIG_fail;
   48787       85801 :   swig_obj[0] = args;
   48788       85801 :   ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
   48789       85801 :   if (!SWIG_IsOK(ecode1)) {
   48790           0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GetDriver" "', argument " "1"" of type '" "int""'");
   48791             :   } 
   48792       85801 :   arg1 = static_cast< int >(val1);
   48793       85801 :   {
   48794       85801 :     const int bLocalUseExceptions = GetUseExceptions();
   48795       85801 :     if ( bLocalUseExceptions ) {
   48796       70542 :       pushErrorHandler();
   48797             :     }
   48798       85801 :     {
   48799       85801 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   48800       85801 :       result = (GDALDriverShadow *)GetDriver(arg1);
   48801       85801 :       SWIG_PYTHON_THREAD_END_ALLOW;
   48802             :     }
   48803       85801 :     if ( bLocalUseExceptions ) {
   48804       70542 :       popErrorHandler();
   48805             :     }
   48806             : #ifndef SED_HACKS
   48807             :     if ( bLocalUseExceptions ) {
   48808             :       CPLErr eclass = CPLGetLastErrorType();
   48809             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   48810             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   48811             :       }
   48812             :     }
   48813             : #endif
   48814             :   }
   48815       85801 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   48816       85801 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   48817             :   return resultobj;
   48818             : fail:
   48819             :   return NULL;
   48820             : }
   48821             : 
   48822             : 
   48823       21360 : SWIGINTERN PyObject *_wrap_Open(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   48824       21360 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   48825       21360 :   char *arg1 = (char *) 0 ;
   48826       21360 :   GDALAccess arg2 = (GDALAccess) GA_ReadOnly ;
   48827       21360 :   int bToFree1 = 0 ;
   48828       21360 :   int val2 ;
   48829       21360 :   int ecode2 = 0 ;
   48830       21360 :   PyObject *swig_obj[2] ;
   48831       21360 :   GDALDatasetShadow *result = 0 ;
   48832             :   
   48833       21360 :   if (!SWIG_Python_UnpackTuple(args, "Open", 1, 2, swig_obj)) SWIG_fail;
   48834       21360 :   {
   48835             :     /* %typemap(in) (const char *utf8_path) */
   48836       21360 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   48837             :     {
   48838       21140 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   48839             :     }
   48840             :     else
   48841             :     {
   48842         220 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   48843             :       
   48844             :     }
   48845       21360 :     if (arg1 == NULL)
   48846             :     {
   48847           1 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   48848           1 :       SWIG_fail;
   48849             :     }
   48850             :   }
   48851       21359 :   if (swig_obj[1]) {
   48852        1526 :     ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   48853        1526 :     if (!SWIG_IsOK(ecode2)) {
   48854           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Open" "', argument " "2"" of type '" "GDALAccess""'");
   48855             :     } 
   48856        1526 :     arg2 = static_cast< GDALAccess >(val2);
   48857             :   }
   48858       21359 :   {
   48859       21359 :     if (!arg1) {
   48860       21359 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   48861             :     }
   48862             :   }
   48863       21359 :   {
   48864       21359 :     const int bLocalUseExceptions = GetUseExceptions();
   48865       21359 :     if ( bLocalUseExceptions ) {
   48866       10369 :       pushErrorHandler();
   48867             :     }
   48868       21359 :     {
   48869       21359 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   48870       21359 :       result = (GDALDatasetShadow *)Open((char const *)arg1,arg2);
   48871       21359 :       SWIG_PYTHON_THREAD_END_ALLOW;
   48872             :     }
   48873       21359 :     if ( bLocalUseExceptions ) {
   48874       10369 :       popErrorHandler();
   48875             :     }
   48876             : #ifndef SED_HACKS
   48877             :     if( result == NULL && bLocalUseExceptions ) {
   48878             :       CPLErr eclass = CPLGetLastErrorType();
   48879             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   48880             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   48881             :       }
   48882             :     }
   48883             : #endif
   48884       21359 :     if( result != NULL && bLocalUseExceptions ) {
   48885             : #ifdef SED_HACKS
   48886       10148 :       bLocalUseExceptionsCode = FALSE;
   48887             : #endif
   48888             :     }
   48889             :   }
   48890       21359 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   48891       21359 :   {
   48892             :     /* %typemap(freearg) (const char *utf8_path) */
   48893       21359 :     GDALPythonFreeCStr(arg1, bToFree1);
   48894             :   }
   48895       21580 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   48896             :   return resultobj;
   48897           1 : fail:
   48898           1 :   {
   48899             :     /* %typemap(freearg) (const char *utf8_path) */
   48900       21360 :     GDALPythonFreeCStr(arg1, bToFree1);
   48901             :   }
   48902             :   return NULL;
   48903             : }
   48904             : 
   48905             : 
   48906        4581 : SWIGINTERN PyObject *_wrap_OpenEx(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   48907        4581 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   48908        4581 :   char *arg1 = (char *) 0 ;
   48909        4581 :   unsigned int arg2 = (unsigned int) 0 ;
   48910        4581 :   char **arg3 = (char **) NULL ;
   48911        4581 :   char **arg4 = (char **) NULL ;
   48912        4581 :   char **arg5 = (char **) NULL ;
   48913        4581 :   int bToFree1 = 0 ;
   48914        4581 :   unsigned int val2 ;
   48915        4581 :   int ecode2 = 0 ;
   48916        4581 :   PyObject * obj0 = 0 ;
   48917        4581 :   PyObject * obj1 = 0 ;
   48918        4581 :   PyObject * obj2 = 0 ;
   48919        4581 :   PyObject * obj3 = 0 ;
   48920        4581 :   PyObject * obj4 = 0 ;
   48921        4581 :   char * kwnames[] = {
   48922             :     (char *)"utf8_path",  (char *)"nOpenFlags",  (char *)"allowed_drivers",  (char *)"open_options",  (char *)"sibling_files",  NULL 
   48923             :   };
   48924        4581 :   GDALDatasetShadow *result = 0 ;
   48925             :   
   48926        4581 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OOOO:OpenEx", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
   48927        4581 :   {
   48928             :     /* %typemap(in) (const char *utf8_path) */
   48929        4581 :     if (PyUnicode_Check(obj0) || PyBytes_Check(obj0))
   48930             :     {
   48931        4278 :       arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
   48932             :     }
   48933             :     else
   48934             :     {
   48935         303 :       arg1 = GDALPythonPathToCStr(obj0, &bToFree1);
   48936             :       
   48937             :     }
   48938        4581 :     if (arg1 == NULL)
   48939             :     {
   48940           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   48941           0 :       SWIG_fail;
   48942             :     }
   48943             :   }
   48944        4581 :   if (obj1) {
   48945        3480 :     ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
   48946        3480 :     if (!SWIG_IsOK(ecode2)) {
   48947           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OpenEx" "', argument " "2"" of type '" "unsigned int""'");
   48948             :     } 
   48949             :     arg2 = static_cast< unsigned int >(val2);
   48950             :   }
   48951        4581 :   if (obj2) {
   48952         511 :     {
   48953             :       /* %typemap(in) char **dict */
   48954         511 :       arg3 = NULL;
   48955         511 :       if ( PySequence_Check( obj2 ) ) {
   48956         511 :         int bErr = FALSE;
   48957         511 :         arg3 = CSLFromPySequence(obj2, &bErr);
   48958         511 :         if ( bErr )
   48959             :         {
   48960           0 :           SWIG_fail;
   48961             :         }
   48962             :       }
   48963           0 :       else if ( PyMapping_Check( obj2 ) ) {
   48964           0 :         int bErr = FALSE;
   48965           0 :         arg3 = CSLFromPyMapping(obj2, &bErr);
   48966           0 :         if ( bErr )
   48967             :         {
   48968           0 :           SWIG_fail;
   48969             :         }
   48970             :       }
   48971             :       else {
   48972           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   48973           0 :         SWIG_fail;
   48974             :       }
   48975             :     }
   48976             :   }
   48977        4581 :   if (obj3) {
   48978        1219 :     {
   48979             :       /* %typemap(in) char **dict */
   48980        1219 :       arg4 = NULL;
   48981        1219 :       if ( PySequence_Check( obj3 ) ) {
   48982        1063 :         int bErr = FALSE;
   48983        1063 :         arg4 = CSLFromPySequence(obj3, &bErr);
   48984        1063 :         if ( bErr )
   48985             :         {
   48986           0 :           SWIG_fail;
   48987             :         }
   48988             :       }
   48989         156 :       else if ( PyMapping_Check( obj3 ) ) {
   48990         156 :         int bErr = FALSE;
   48991         156 :         arg4 = CSLFromPyMapping(obj3, &bErr);
   48992         156 :         if ( bErr )
   48993             :         {
   48994           0 :           SWIG_fail;
   48995             :         }
   48996             :       }
   48997             :       else {
   48998           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   48999           0 :         SWIG_fail;
   49000             :       }
   49001             :     }
   49002             :   }
   49003        4581 :   if (obj4) {
   49004           0 :     {
   49005             :       /* %typemap(in) char **dict */
   49006           0 :       arg5 = NULL;
   49007           0 :       if ( PySequence_Check( obj4 ) ) {
   49008           0 :         int bErr = FALSE;
   49009           0 :         arg5 = CSLFromPySequence(obj4, &bErr);
   49010           0 :         if ( bErr )
   49011             :         {
   49012           0 :           SWIG_fail;
   49013             :         }
   49014             :       }
   49015           0 :       else if ( PyMapping_Check( obj4 ) ) {
   49016           0 :         int bErr = FALSE;
   49017           0 :         arg5 = CSLFromPyMapping(obj4, &bErr);
   49018           0 :         if ( bErr )
   49019             :         {
   49020           0 :           SWIG_fail;
   49021             :         }
   49022             :       }
   49023             :       else {
   49024           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   49025           0 :         SWIG_fail;
   49026             :       }
   49027             :     }
   49028             :   }
   49029        4581 :   {
   49030        4581 :     if (!arg1) {
   49031        4581 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   49032             :     }
   49033             :   }
   49034        4581 :   {
   49035        4581 :     const int bLocalUseExceptions = GetUseExceptions();
   49036        4581 :     if ( bLocalUseExceptions ) {
   49037        1289 :       pushErrorHandler();
   49038             :     }
   49039        4581 :     {
   49040        4581 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   49041        4581 :       result = (GDALDatasetShadow *)OpenEx((char const *)arg1,arg2,arg3,arg4,arg5);
   49042        4581 :       SWIG_PYTHON_THREAD_END_ALLOW;
   49043             :     }
   49044        4581 :     if ( bLocalUseExceptions ) {
   49045        1289 :       popErrorHandler();
   49046             :     }
   49047             : #ifndef SED_HACKS
   49048             :     if( result == NULL && bLocalUseExceptions ) {
   49049             :       CPLErr eclass = CPLGetLastErrorType();
   49050             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   49051             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   49052             :       }
   49053             :     }
   49054             : #endif
   49055        4581 :     if( result != NULL && bLocalUseExceptions ) {
   49056             : #ifdef SED_HACKS
   49057        1242 :       bLocalUseExceptionsCode = FALSE;
   49058             : #endif
   49059             :     }
   49060             :   }
   49061        4581 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   49062        4581 :   {
   49063             :     /* %typemap(freearg) (const char *utf8_path) */
   49064        4581 :     GDALPythonFreeCStr(arg1, bToFree1);
   49065             :   }
   49066        4581 :   {
   49067             :     /* %typemap(freearg) char **dict */
   49068        4581 :     CSLDestroy( arg3 );
   49069             :   }
   49070        4581 :   {
   49071             :     /* %typemap(freearg) char **dict */
   49072        4581 :     CSLDestroy( arg4 );
   49073             :   }
   49074        4581 :   {
   49075             :     /* %typemap(freearg) char **dict */
   49076        4581 :     CSLDestroy( arg5 );
   49077             :   }
   49078        4628 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   49079             :   return resultobj;
   49080           0 : fail:
   49081           0 :   {
   49082             :     /* %typemap(freearg) (const char *utf8_path) */
   49083           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   49084             :   }
   49085           0 :   {
   49086             :     /* %typemap(freearg) char **dict */
   49087           0 :     CSLDestroy( arg3 );
   49088             :   }
   49089           0 :   {
   49090             :     /* %typemap(freearg) char **dict */
   49091           0 :     CSLDestroy( arg4 );
   49092             :   }
   49093           0 :   {
   49094             :     /* %typemap(freearg) char **dict */
   49095           0 :     CSLDestroy( arg5 );
   49096             :   }
   49097             :   return NULL;
   49098             : }
   49099             : 
   49100             : 
   49101        5053 : SWIGINTERN PyObject *_wrap_OpenShared(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   49102        5053 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   49103        5053 :   char *arg1 = (char *) 0 ;
   49104        5053 :   GDALAccess arg2 = (GDALAccess) GA_ReadOnly ;
   49105        5053 :   int bToFree1 = 0 ;
   49106        5053 :   int val2 ;
   49107        5053 :   int ecode2 = 0 ;
   49108        5053 :   PyObject *swig_obj[2] ;
   49109        5053 :   GDALDatasetShadow *result = 0 ;
   49110             :   
   49111        5053 :   if (!SWIG_Python_UnpackTuple(args, "OpenShared", 1, 2, swig_obj)) SWIG_fail;
   49112        5053 :   {
   49113             :     /* %typemap(in) (const char *utf8_path) */
   49114        5053 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   49115             :     {
   49116        5053 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   49117             :     }
   49118             :     else
   49119             :     {
   49120           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   49121             :       
   49122             :     }
   49123        5053 :     if (arg1 == NULL)
   49124             :     {
   49125           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   49126           0 :       SWIG_fail;
   49127             :     }
   49128             :   }
   49129        5053 :   if (swig_obj[1]) {
   49130          50 :     ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   49131          50 :     if (!SWIG_IsOK(ecode2)) {
   49132           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OpenShared" "', argument " "2"" of type '" "GDALAccess""'");
   49133             :     } 
   49134          50 :     arg2 = static_cast< GDALAccess >(val2);
   49135             :   }
   49136        5053 :   {
   49137        5053 :     if (!arg1) {
   49138        5053 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   49139             :     }
   49140             :   }
   49141        5053 :   {
   49142        5053 :     const int bLocalUseExceptions = GetUseExceptions();
   49143        5053 :     if ( bLocalUseExceptions ) {
   49144          51 :       pushErrorHandler();
   49145             :     }
   49146        5053 :     {
   49147        5053 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   49148        5053 :       result = (GDALDatasetShadow *)OpenShared((char const *)arg1,arg2);
   49149        5053 :       SWIG_PYTHON_THREAD_END_ALLOW;
   49150             :     }
   49151        5053 :     if ( bLocalUseExceptions ) {
   49152          51 :       popErrorHandler();
   49153             :     }
   49154             : #ifndef SED_HACKS
   49155             :     if( result == NULL && bLocalUseExceptions ) {
   49156             :       CPLErr eclass = CPLGetLastErrorType();
   49157             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   49158             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   49159             :       }
   49160             :     }
   49161             : #endif
   49162        5053 :     if( result != NULL && bLocalUseExceptions ) {
   49163             : #ifdef SED_HACKS
   49164          51 :       bLocalUseExceptionsCode = FALSE;
   49165             : #endif
   49166             :     }
   49167             :   }
   49168        5053 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   49169        5053 :   {
   49170             :     /* %typemap(freearg) (const char *utf8_path) */
   49171        5053 :     GDALPythonFreeCStr(arg1, bToFree1);
   49172             :   }
   49173        5053 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   49174             :   return resultobj;
   49175           0 : fail:
   49176           0 :   {
   49177             :     /* %typemap(freearg) (const char *utf8_path) */
   49178        5053 :     GDALPythonFreeCStr(arg1, bToFree1);
   49179             :   }
   49180             :   return NULL;
   49181             : }
   49182             : 
   49183             : 
   49184          11 : SWIGINTERN PyObject *_wrap_IdentifyDriver(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   49185          11 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   49186          11 :   char *arg1 = (char *) 0 ;
   49187          11 :   char **arg2 = (char **) NULL ;
   49188          11 :   int bToFree1 = 0 ;
   49189          11 :   PyObject *swig_obj[2] ;
   49190          11 :   GDALDriverShadow *result = 0 ;
   49191             :   
   49192          11 :   if (!SWIG_Python_UnpackTuple(args, "IdentifyDriver", 1, 2, swig_obj)) SWIG_fail;
   49193          11 :   {
   49194             :     /* %typemap(in) (const char *utf8_path) */
   49195          11 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   49196             :     {
   49197          11 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   49198             :     }
   49199             :     else
   49200             :     {
   49201           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   49202             :       
   49203             :     }
   49204          11 :     if (arg1 == NULL)
   49205             :     {
   49206           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   49207           0 :       SWIG_fail;
   49208             :     }
   49209             :   }
   49210          11 :   if (swig_obj[1]) {
   49211           2 :     {
   49212             :       /* %typemap(in) char **dict */
   49213           2 :       arg2 = NULL;
   49214           2 :       if ( PySequence_Check( swig_obj[1] ) ) {
   49215           2 :         int bErr = FALSE;
   49216           2 :         arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   49217           2 :         if ( bErr )
   49218             :         {
   49219           0 :           SWIG_fail;
   49220             :         }
   49221             :       }
   49222           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   49223           0 :         int bErr = FALSE;
   49224           0 :         arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   49225           0 :         if ( bErr )
   49226             :         {
   49227           0 :           SWIG_fail;
   49228             :         }
   49229             :       }
   49230             :       else {
   49231           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   49232           0 :         SWIG_fail;
   49233             :       }
   49234             :     }
   49235             :   }
   49236          11 :   {
   49237          11 :     if (!arg1) {
   49238          11 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   49239             :     }
   49240             :   }
   49241          11 :   {
   49242          11 :     const int bLocalUseExceptions = GetUseExceptions();
   49243          11 :     if ( bLocalUseExceptions ) {
   49244           6 :       pushErrorHandler();
   49245             :     }
   49246          11 :     {
   49247          11 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   49248          11 :       result = (GDALDriverShadow *)IdentifyDriver((char const *)arg1,arg2);
   49249          11 :       SWIG_PYTHON_THREAD_END_ALLOW;
   49250             :     }
   49251          11 :     if ( bLocalUseExceptions ) {
   49252           6 :       popErrorHandler();
   49253             :     }
   49254             : #ifndef SED_HACKS
   49255             :     if ( bLocalUseExceptions ) {
   49256             :       CPLErr eclass = CPLGetLastErrorType();
   49257             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   49258             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   49259             :       }
   49260             :     }
   49261             : #endif
   49262             :   }
   49263          11 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   49264          11 :   {
   49265             :     /* %typemap(freearg) (const char *utf8_path) */
   49266          11 :     GDALPythonFreeCStr(arg1, bToFree1);
   49267             :   }
   49268          11 :   {
   49269             :     /* %typemap(freearg) char **dict */
   49270          11 :     CSLDestroy( arg2 );
   49271             :   }
   49272          11 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   49273             :   return resultobj;
   49274           0 : fail:
   49275           0 :   {
   49276             :     /* %typemap(freearg) (const char *utf8_path) */
   49277           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   49278             :   }
   49279           0 :   {
   49280             :     /* %typemap(freearg) char **dict */
   49281           0 :     CSLDestroy( arg2 );
   49282             :   }
   49283             :   return NULL;
   49284             : }
   49285             : 
   49286             : 
   49287           6 : SWIGINTERN PyObject *_wrap_IdentifyDriverEx(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   49288           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   49289           6 :   char *arg1 = (char *) 0 ;
   49290           6 :   unsigned int arg2 = (unsigned int) 0 ;
   49291           6 :   char **arg3 = (char **) NULL ;
   49292           6 :   char **arg4 = (char **) NULL ;
   49293           6 :   int bToFree1 = 0 ;
   49294           6 :   unsigned int val2 ;
   49295           6 :   int ecode2 = 0 ;
   49296           6 :   PyObject * obj0 = 0 ;
   49297           6 :   PyObject * obj1 = 0 ;
   49298           6 :   PyObject * obj2 = 0 ;
   49299           6 :   PyObject * obj3 = 0 ;
   49300           6 :   char * kwnames[] = {
   49301             :     (char *)"utf8_path",  (char *)"nIdentifyFlags",  (char *)"allowed_drivers",  (char *)"sibling_files",  NULL 
   49302             :   };
   49303           6 :   GDALDriverShadow *result = 0 ;
   49304             :   
   49305           6 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OOO:IdentifyDriverEx", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
   49306           6 :   {
   49307             :     /* %typemap(in) (const char *utf8_path) */
   49308           6 :     if (PyUnicode_Check(obj0) || PyBytes_Check(obj0))
   49309             :     {
   49310           6 :       arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
   49311             :     }
   49312             :     else
   49313             :     {
   49314           0 :       arg1 = GDALPythonPathToCStr(obj0, &bToFree1);
   49315             :       
   49316             :     }
   49317           6 :     if (arg1 == NULL)
   49318             :     {
   49319           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   49320           0 :       SWIG_fail;
   49321             :     }
   49322             :   }
   49323           6 :   if (obj1) {
   49324           2 :     ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
   49325           2 :     if (!SWIG_IsOK(ecode2)) {
   49326           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IdentifyDriverEx" "', argument " "2"" of type '" "unsigned int""'");
   49327             :     } 
   49328             :     arg2 = static_cast< unsigned int >(val2);
   49329             :   }
   49330           6 :   if (obj2) {
   49331           1 :     {
   49332             :       /* %typemap(in) char **dict */
   49333           1 :       arg3 = NULL;
   49334           1 :       if ( PySequence_Check( obj2 ) ) {
   49335           1 :         int bErr = FALSE;
   49336           1 :         arg3 = CSLFromPySequence(obj2, &bErr);
   49337           1 :         if ( bErr )
   49338             :         {
   49339           0 :           SWIG_fail;
   49340             :         }
   49341             :       }
   49342           0 :       else if ( PyMapping_Check( obj2 ) ) {
   49343           0 :         int bErr = FALSE;
   49344           0 :         arg3 = CSLFromPyMapping(obj2, &bErr);
   49345           0 :         if ( bErr )
   49346             :         {
   49347           0 :           SWIG_fail;
   49348             :         }
   49349             :       }
   49350             :       else {
   49351           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   49352           0 :         SWIG_fail;
   49353             :       }
   49354             :     }
   49355             :   }
   49356           6 :   if (obj3) {
   49357           2 :     {
   49358             :       /* %typemap(in) char **dict */
   49359           2 :       arg4 = NULL;
   49360           2 :       if ( PySequence_Check( obj3 ) ) {
   49361           2 :         int bErr = FALSE;
   49362           2 :         arg4 = CSLFromPySequence(obj3, &bErr);
   49363           2 :         if ( bErr )
   49364             :         {
   49365           0 :           SWIG_fail;
   49366             :         }
   49367             :       }
   49368           0 :       else if ( PyMapping_Check( obj3 ) ) {
   49369           0 :         int bErr = FALSE;
   49370           0 :         arg4 = CSLFromPyMapping(obj3, &bErr);
   49371           0 :         if ( bErr )
   49372             :         {
   49373           0 :           SWIG_fail;
   49374             :         }
   49375             :       }
   49376             :       else {
   49377           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   49378           0 :         SWIG_fail;
   49379             :       }
   49380             :     }
   49381             :   }
   49382           6 :   {
   49383           6 :     if (!arg1) {
   49384           6 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   49385             :     }
   49386             :   }
   49387           6 :   {
   49388           6 :     const int bLocalUseExceptions = GetUseExceptions();
   49389           6 :     if ( bLocalUseExceptions ) {
   49390           6 :       pushErrorHandler();
   49391             :     }
   49392           6 :     {
   49393           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   49394           6 :       result = (GDALDriverShadow *)IdentifyDriverEx((char const *)arg1,arg2,arg3,arg4);
   49395           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   49396             :     }
   49397           6 :     if ( bLocalUseExceptions ) {
   49398           6 :       popErrorHandler();
   49399             :     }
   49400             : #ifndef SED_HACKS
   49401             :     if ( bLocalUseExceptions ) {
   49402             :       CPLErr eclass = CPLGetLastErrorType();
   49403             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   49404             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   49405             :       }
   49406             :     }
   49407             : #endif
   49408             :   }
   49409           6 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   49410           6 :   {
   49411             :     /* %typemap(freearg) (const char *utf8_path) */
   49412           6 :     GDALPythonFreeCStr(arg1, bToFree1);
   49413             :   }
   49414           6 :   {
   49415             :     /* %typemap(freearg) char **dict */
   49416           6 :     CSLDestroy( arg3 );
   49417             :   }
   49418           6 :   {
   49419             :     /* %typemap(freearg) char **dict */
   49420           6 :     CSLDestroy( arg4 );
   49421             :   }
   49422           6 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   49423             :   return resultobj;
   49424           0 : fail:
   49425           0 :   {
   49426             :     /* %typemap(freearg) (const char *utf8_path) */
   49427           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   49428             :   }
   49429           0 :   {
   49430             :     /* %typemap(freearg) char **dict */
   49431           0 :     CSLDestroy( arg3 );
   49432             :   }
   49433           0 :   {
   49434             :     /* %typemap(freearg) char **dict */
   49435           0 :     CSLDestroy( arg4 );
   49436             :   }
   49437             :   return NULL;
   49438             : }
   49439             : 
   49440             : 
   49441         190 : SWIGINTERN PyObject *_wrap_GeneralCmdLineProcessor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   49442         190 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   49443         190 :   char **arg1 = (char **) 0 ;
   49444         190 :   int arg2 = (int) 0 ;
   49445         190 :   int val2 ;
   49446         190 :   int ecode2 = 0 ;
   49447         190 :   PyObject *swig_obj[2] ;
   49448         190 :   char **result = 0 ;
   49449             :   
   49450         190 :   if (!SWIG_Python_UnpackTuple(args, "GeneralCmdLineProcessor", 1, 2, swig_obj)) SWIG_fail;
   49451         190 :   {
   49452             :     /* %typemap(in) char **dict */
   49453         190 :     arg1 = NULL;
   49454         190 :     if ( PySequence_Check( swig_obj[0] ) ) {
   49455         190 :       int bErr = FALSE;
   49456         190 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   49457         190 :       if ( bErr )
   49458             :       {
   49459           0 :         SWIG_fail;
   49460             :       }
   49461             :     }
   49462           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   49463           0 :       int bErr = FALSE;
   49464           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   49465           0 :       if ( bErr )
   49466             :       {
   49467           0 :         SWIG_fail;
   49468             :       }
   49469             :     }
   49470             :     else {
   49471           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   49472           0 :       SWIG_fail;
   49473             :     }
   49474             :   }
   49475         190 :   if (swig_obj[1]) {
   49476           0 :     ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   49477           0 :     if (!SWIG_IsOK(ecode2)) {
   49478           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GeneralCmdLineProcessor" "', argument " "2"" of type '" "int""'");
   49479             :     } 
   49480             :     arg2 = static_cast< int >(val2);
   49481             :   }
   49482         190 :   {
   49483         190 :     const int bLocalUseExceptions = GetUseExceptions();
   49484         190 :     if ( bLocalUseExceptions ) {
   49485         167 :       pushErrorHandler();
   49486             :     }
   49487         190 :     {
   49488         190 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   49489         190 :       result = (char **)GeneralCmdLineProcessor(arg1,arg2);
   49490         190 :       SWIG_PYTHON_THREAD_END_ALLOW;
   49491             :     }
   49492         190 :     if ( bLocalUseExceptions ) {
   49493         167 :       popErrorHandler();
   49494             :     }
   49495             : #ifndef SED_HACKS
   49496             :     if ( bLocalUseExceptions ) {
   49497             :       CPLErr eclass = CPLGetLastErrorType();
   49498             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   49499             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   49500             :       }
   49501             :     }
   49502             : #endif
   49503             :   }
   49504         190 :   {
   49505             :     /* %typemap(out) char **CSL -> ( string ) */
   49506         190 :     bool bErr = false;
   49507         190 :     resultobj = CSLToList(result, &bErr);
   49508         190 :     CSLDestroy(result);
   49509         190 :     if( bErr ) {
   49510           0 :       SWIG_fail;
   49511             :     }
   49512             :   }
   49513         190 :   {
   49514             :     /* %typemap(freearg) char **dict */
   49515         190 :     CSLDestroy( arg1 );
   49516             :   }
   49517         190 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   49518             :   return resultobj;
   49519           0 : fail:
   49520           0 :   {
   49521             :     /* %typemap(freearg) char **dict */
   49522           0 :     CSLDestroy( arg1 );
   49523             :   }
   49524             :   return NULL;
   49525             : }
   49526             : 
   49527             : 
   49528          44 : SWIGINTERN PyObject *_wrap_new_GDALInfoOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   49529          44 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   49530          44 :   char **arg1 = (char **) 0 ;
   49531          44 :   PyObject *swig_obj[1] ;
   49532          44 :   GDALInfoOptions *result = 0 ;
   49533             :   
   49534          44 :   if (!args) SWIG_fail;
   49535          44 :   swig_obj[0] = args;
   49536          44 :   {
   49537             :     /* %typemap(in) char **dict */
   49538          44 :     arg1 = NULL;
   49539          44 :     if ( PySequence_Check( swig_obj[0] ) ) {
   49540          44 :       int bErr = FALSE;
   49541          44 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   49542          44 :       if ( bErr )
   49543             :       {
   49544           0 :         SWIG_fail;
   49545             :       }
   49546             :     }
   49547           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   49548           0 :       int bErr = FALSE;
   49549           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   49550           0 :       if ( bErr )
   49551             :       {
   49552           0 :         SWIG_fail;
   49553             :       }
   49554             :     }
   49555             :     else {
   49556           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   49557           0 :       SWIG_fail;
   49558             :     }
   49559             :   }
   49560          44 :   {
   49561          44 :     const int bLocalUseExceptions = GetUseExceptions();
   49562          44 :     if ( bLocalUseExceptions ) {
   49563          37 :       pushErrorHandler();
   49564             :     }
   49565          44 :     {
   49566          44 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   49567          44 :       result = (GDALInfoOptions *)new_GDALInfoOptions(arg1);
   49568          44 :       SWIG_PYTHON_THREAD_END_ALLOW;
   49569             :     }
   49570          44 :     if ( bLocalUseExceptions ) {
   49571          37 :       popErrorHandler();
   49572             :     }
   49573             : #ifndef SED_HACKS
   49574             :     if ( bLocalUseExceptions ) {
   49575             :       CPLErr eclass = CPLGetLastErrorType();
   49576             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   49577             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   49578             :       }
   49579             :     }
   49580             : #endif
   49581             :   }
   49582          44 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALInfoOptions, SWIG_POINTER_NEW |  0 );
   49583          44 :   {
   49584             :     /* %typemap(freearg) char **dict */
   49585          44 :     CSLDestroy( arg1 );
   49586             :   }
   49587          44 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   49588             :   return resultobj;
   49589           0 : fail:
   49590           0 :   {
   49591             :     /* %typemap(freearg) char **dict */
   49592           0 :     CSLDestroy( arg1 );
   49593             :   }
   49594             :   return NULL;
   49595             : }
   49596             : 
   49597             : 
   49598          44 : SWIGINTERN PyObject *_wrap_delete_GDALInfoOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   49599          44 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   49600          44 :   GDALInfoOptions *arg1 = (GDALInfoOptions *) 0 ;
   49601          44 :   void *argp1 = 0 ;
   49602          44 :   int res1 = 0 ;
   49603          44 :   PyObject *swig_obj[1] ;
   49604             :   
   49605          44 :   if (!args) SWIG_fail;
   49606          44 :   swig_obj[0] = args;
   49607          44 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALInfoOptions, SWIG_POINTER_DISOWN |  0 );
   49608          44 :   if (!SWIG_IsOK(res1)) {
   49609           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALInfoOptions" "', argument " "1"" of type '" "GDALInfoOptions *""'"); 
   49610             :   }
   49611          44 :   arg1 = reinterpret_cast< GDALInfoOptions * >(argp1);
   49612          44 :   {
   49613          44 :     const int bLocalUseExceptions = GetUseExceptions();
   49614          44 :     if ( bLocalUseExceptions ) {
   49615          37 :       pushErrorHandler();
   49616             :     }
   49617          44 :     {
   49618          44 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   49619          44 :       delete_GDALInfoOptions(arg1);
   49620          44 :       SWIG_PYTHON_THREAD_END_ALLOW;
   49621             :     }
   49622          44 :     if ( bLocalUseExceptions ) {
   49623          37 :       popErrorHandler();
   49624             :     }
   49625             : #ifndef SED_HACKS
   49626             :     if ( bLocalUseExceptions ) {
   49627             :       CPLErr eclass = CPLGetLastErrorType();
   49628             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   49629             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   49630             :       }
   49631             :     }
   49632             : #endif
   49633             :   }
   49634          44 :   resultobj = SWIG_Py_Void();
   49635          44 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   49636             :   return resultobj;
   49637             : fail:
   49638             :   return NULL;
   49639             : }
   49640             : 
   49641             : 
   49642         271 : SWIGINTERN PyObject *GDALInfoOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   49643         271 :   PyObject *obj;
   49644         271 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   49645         271 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALInfoOptions, SWIG_NewClientData(obj));
   49646         271 :   return SWIG_Py_Void();
   49647             : }
   49648             : 
   49649          44 : SWIGINTERN PyObject *GDALInfoOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   49650          44 :   return SWIG_Python_InitShadowInstance(args);
   49651             : }
   49652             : 
   49653          44 : SWIGINTERN PyObject *_wrap_InfoInternal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   49654          44 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   49655          44 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   49656          44 :   GDALInfoOptions *arg2 = (GDALInfoOptions *) 0 ;
   49657          44 :   void *argp1 = 0 ;
   49658          44 :   int res1 = 0 ;
   49659          44 :   void *argp2 = 0 ;
   49660          44 :   int res2 = 0 ;
   49661          44 :   PyObject *swig_obj[2] ;
   49662          44 :   retStringAndCPLFree *result = 0 ;
   49663             :   
   49664          44 :   if (!SWIG_Python_UnpackTuple(args, "InfoInternal", 2, 2, swig_obj)) SWIG_fail;
   49665          44 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   49666          44 :   if (!SWIG_IsOK(res1)) {
   49667           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InfoInternal" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   49668             :   }
   49669          44 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   49670          44 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALInfoOptions, 0 |  0 );
   49671          44 :   if (!SWIG_IsOK(res2)) {
   49672           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "InfoInternal" "', argument " "2"" of type '" "GDALInfoOptions *""'"); 
   49673             :   }
   49674          44 :   arg2 = reinterpret_cast< GDALInfoOptions * >(argp2);
   49675          44 :   {
   49676          44 :     const int bLocalUseExceptions = GetUseExceptions();
   49677          44 :     if ( bLocalUseExceptions ) {
   49678          37 :       pushErrorHandler();
   49679             :     }
   49680          44 :     {
   49681          44 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   49682          44 :       result = (retStringAndCPLFree *)GDALInfo(arg1,arg2);
   49683          44 :       SWIG_PYTHON_THREAD_END_ALLOW;
   49684             :     }
   49685          44 :     if ( bLocalUseExceptions ) {
   49686          37 :       popErrorHandler();
   49687             :     }
   49688             : #ifndef SED_HACKS
   49689             :     if ( bLocalUseExceptions ) {
   49690             :       CPLErr eclass = CPLGetLastErrorType();
   49691             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   49692             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   49693             :       }
   49694             :     }
   49695             : #endif
   49696             :   }
   49697          44 :   {
   49698             :     /* %typemap(out) (retStringAndCPLFree*) */
   49699          44 :     Py_XDECREF(resultobj);
   49700          44 :     if(result)
   49701             :     {
   49702          44 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   49703          44 :       CPLFree(result);
   49704             :     }
   49705             :     else
   49706             :     {
   49707           0 :       resultobj = Py_None;
   49708           0 :       Py_INCREF(resultobj);
   49709             :     }
   49710             :   }
   49711          44 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   49712             :   return resultobj;
   49713             : fail:
   49714             :   return NULL;
   49715             : }
   49716             : 
   49717             : 
   49718          33 : SWIGINTERN PyObject *_wrap_new_GDALVectorInfoOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   49719          33 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   49720          33 :   char **arg1 = (char **) 0 ;
   49721          33 :   PyObject *swig_obj[1] ;
   49722          33 :   GDALVectorInfoOptions *result = 0 ;
   49723             :   
   49724          33 :   if (!args) SWIG_fail;
   49725          33 :   swig_obj[0] = args;
   49726          33 :   {
   49727             :     /* %typemap(in) char **dict */
   49728          33 :     arg1 = NULL;
   49729          33 :     if ( PySequence_Check( swig_obj[0] ) ) {
   49730          33 :       int bErr = FALSE;
   49731          33 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   49732          33 :       if ( bErr )
   49733             :       {
   49734           0 :         SWIG_fail;
   49735             :       }
   49736             :     }
   49737           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   49738           0 :       int bErr = FALSE;
   49739           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   49740           0 :       if ( bErr )
   49741             :       {
   49742           0 :         SWIG_fail;
   49743             :       }
   49744             :     }
   49745             :     else {
   49746           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   49747           0 :       SWIG_fail;
   49748             :     }
   49749             :   }
   49750          33 :   {
   49751          33 :     const int bLocalUseExceptions = GetUseExceptions();
   49752          33 :     if ( bLocalUseExceptions ) {
   49753          31 :       pushErrorHandler();
   49754             :     }
   49755          33 :     {
   49756          33 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   49757          33 :       result = (GDALVectorInfoOptions *)new_GDALVectorInfoOptions(arg1);
   49758          33 :       SWIG_PYTHON_THREAD_END_ALLOW;
   49759             :     }
   49760          33 :     if ( bLocalUseExceptions ) {
   49761          31 :       popErrorHandler();
   49762             :     }
   49763             : #ifndef SED_HACKS
   49764             :     if ( bLocalUseExceptions ) {
   49765             :       CPLErr eclass = CPLGetLastErrorType();
   49766             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   49767             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   49768             :       }
   49769             :     }
   49770             : #endif
   49771             :   }
   49772          33 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALVectorInfoOptions, SWIG_POINTER_NEW |  0 );
   49773          33 :   {
   49774             :     /* %typemap(freearg) char **dict */
   49775          33 :     CSLDestroy( arg1 );
   49776             :   }
   49777          33 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   49778             :   return resultobj;
   49779           0 : fail:
   49780           0 :   {
   49781             :     /* %typemap(freearg) char **dict */
   49782           0 :     CSLDestroy( arg1 );
   49783             :   }
   49784             :   return NULL;
   49785             : }
   49786             : 
   49787             : 
   49788          33 : SWIGINTERN PyObject *_wrap_delete_GDALVectorInfoOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   49789          33 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   49790          33 :   GDALVectorInfoOptions *arg1 = (GDALVectorInfoOptions *) 0 ;
   49791          33 :   void *argp1 = 0 ;
   49792          33 :   int res1 = 0 ;
   49793          33 :   PyObject *swig_obj[1] ;
   49794             :   
   49795          33 :   if (!args) SWIG_fail;
   49796          33 :   swig_obj[0] = args;
   49797          33 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALVectorInfoOptions, SWIG_POINTER_DISOWN |  0 );
   49798          33 :   if (!SWIG_IsOK(res1)) {
   49799           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALVectorInfoOptions" "', argument " "1"" of type '" "GDALVectorInfoOptions *""'"); 
   49800             :   }
   49801          33 :   arg1 = reinterpret_cast< GDALVectorInfoOptions * >(argp1);
   49802          33 :   {
   49803          33 :     const int bLocalUseExceptions = GetUseExceptions();
   49804          33 :     if ( bLocalUseExceptions ) {
   49805          31 :       pushErrorHandler();
   49806             :     }
   49807          33 :     {
   49808          33 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   49809          33 :       delete_GDALVectorInfoOptions(arg1);
   49810          33 :       SWIG_PYTHON_THREAD_END_ALLOW;
   49811             :     }
   49812          33 :     if ( bLocalUseExceptions ) {
   49813          31 :       popErrorHandler();
   49814             :     }
   49815             : #ifndef SED_HACKS
   49816             :     if ( bLocalUseExceptions ) {
   49817             :       CPLErr eclass = CPLGetLastErrorType();
   49818             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   49819             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   49820             :       }
   49821             :     }
   49822             : #endif
   49823             :   }
   49824          33 :   resultobj = SWIG_Py_Void();
   49825          33 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   49826             :   return resultobj;
   49827             : fail:
   49828             :   return NULL;
   49829             : }
   49830             : 
   49831             : 
   49832         271 : SWIGINTERN PyObject *GDALVectorInfoOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   49833         271 :   PyObject *obj;
   49834         271 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   49835         271 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALVectorInfoOptions, SWIG_NewClientData(obj));
   49836         271 :   return SWIG_Py_Void();
   49837             : }
   49838             : 
   49839          33 : SWIGINTERN PyObject *GDALVectorInfoOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   49840          33 :   return SWIG_Python_InitShadowInstance(args);
   49841             : }
   49842             : 
   49843          33 : SWIGINTERN PyObject *_wrap_VectorInfoInternal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   49844          33 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   49845          33 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   49846          33 :   GDALVectorInfoOptions *arg2 = (GDALVectorInfoOptions *) 0 ;
   49847          33 :   void *argp1 = 0 ;
   49848          33 :   int res1 = 0 ;
   49849          33 :   void *argp2 = 0 ;
   49850          33 :   int res2 = 0 ;
   49851          33 :   PyObject *swig_obj[2] ;
   49852          33 :   retStringAndCPLFree *result = 0 ;
   49853             :   
   49854          33 :   if (!SWIG_Python_UnpackTuple(args, "VectorInfoInternal", 2, 2, swig_obj)) SWIG_fail;
   49855          33 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   49856          33 :   if (!SWIG_IsOK(res1)) {
   49857           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorInfoInternal" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   49858             :   }
   49859          33 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   49860          33 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALVectorInfoOptions, 0 |  0 );
   49861          33 :   if (!SWIG_IsOK(res2)) {
   49862           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VectorInfoInternal" "', argument " "2"" of type '" "GDALVectorInfoOptions *""'"); 
   49863             :   }
   49864          33 :   arg2 = reinterpret_cast< GDALVectorInfoOptions * >(argp2);
   49865          33 :   {
   49866          33 :     const int bLocalUseExceptions = GetUseExceptions();
   49867          33 :     if ( bLocalUseExceptions ) {
   49868          31 :       pushErrorHandler();
   49869             :     }
   49870          33 :     {
   49871          33 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   49872          33 :       result = (retStringAndCPLFree *)GDALVectorInfo(arg1,arg2);
   49873          33 :       SWIG_PYTHON_THREAD_END_ALLOW;
   49874             :     }
   49875          33 :     if ( bLocalUseExceptions ) {
   49876          31 :       popErrorHandler();
   49877             :     }
   49878             : #ifndef SED_HACKS
   49879             :     if ( bLocalUseExceptions ) {
   49880             :       CPLErr eclass = CPLGetLastErrorType();
   49881             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   49882             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   49883             :       }
   49884             :     }
   49885             : #endif
   49886             :   }
   49887          33 :   {
   49888             :     /* %typemap(out) (retStringAndCPLFree*) */
   49889          33 :     Py_XDECREF(resultobj);
   49890          33 :     if(result)
   49891             :     {
   49892          32 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   49893          32 :       CPLFree(result);
   49894             :     }
   49895             :     else
   49896             :     {
   49897           1 :       resultobj = Py_None;
   49898           1 :       Py_INCREF(resultobj);
   49899             :     }
   49900             :   }
   49901          34 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   49902             :   return resultobj;
   49903             : fail:
   49904             :   return NULL;
   49905             : }
   49906             : 
   49907             : 
   49908          21 : SWIGINTERN PyObject *_wrap_new_GDALMultiDimInfoOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   49909          21 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   49910          21 :   char **arg1 = (char **) 0 ;
   49911          21 :   PyObject *swig_obj[1] ;
   49912          21 :   GDALMultiDimInfoOptions *result = 0 ;
   49913             :   
   49914          21 :   if (!args) SWIG_fail;
   49915          21 :   swig_obj[0] = args;
   49916          21 :   {
   49917             :     /* %typemap(in) char **dict */
   49918          21 :     arg1 = NULL;
   49919          21 :     if ( PySequence_Check( swig_obj[0] ) ) {
   49920          21 :       int bErr = FALSE;
   49921          21 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   49922          21 :       if ( bErr )
   49923             :       {
   49924           0 :         SWIG_fail;
   49925             :       }
   49926             :     }
   49927           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   49928           0 :       int bErr = FALSE;
   49929           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   49930           0 :       if ( bErr )
   49931             :       {
   49932           0 :         SWIG_fail;
   49933             :       }
   49934             :     }
   49935             :     else {
   49936           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   49937           0 :       SWIG_fail;
   49938             :     }
   49939             :   }
   49940          21 :   {
   49941          21 :     const int bLocalUseExceptions = GetUseExceptions();
   49942          21 :     if ( bLocalUseExceptions ) {
   49943          15 :       pushErrorHandler();
   49944             :     }
   49945          21 :     {
   49946          21 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   49947          21 :       result = (GDALMultiDimInfoOptions *)new_GDALMultiDimInfoOptions(arg1);
   49948          21 :       SWIG_PYTHON_THREAD_END_ALLOW;
   49949             :     }
   49950          21 :     if ( bLocalUseExceptions ) {
   49951          15 :       popErrorHandler();
   49952             :     }
   49953             : #ifndef SED_HACKS
   49954             :     if ( bLocalUseExceptions ) {
   49955             :       CPLErr eclass = CPLGetLastErrorType();
   49956             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   49957             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   49958             :       }
   49959             :     }
   49960             : #endif
   49961             :   }
   49962          21 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMultiDimInfoOptions, SWIG_POINTER_NEW |  0 );
   49963          21 :   {
   49964             :     /* %typemap(freearg) char **dict */
   49965          21 :     CSLDestroy( arg1 );
   49966             :   }
   49967          21 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   49968             :   return resultobj;
   49969           0 : fail:
   49970           0 :   {
   49971             :     /* %typemap(freearg) char **dict */
   49972           0 :     CSLDestroy( arg1 );
   49973             :   }
   49974             :   return NULL;
   49975             : }
   49976             : 
   49977             : 
   49978          21 : SWIGINTERN PyObject *_wrap_delete_GDALMultiDimInfoOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   49979          21 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   49980          21 :   GDALMultiDimInfoOptions *arg1 = (GDALMultiDimInfoOptions *) 0 ;
   49981          21 :   void *argp1 = 0 ;
   49982          21 :   int res1 = 0 ;
   49983          21 :   PyObject *swig_obj[1] ;
   49984             :   
   49985          21 :   if (!args) SWIG_fail;
   49986          21 :   swig_obj[0] = args;
   49987          21 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMultiDimInfoOptions, SWIG_POINTER_DISOWN |  0 );
   49988          21 :   if (!SWIG_IsOK(res1)) {
   49989           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALMultiDimInfoOptions" "', argument " "1"" of type '" "GDALMultiDimInfoOptions *""'"); 
   49990             :   }
   49991          21 :   arg1 = reinterpret_cast< GDALMultiDimInfoOptions * >(argp1);
   49992          21 :   {
   49993          21 :     const int bLocalUseExceptions = GetUseExceptions();
   49994          21 :     if ( bLocalUseExceptions ) {
   49995          15 :       pushErrorHandler();
   49996             :     }
   49997          21 :     {
   49998          21 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   49999          21 :       delete_GDALMultiDimInfoOptions(arg1);
   50000          21 :       SWIG_PYTHON_THREAD_END_ALLOW;
   50001             :     }
   50002          21 :     if ( bLocalUseExceptions ) {
   50003          15 :       popErrorHandler();
   50004             :     }
   50005             : #ifndef SED_HACKS
   50006             :     if ( bLocalUseExceptions ) {
   50007             :       CPLErr eclass = CPLGetLastErrorType();
   50008             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   50009             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   50010             :       }
   50011             :     }
   50012             : #endif
   50013             :   }
   50014          21 :   resultobj = SWIG_Py_Void();
   50015          21 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   50016             :   return resultobj;
   50017             : fail:
   50018             :   return NULL;
   50019             : }
   50020             : 
   50021             : 
   50022         271 : SWIGINTERN PyObject *GDALMultiDimInfoOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   50023         271 :   PyObject *obj;
   50024         271 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   50025         271 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALMultiDimInfoOptions, SWIG_NewClientData(obj));
   50026         271 :   return SWIG_Py_Void();
   50027             : }
   50028             : 
   50029          21 : SWIGINTERN PyObject *GDALMultiDimInfoOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   50030          21 :   return SWIG_Python_InitShadowInstance(args);
   50031             : }
   50032             : 
   50033          20 : SWIGINTERN PyObject *_wrap_MultiDimInfoInternal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   50034          20 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   50035          20 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   50036          20 :   GDALMultiDimInfoOptions *arg2 = (GDALMultiDimInfoOptions *) 0 ;
   50037          20 :   void *argp1 = 0 ;
   50038          20 :   int res1 = 0 ;
   50039          20 :   void *argp2 = 0 ;
   50040          20 :   int res2 = 0 ;
   50041          20 :   PyObject *swig_obj[2] ;
   50042          20 :   retStringAndCPLFree *result = 0 ;
   50043             :   
   50044          20 :   if (!SWIG_Python_UnpackTuple(args, "MultiDimInfoInternal", 2, 2, swig_obj)) SWIG_fail;
   50045          20 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   50046          20 :   if (!SWIG_IsOK(res1)) {
   50047           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiDimInfoInternal" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   50048             :   }
   50049          20 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   50050          20 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALMultiDimInfoOptions, 0 |  0 );
   50051          20 :   if (!SWIG_IsOK(res2)) {
   50052           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MultiDimInfoInternal" "', argument " "2"" of type '" "GDALMultiDimInfoOptions *""'"); 
   50053             :   }
   50054          20 :   arg2 = reinterpret_cast< GDALMultiDimInfoOptions * >(argp2);
   50055          20 :   {
   50056          20 :     const int bLocalUseExceptions = GetUseExceptions();
   50057          20 :     if ( bLocalUseExceptions ) {
   50058          14 :       pushErrorHandler();
   50059             :     }
   50060          20 :     {
   50061          20 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   50062          20 :       result = (retStringAndCPLFree *)GDALMultiDimInfo(arg1,arg2);
   50063          20 :       SWIG_PYTHON_THREAD_END_ALLOW;
   50064             :     }
   50065          20 :     if ( bLocalUseExceptions ) {
   50066          14 :       popErrorHandler();
   50067             :     }
   50068             : #ifndef SED_HACKS
   50069             :     if ( bLocalUseExceptions ) {
   50070             :       CPLErr eclass = CPLGetLastErrorType();
   50071             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   50072             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   50073             :       }
   50074             :     }
   50075             : #endif
   50076             :   }
   50077          20 :   {
   50078             :     /* %typemap(out) (retStringAndCPLFree*) */
   50079          20 :     Py_XDECREF(resultobj);
   50080          20 :     if(result)
   50081             :     {
   50082          19 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   50083          19 :       CPLFree(result);
   50084             :     }
   50085             :     else
   50086             :     {
   50087           1 :       resultobj = Py_None;
   50088           1 :       Py_INCREF(resultobj);
   50089             :     }
   50090             :   }
   50091          20 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   50092             :   return resultobj;
   50093             : fail:
   50094             :   return NULL;
   50095             : }
   50096             : 
   50097             : 
   50098         969 : SWIGINTERN PyObject *_wrap_new_GDALTranslateOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   50099         969 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   50100         969 :   char **arg1 = (char **) 0 ;
   50101         969 :   PyObject *swig_obj[1] ;
   50102         969 :   GDALTranslateOptions *result = 0 ;
   50103             :   
   50104         969 :   if (!args) SWIG_fail;
   50105         969 :   swig_obj[0] = args;
   50106         969 :   {
   50107             :     /* %typemap(in) char **dict */
   50108         969 :     arg1 = NULL;
   50109         969 :     if ( PySequence_Check( swig_obj[0] ) ) {
   50110         969 :       int bErr = FALSE;
   50111         969 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   50112         969 :       if ( bErr )
   50113             :       {
   50114           0 :         SWIG_fail;
   50115             :       }
   50116             :     }
   50117           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   50118           0 :       int bErr = FALSE;
   50119           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   50120           0 :       if ( bErr )
   50121             :       {
   50122           0 :         SWIG_fail;
   50123             :       }
   50124             :     }
   50125             :     else {
   50126           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   50127           0 :       SWIG_fail;
   50128             :     }
   50129             :   }
   50130         969 :   {
   50131         969 :     const int bLocalUseExceptions = GetUseExceptions();
   50132         969 :     if ( bLocalUseExceptions ) {
   50133         404 :       pushErrorHandler();
   50134             :     }
   50135         969 :     {
   50136         969 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   50137         969 :       result = (GDALTranslateOptions *)new_GDALTranslateOptions(arg1);
   50138         969 :       SWIG_PYTHON_THREAD_END_ALLOW;
   50139             :     }
   50140         969 :     if ( bLocalUseExceptions ) {
   50141         404 :       popErrorHandler();
   50142             :     }
   50143             : #ifndef SED_HACKS
   50144             :     if ( bLocalUseExceptions ) {
   50145             :       CPLErr eclass = CPLGetLastErrorType();
   50146             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   50147             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   50148             :       }
   50149             :     }
   50150             : #endif
   50151             :   }
   50152         969 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALTranslateOptions, SWIG_POINTER_NEW |  0 );
   50153         969 :   {
   50154             :     /* %typemap(freearg) char **dict */
   50155         969 :     CSLDestroy( arg1 );
   50156             :   }
   50157         973 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   50158             :   return resultobj;
   50159           0 : fail:
   50160           0 :   {
   50161             :     /* %typemap(freearg) char **dict */
   50162           0 :     CSLDestroy( arg1 );
   50163             :   }
   50164             :   return NULL;
   50165             : }
   50166             : 
   50167             : 
   50168         965 : SWIGINTERN PyObject *_wrap_delete_GDALTranslateOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   50169         965 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   50170         965 :   GDALTranslateOptions *arg1 = (GDALTranslateOptions *) 0 ;
   50171         965 :   void *argp1 = 0 ;
   50172         965 :   int res1 = 0 ;
   50173         965 :   PyObject *swig_obj[1] ;
   50174             :   
   50175         965 :   if (!args) SWIG_fail;
   50176         965 :   swig_obj[0] = args;
   50177         965 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALTranslateOptions, SWIG_POINTER_DISOWN |  0 );
   50178         965 :   if (!SWIG_IsOK(res1)) {
   50179           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALTranslateOptions" "', argument " "1"" of type '" "GDALTranslateOptions *""'"); 
   50180             :   }
   50181         965 :   arg1 = reinterpret_cast< GDALTranslateOptions * >(argp1);
   50182         965 :   {
   50183         965 :     const int bLocalUseExceptions = GetUseExceptions();
   50184         965 :     if ( bLocalUseExceptions ) {
   50185         400 :       pushErrorHandler();
   50186             :     }
   50187         965 :     {
   50188         965 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   50189         965 :       delete_GDALTranslateOptions(arg1);
   50190         965 :       SWIG_PYTHON_THREAD_END_ALLOW;
   50191             :     }
   50192         965 :     if ( bLocalUseExceptions ) {
   50193         400 :       popErrorHandler();
   50194             :     }
   50195             : #ifndef SED_HACKS
   50196             :     if ( bLocalUseExceptions ) {
   50197             :       CPLErr eclass = CPLGetLastErrorType();
   50198             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   50199             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   50200             :       }
   50201             :     }
   50202             : #endif
   50203             :   }
   50204         965 :   resultobj = SWIG_Py_Void();
   50205         965 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   50206             :   return resultobj;
   50207             : fail:
   50208             :   return NULL;
   50209             : }
   50210             : 
   50211             : 
   50212         271 : SWIGINTERN PyObject *GDALTranslateOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   50213         271 :   PyObject *obj;
   50214         271 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   50215         271 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALTranslateOptions, SWIG_NewClientData(obj));
   50216         271 :   return SWIG_Py_Void();
   50217             : }
   50218             : 
   50219         965 : SWIGINTERN PyObject *GDALTranslateOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   50220         965 :   return SWIG_Python_InitShadowInstance(args);
   50221             : }
   50222             : 
   50223         968 : SWIGINTERN PyObject *_wrap_TranslateInternal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   50224         968 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   50225         968 :   char *arg1 = (char *) 0 ;
   50226         968 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   50227         968 :   GDALTranslateOptions *arg3 = (GDALTranslateOptions *) 0 ;
   50228         968 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   50229         968 :   void *arg5 = (void *) NULL ;
   50230         968 :   int bToFree1 = 0 ;
   50231         968 :   void *argp2 = 0 ;
   50232         968 :   int res2 = 0 ;
   50233         968 :   void *argp3 = 0 ;
   50234         968 :   int res3 = 0 ;
   50235         968 :   PyObject *swig_obj[5] ;
   50236         968 :   GDALDatasetShadow *result = 0 ;
   50237             :   
   50238             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   50239         968 :   PyProgressData *psProgressInfo;
   50240         968 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   50241         968 :   psProgressInfo->nLastReported = -1;
   50242         968 :   psProgressInfo->psPyCallback = NULL;
   50243         968 :   psProgressInfo->psPyCallbackData = NULL;
   50244         968 :   arg5 = psProgressInfo;
   50245         968 :   if (!SWIG_Python_UnpackTuple(args, "TranslateInternal", 3, 5, swig_obj)) SWIG_fail;
   50246         968 :   {
   50247             :     /* %typemap(in) (const char *utf8_path) */
   50248         968 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   50249             :     {
   50250         935 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   50251             :     }
   50252             :     else
   50253             :     {
   50254          33 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   50255             :       
   50256             :     }
   50257         968 :     if (arg1 == NULL)
   50258             :     {
   50259           1 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   50260           1 :       SWIG_fail;
   50261             :     }
   50262             :   }
   50263         967 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   50264         967 :   if (!SWIG_IsOK(res2)) {
   50265           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TranslateInternal" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   50266             :   }
   50267         967 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   50268         967 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALTranslateOptions, 0 |  0 );
   50269         967 :   if (!SWIG_IsOK(res3)) {
   50270           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "TranslateInternal" "', argument " "3"" of type '" "GDALTranslateOptions *""'"); 
   50271             :   }
   50272         967 :   arg3 = reinterpret_cast< GDALTranslateOptions * >(argp3);
   50273         967 :   if (swig_obj[3]) {
   50274         966 :     {
   50275             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   50276             :       /* callback_func typemap */
   50277             :       
   50278             :       /* In some cases 0 is passed instead of None. */
   50279             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   50280         966 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   50281             :       {
   50282           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   50283             :         {
   50284           0 :           swig_obj[3] = Py_None;
   50285             :         }
   50286             :       }
   50287             :       
   50288         966 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   50289           2 :         void* cbfunction = NULL;
   50290           2 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   50291             :             (void**)&cbfunction,
   50292             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   50293             :             SWIG_POINTER_EXCEPTION | 0 ));
   50294             :         
   50295           2 :         if ( cbfunction == GDALTermProgress ) {
   50296             :           arg4 = GDALTermProgress;
   50297             :         } else {
   50298           2 :           if (!PyCallable_Check(swig_obj[3])) {
   50299           0 :             PyErr_SetString( PyExc_RuntimeError,
   50300             :               "Object given is not a Python function" );
   50301           0 :             SWIG_fail;
   50302             :           }
   50303           2 :           psProgressInfo->psPyCallback = swig_obj[3];
   50304           2 :           arg4 = PyProgressProxy;
   50305             :         }
   50306             :         
   50307             :       }
   50308             :       
   50309             :     }
   50310             :   }
   50311         967 :   if (swig_obj[4]) {
   50312         965 :     {
   50313             :       /* %typemap(in) ( void* callback_data=NULL)  */
   50314         965 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   50315             :     }
   50316             :   }
   50317         967 :   {
   50318         967 :     if (!arg1) {
   50319         967 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   50320             :     }
   50321             :   }
   50322         967 :   {
   50323         967 :     if (!arg2) {
   50324           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   50325             :     }
   50326             :   }
   50327         967 :   {
   50328         967 :     const int bLocalUseExceptions = GetUseExceptions();
   50329         967 :     if ( bLocalUseExceptions ) {
   50330         402 :       pushErrorHandler();
   50331             :     }
   50332         967 :     {
   50333         967 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   50334         967 :       result = (GDALDatasetShadow *)wrapper_GDALTranslate((char const *)arg1,arg2,arg3,arg4,arg5);
   50335         967 :       SWIG_PYTHON_THREAD_END_ALLOW;
   50336             :     }
   50337         967 :     if ( bLocalUseExceptions ) {
   50338         402 :       popErrorHandler();
   50339             :     }
   50340             : #ifndef SED_HACKS
   50341             :     if ( bLocalUseExceptions ) {
   50342             :       CPLErr eclass = CPLGetLastErrorType();
   50343             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   50344             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   50345             :       }
   50346             :     }
   50347             : #endif
   50348             :   }
   50349         967 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   50350         967 :   {
   50351             :     /* %typemap(freearg) (const char *utf8_path) */
   50352         967 :     GDALPythonFreeCStr(arg1, bToFree1);
   50353             :   }
   50354         967 :   {
   50355             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   50356             :     
   50357         967 :     CPLFree(psProgressInfo);
   50358             :     
   50359             :   }
   50360         972 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   50361             :   return resultobj;
   50362           1 : fail:
   50363           1 :   {
   50364             :     /* %typemap(freearg) (const char *utf8_path) */
   50365           1 :     GDALPythonFreeCStr(arg1, bToFree1);
   50366             :   }
   50367           1 :   {
   50368             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   50369             :     
   50370           1 :     CPLFree(psProgressInfo);
   50371             :     
   50372             :   }
   50373             :   return NULL;
   50374             : }
   50375             : 
   50376             : 
   50377         681 : SWIGINTERN PyObject *_wrap_new_GDALWarpAppOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   50378         681 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   50379         681 :   char **arg1 = (char **) 0 ;
   50380         681 :   PyObject *swig_obj[1] ;
   50381         681 :   GDALWarpAppOptions *result = 0 ;
   50382             :   
   50383         681 :   if (!args) SWIG_fail;
   50384         681 :   swig_obj[0] = args;
   50385         681 :   {
   50386             :     /* %typemap(in) char **dict */
   50387         681 :     arg1 = NULL;
   50388         681 :     if ( PySequence_Check( swig_obj[0] ) ) {
   50389         681 :       int bErr = FALSE;
   50390         681 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   50391         681 :       if ( bErr )
   50392             :       {
   50393           0 :         SWIG_fail;
   50394             :       }
   50395             :     }
   50396           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   50397           0 :       int bErr = FALSE;
   50398           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   50399           0 :       if ( bErr )
   50400             :       {
   50401           0 :         SWIG_fail;
   50402             :       }
   50403             :     }
   50404             :     else {
   50405           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   50406           0 :       SWIG_fail;
   50407             :     }
   50408             :   }
   50409         681 :   {
   50410         681 :     const int bLocalUseExceptions = GetUseExceptions();
   50411         681 :     if ( bLocalUseExceptions ) {
   50412         665 :       pushErrorHandler();
   50413             :     }
   50414         681 :     {
   50415         681 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   50416         681 :       result = (GDALWarpAppOptions *)new_GDALWarpAppOptions(arg1);
   50417         681 :       SWIG_PYTHON_THREAD_END_ALLOW;
   50418             :     }
   50419         681 :     if ( bLocalUseExceptions ) {
   50420         665 :       popErrorHandler();
   50421             :     }
   50422             : #ifndef SED_HACKS
   50423             :     if ( bLocalUseExceptions ) {
   50424             :       CPLErr eclass = CPLGetLastErrorType();
   50425             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   50426             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   50427             :       }
   50428             :     }
   50429             : #endif
   50430             :   }
   50431         681 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALWarpAppOptions, SWIG_POINTER_NEW |  0 );
   50432         681 :   {
   50433             :     /* %typemap(freearg) char **dict */
   50434         681 :     CSLDestroy( arg1 );
   50435             :   }
   50436         682 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   50437             :   return resultobj;
   50438           0 : fail:
   50439           0 :   {
   50440             :     /* %typemap(freearg) char **dict */
   50441           0 :     CSLDestroy( arg1 );
   50442             :   }
   50443             :   return NULL;
   50444             : }
   50445             : 
   50446             : 
   50447         680 : SWIGINTERN PyObject *_wrap_delete_GDALWarpAppOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   50448         680 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   50449         680 :   GDALWarpAppOptions *arg1 = (GDALWarpAppOptions *) 0 ;
   50450         680 :   void *argp1 = 0 ;
   50451         680 :   int res1 = 0 ;
   50452         680 :   PyObject *swig_obj[1] ;
   50453             :   
   50454         680 :   if (!args) SWIG_fail;
   50455         680 :   swig_obj[0] = args;
   50456         680 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALWarpAppOptions, SWIG_POINTER_DISOWN |  0 );
   50457         680 :   if (!SWIG_IsOK(res1)) {
   50458           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALWarpAppOptions" "', argument " "1"" of type '" "GDALWarpAppOptions *""'"); 
   50459             :   }
   50460         680 :   arg1 = reinterpret_cast< GDALWarpAppOptions * >(argp1);
   50461         680 :   {
   50462         680 :     const int bLocalUseExceptions = GetUseExceptions();
   50463         680 :     if ( bLocalUseExceptions ) {
   50464         664 :       pushErrorHandler();
   50465             :     }
   50466         680 :     {
   50467         680 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   50468         680 :       delete_GDALWarpAppOptions(arg1);
   50469         680 :       SWIG_PYTHON_THREAD_END_ALLOW;
   50470             :     }
   50471         680 :     if ( bLocalUseExceptions ) {
   50472         664 :       popErrorHandler();
   50473             :     }
   50474             : #ifndef SED_HACKS
   50475             :     if ( bLocalUseExceptions ) {
   50476             :       CPLErr eclass = CPLGetLastErrorType();
   50477             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   50478             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   50479             :       }
   50480             :     }
   50481             : #endif
   50482             :   }
   50483         680 :   resultobj = SWIG_Py_Void();
   50484         680 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   50485             :   return resultobj;
   50486             : fail:
   50487             :   return NULL;
   50488             : }
   50489             : 
   50490             : 
   50491         271 : SWIGINTERN PyObject *GDALWarpAppOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   50492         271 :   PyObject *obj;
   50493         271 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   50494         271 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALWarpAppOptions, SWIG_NewClientData(obj));
   50495         271 :   return SWIG_Py_Void();
   50496             : }
   50497             : 
   50498         680 : SWIGINTERN PyObject *GDALWarpAppOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   50499         680 :   return SWIG_Python_InitShadowInstance(args);
   50500             : }
   50501             : 
   50502          87 : SWIGINTERN PyObject *_wrap_wrapper_GDALWarpDestDS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   50503          87 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   50504          87 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   50505          87 :   int arg2 ;
   50506          87 :   GDALDatasetShadow **arg3 = (GDALDatasetShadow **) 0 ;
   50507          87 :   GDALWarpAppOptions *arg4 = (GDALWarpAppOptions *) 0 ;
   50508          87 :   GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
   50509          87 :   void *arg6 = (void *) NULL ;
   50510          87 :   void *argp1 = 0 ;
   50511          87 :   int res1 = 0 ;
   50512          87 :   void *argp4 = 0 ;
   50513          87 :   int res4 = 0 ;
   50514          87 :   PyObject *swig_obj[5] ;
   50515          87 :   int result;
   50516             :   
   50517             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   50518          87 :   PyProgressData *psProgressInfo;
   50519          87 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   50520          87 :   psProgressInfo->nLastReported = -1;
   50521          87 :   psProgressInfo->psPyCallback = NULL;
   50522          87 :   psProgressInfo->psPyCallbackData = NULL;
   50523          87 :   arg6 = psProgressInfo;
   50524          87 :   if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALWarpDestDS", 3, 5, swig_obj)) SWIG_fail;
   50525          87 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   50526          87 :   if (!SWIG_IsOK(res1)) {
   50527           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "wrapper_GDALWarpDestDS" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   50528             :   }
   50529          87 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   50530          87 :   {
   50531             :     /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALDatasetShadow *optional_##GDALDatasetShadow)*/
   50532          87 :     if ( !PySequence_Check(swig_obj[1]) ) {
   50533           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   50534           0 :       SWIG_fail;
   50535             :     }
   50536          87 :     Py_ssize_t size = PySequence_Size(swig_obj[1]);
   50537          87 :     if( size > (Py_ssize_t)INT_MAX ) {
   50538           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   50539           0 :       SWIG_fail;
   50540             :     }
   50541          87 :     if( (size_t)size > SIZE_MAX / sizeof(GDALDatasetShadow*) ) {
   50542           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   50543           0 :       SWIG_fail;
   50544             :     }
   50545          87 :     arg2 = (int)size;
   50546          87 :     arg3 = (GDALDatasetShadow**) VSIMalloc(arg2*sizeof(GDALDatasetShadow*));
   50547          87 :     if( !arg3) {
   50548           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   50549           0 :       SWIG_fail;
   50550             :     }
   50551             :     
   50552         172 :     for( int i = 0; i<arg2; i++ ) {
   50553          85 :       PyObject *o = PySequence_GetItem(swig_obj[1],i);
   50554          85 :       GDALDatasetShadow* rawobjectpointer = NULL;
   50555          85 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_EXCEPTION | 0 ));
   50556          85 :       if (!rawobjectpointer) {
   50557           0 :         Py_DECREF(o);
   50558           0 :         PyErr_SetString(PyExc_TypeError, "object of wrong GDALDatasetShadow");
   50559           0 :         SWIG_fail;
   50560             :       }
   50561          85 :       arg3[i] = rawobjectpointer;
   50562          85 :       Py_DECREF(o);
   50563             :       
   50564             :     }
   50565             :   }
   50566          87 :   res4 = SWIG_ConvertPtr(swig_obj[2], &argp4,SWIGTYPE_p_GDALWarpAppOptions, 0 |  0 );
   50567          87 :   if (!SWIG_IsOK(res4)) {
   50568           0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "wrapper_GDALWarpDestDS" "', argument " "4"" of type '" "GDALWarpAppOptions *""'"); 
   50569             :   }
   50570          87 :   arg4 = reinterpret_cast< GDALWarpAppOptions * >(argp4);
   50571          87 :   if (swig_obj[3]) {
   50572          86 :     {
   50573             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   50574             :       /* callback_func typemap */
   50575             :       
   50576             :       /* In some cases 0 is passed instead of None. */
   50577             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   50578          86 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   50579             :       {
   50580           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   50581             :         {
   50582           0 :           swig_obj[3] = Py_None;
   50583             :         }
   50584             :       }
   50585             :       
   50586          86 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   50587           1 :         void* cbfunction = NULL;
   50588           1 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   50589             :             (void**)&cbfunction,
   50590             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   50591             :             SWIG_POINTER_EXCEPTION | 0 ));
   50592             :         
   50593           1 :         if ( cbfunction == GDALTermProgress ) {
   50594             :           arg5 = GDALTermProgress;
   50595             :         } else {
   50596           1 :           if (!PyCallable_Check(swig_obj[3])) {
   50597           0 :             PyErr_SetString( PyExc_RuntimeError,
   50598             :               "Object given is not a Python function" );
   50599           0 :             SWIG_fail;
   50600             :           }
   50601           1 :           psProgressInfo->psPyCallback = swig_obj[3];
   50602           1 :           arg5 = PyProgressProxy;
   50603             :         }
   50604             :         
   50605             :       }
   50606             :       
   50607             :     }
   50608             :   }
   50609          87 :   if (swig_obj[4]) {
   50610          85 :     {
   50611             :       /* %typemap(in) ( void* callback_data=NULL)  */
   50612          85 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   50613             :     }
   50614             :   }
   50615          87 :   {
   50616          87 :     if (!arg1) {
   50617           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   50618             :     }
   50619             :   }
   50620          86 :   {
   50621          86 :     const int bLocalUseExceptions = GetUseExceptions();
   50622          86 :     if ( bLocalUseExceptions ) {
   50623          86 :       pushErrorHandler();
   50624             :     }
   50625          86 :     {
   50626          86 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   50627          86 :       result = (int)wrapper_GDALWarpDestDS(arg1,arg2,arg3,arg4,arg5,arg6);
   50628          86 :       SWIG_PYTHON_THREAD_END_ALLOW;
   50629             :     }
   50630          86 :     if ( bLocalUseExceptions ) {
   50631          86 :       popErrorHandler();
   50632             :     }
   50633             : #ifndef SED_HACKS
   50634             :     if ( bLocalUseExceptions ) {
   50635             :       CPLErr eclass = CPLGetLastErrorType();
   50636             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   50637             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   50638             :       }
   50639             :     }
   50640             : #endif
   50641             :   }
   50642          86 :   resultobj = SWIG_From_int(static_cast< int >(result));
   50643          86 :   {
   50644             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDatasetShadow **poObjects)*/
   50645          86 :     CPLFree( arg3 );
   50646             :   }
   50647          86 :   {
   50648             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   50649             :     
   50650          86 :     CPLFree(psProgressInfo);
   50651             :     
   50652             :   }
   50653          89 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   50654             :   return resultobj;
   50655           1 : fail:
   50656           1 :   {
   50657             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDatasetShadow **poObjects)*/
   50658           1 :     CPLFree( arg3 );
   50659             :   }
   50660           1 :   {
   50661             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   50662             :     
   50663           1 :     CPLFree(psProgressInfo);
   50664             :     
   50665             :   }
   50666             :   return NULL;
   50667             : }
   50668             : 
   50669             : 
   50670         598 : SWIGINTERN PyObject *_wrap_wrapper_GDALWarpDestName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   50671         598 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   50672         598 :   char *arg1 = (char *) 0 ;
   50673         598 :   int arg2 ;
   50674         598 :   GDALDatasetShadow **arg3 = (GDALDatasetShadow **) 0 ;
   50675         598 :   GDALWarpAppOptions *arg4 = (GDALWarpAppOptions *) 0 ;
   50676         598 :   GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
   50677         598 :   void *arg6 = (void *) NULL ;
   50678         598 :   int bToFree1 = 0 ;
   50679         598 :   void *argp4 = 0 ;
   50680         598 :   int res4 = 0 ;
   50681         598 :   PyObject *swig_obj[5] ;
   50682         598 :   GDALDatasetShadow *result = 0 ;
   50683             :   
   50684             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   50685         598 :   PyProgressData *psProgressInfo;
   50686         598 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   50687         598 :   psProgressInfo->nLastReported = -1;
   50688         598 :   psProgressInfo->psPyCallback = NULL;
   50689         598 :   psProgressInfo->psPyCallbackData = NULL;
   50690         598 :   arg6 = psProgressInfo;
   50691         598 :   if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALWarpDestName", 3, 5, swig_obj)) SWIG_fail;
   50692         598 :   {
   50693             :     /* %typemap(in) (const char *utf8_path) */
   50694         598 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   50695             :     {
   50696         565 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   50697             :     }
   50698             :     else
   50699             :     {
   50700          33 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   50701             :       
   50702             :     }
   50703         598 :     if (arg1 == NULL)
   50704             :     {
   50705           1 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   50706           1 :       SWIG_fail;
   50707             :     }
   50708             :   }
   50709         597 :   {
   50710             :     /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALDatasetShadow *optional_##GDALDatasetShadow)*/
   50711         597 :     if ( !PySequence_Check(swig_obj[1]) ) {
   50712           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   50713           0 :       SWIG_fail;
   50714             :     }
   50715         597 :     Py_ssize_t size = PySequence_Size(swig_obj[1]);
   50716         597 :     if( size > (Py_ssize_t)INT_MAX ) {
   50717           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   50718           0 :       SWIG_fail;
   50719             :     }
   50720         597 :     if( (size_t)size > SIZE_MAX / sizeof(GDALDatasetShadow*) ) {
   50721           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   50722           0 :       SWIG_fail;
   50723             :     }
   50724         597 :     arg2 = (int)size;
   50725         597 :     arg3 = (GDALDatasetShadow**) VSIMalloc(arg2*sizeof(GDALDatasetShadow*));
   50726         597 :     if( !arg3) {
   50727           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   50728           0 :       SWIG_fail;
   50729             :     }
   50730             :     
   50731        1212 :     for( int i = 0; i<arg2; i++ ) {
   50732         615 :       PyObject *o = PySequence_GetItem(swig_obj[1],i);
   50733         615 :       GDALDatasetShadow* rawobjectpointer = NULL;
   50734         615 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_EXCEPTION | 0 ));
   50735         615 :       if (!rawobjectpointer) {
   50736           0 :         Py_DECREF(o);
   50737           0 :         PyErr_SetString(PyExc_TypeError, "object of wrong GDALDatasetShadow");
   50738           0 :         SWIG_fail;
   50739             :       }
   50740         615 :       arg3[i] = rawobjectpointer;
   50741         615 :       Py_DECREF(o);
   50742             :       
   50743             :     }
   50744             :   }
   50745         597 :   res4 = SWIG_ConvertPtr(swig_obj[2], &argp4,SWIGTYPE_p_GDALWarpAppOptions, 0 |  0 );
   50746         597 :   if (!SWIG_IsOK(res4)) {
   50747           0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "wrapper_GDALWarpDestName" "', argument " "4"" of type '" "GDALWarpAppOptions *""'"); 
   50748             :   }
   50749         597 :   arg4 = reinterpret_cast< GDALWarpAppOptions * >(argp4);
   50750         597 :   if (swig_obj[3]) {
   50751         596 :     {
   50752             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   50753             :       /* callback_func typemap */
   50754             :       
   50755             :       /* In some cases 0 is passed instead of None. */
   50756             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   50757         596 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   50758             :       {
   50759           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   50760             :         {
   50761           0 :           swig_obj[3] = Py_None;
   50762             :         }
   50763             :       }
   50764             :       
   50765         596 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   50766           2 :         void* cbfunction = NULL;
   50767           2 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   50768             :             (void**)&cbfunction,
   50769             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   50770             :             SWIG_POINTER_EXCEPTION | 0 ));
   50771             :         
   50772           2 :         if ( cbfunction == GDALTermProgress ) {
   50773             :           arg5 = GDALTermProgress;
   50774             :         } else {
   50775           2 :           if (!PyCallable_Check(swig_obj[3])) {
   50776           0 :             PyErr_SetString( PyExc_RuntimeError,
   50777             :               "Object given is not a Python function" );
   50778           0 :             SWIG_fail;
   50779             :           }
   50780           2 :           psProgressInfo->psPyCallback = swig_obj[3];
   50781           2 :           arg5 = PyProgressProxy;
   50782             :         }
   50783             :         
   50784             :       }
   50785             :       
   50786             :     }
   50787             :   }
   50788         597 :   if (swig_obj[4]) {
   50789         595 :     {
   50790             :       /* %typemap(in) ( void* callback_data=NULL)  */
   50791         595 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   50792             :     }
   50793             :   }
   50794         597 :   {
   50795         597 :     if (!arg1) {
   50796         597 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   50797             :     }
   50798             :   }
   50799         597 :   {
   50800         597 :     const int bLocalUseExceptions = GetUseExceptions();
   50801         597 :     if ( bLocalUseExceptions ) {
   50802         581 :       pushErrorHandler();
   50803             :     }
   50804         597 :     {
   50805         597 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   50806         597 :       result = (GDALDatasetShadow *)wrapper_GDALWarpDestName((char const *)arg1,arg2,arg3,arg4,arg5,arg6);
   50807         597 :       SWIG_PYTHON_THREAD_END_ALLOW;
   50808             :     }
   50809         597 :     if ( bLocalUseExceptions ) {
   50810         581 :       popErrorHandler();
   50811             :     }
   50812             : #ifndef SED_HACKS
   50813             :     if ( bLocalUseExceptions ) {
   50814             :       CPLErr eclass = CPLGetLastErrorType();
   50815             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   50816             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   50817             :       }
   50818             :     }
   50819             : #endif
   50820             :   }
   50821         597 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   50822         597 :   {
   50823             :     /* %typemap(freearg) (const char *utf8_path) */
   50824         597 :     GDALPythonFreeCStr(arg1, bToFree1);
   50825             :   }
   50826         597 :   {
   50827             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDatasetShadow **poObjects)*/
   50828         597 :     CPLFree( arg3 );
   50829             :   }
   50830         597 :   {
   50831             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   50832             :     
   50833         597 :     CPLFree(psProgressInfo);
   50834             :     
   50835             :   }
   50836         626 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   50837             :   return resultobj;
   50838           1 : fail:
   50839           1 :   {
   50840             :     /* %typemap(freearg) (const char *utf8_path) */
   50841           1 :     GDALPythonFreeCStr(arg1, bToFree1);
   50842             :   }
   50843           1 :   {
   50844             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDatasetShadow **poObjects)*/
   50845           1 :     CPLFree( arg3 );
   50846             :   }
   50847           1 :   {
   50848             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   50849             :     
   50850           1 :     CPLFree(psProgressInfo);
   50851             :     
   50852             :   }
   50853             :   return NULL;
   50854             : }
   50855             : 
   50856             : 
   50857         560 : SWIGINTERN PyObject *_wrap_new_GDALVectorTranslateOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   50858         560 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   50859         560 :   char **arg1 = (char **) 0 ;
   50860         560 :   PyObject *swig_obj[1] ;
   50861         560 :   GDALVectorTranslateOptions *result = 0 ;
   50862             :   
   50863         560 :   if (!args) SWIG_fail;
   50864         560 :   swig_obj[0] = args;
   50865         560 :   {
   50866             :     /* %typemap(in) char **dict */
   50867         560 :     arg1 = NULL;
   50868         560 :     if ( PySequence_Check( swig_obj[0] ) ) {
   50869         560 :       int bErr = FALSE;
   50870         560 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   50871         560 :       if ( bErr )
   50872             :       {
   50873           0 :         SWIG_fail;
   50874             :       }
   50875             :     }
   50876           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   50877           0 :       int bErr = FALSE;
   50878           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   50879           0 :       if ( bErr )
   50880             :       {
   50881           0 :         SWIG_fail;
   50882             :       }
   50883             :     }
   50884             :     else {
   50885           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   50886           0 :       SWIG_fail;
   50887             :     }
   50888             :   }
   50889         560 :   {
   50890         560 :     const int bLocalUseExceptions = GetUseExceptions();
   50891         560 :     if ( bLocalUseExceptions ) {
   50892         416 :       pushErrorHandler();
   50893             :     }
   50894         560 :     {
   50895         560 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   50896         560 :       result = (GDALVectorTranslateOptions *)new_GDALVectorTranslateOptions(arg1);
   50897         560 :       SWIG_PYTHON_THREAD_END_ALLOW;
   50898             :     }
   50899         560 :     if ( bLocalUseExceptions ) {
   50900         416 :       popErrorHandler();
   50901             :     }
   50902             : #ifndef SED_HACKS
   50903             :     if ( bLocalUseExceptions ) {
   50904             :       CPLErr eclass = CPLGetLastErrorType();
   50905             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   50906             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   50907             :       }
   50908             :     }
   50909             : #endif
   50910             :   }
   50911         560 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALVectorTranslateOptions, SWIG_POINTER_NEW |  0 );
   50912         560 :   {
   50913             :     /* %typemap(freearg) char **dict */
   50914         560 :     CSLDestroy( arg1 );
   50915             :   }
   50916         586 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   50917             :   return resultobj;
   50918           0 : fail:
   50919           0 :   {
   50920             :     /* %typemap(freearg) char **dict */
   50921           0 :     CSLDestroy( arg1 );
   50922             :   }
   50923             :   return NULL;
   50924             : }
   50925             : 
   50926             : 
   50927         534 : SWIGINTERN PyObject *_wrap_delete_GDALVectorTranslateOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   50928         534 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   50929         534 :   GDALVectorTranslateOptions *arg1 = (GDALVectorTranslateOptions *) 0 ;
   50930         534 :   void *argp1 = 0 ;
   50931         534 :   int res1 = 0 ;
   50932         534 :   PyObject *swig_obj[1] ;
   50933             :   
   50934         534 :   if (!args) SWIG_fail;
   50935         534 :   swig_obj[0] = args;
   50936         534 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALVectorTranslateOptions, SWIG_POINTER_DISOWN |  0 );
   50937         534 :   if (!SWIG_IsOK(res1)) {
   50938           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALVectorTranslateOptions" "', argument " "1"" of type '" "GDALVectorTranslateOptions *""'"); 
   50939             :   }
   50940         534 :   arg1 = reinterpret_cast< GDALVectorTranslateOptions * >(argp1);
   50941         534 :   {
   50942         534 :     const int bLocalUseExceptions = GetUseExceptions();
   50943         534 :     if ( bLocalUseExceptions ) {
   50944         390 :       pushErrorHandler();
   50945             :     }
   50946         534 :     {
   50947         534 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   50948         534 :       delete_GDALVectorTranslateOptions(arg1);
   50949         534 :       SWIG_PYTHON_THREAD_END_ALLOW;
   50950             :     }
   50951         534 :     if ( bLocalUseExceptions ) {
   50952         390 :       popErrorHandler();
   50953             :     }
   50954             : #ifndef SED_HACKS
   50955             :     if ( bLocalUseExceptions ) {
   50956             :       CPLErr eclass = CPLGetLastErrorType();
   50957             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   50958             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   50959             :       }
   50960             :     }
   50961             : #endif
   50962             :   }
   50963         534 :   resultobj = SWIG_Py_Void();
   50964         534 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   50965             :   return resultobj;
   50966             : fail:
   50967             :   return NULL;
   50968             : }
   50969             : 
   50970             : 
   50971         271 : SWIGINTERN PyObject *GDALVectorTranslateOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   50972         271 :   PyObject *obj;
   50973         271 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   50974         271 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALVectorTranslateOptions, SWIG_NewClientData(obj));
   50975         271 :   return SWIG_Py_Void();
   50976             : }
   50977             : 
   50978         534 : SWIGINTERN PyObject *GDALVectorTranslateOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   50979         534 :   return SWIG_Python_InitShadowInstance(args);
   50980             : }
   50981             : 
   50982          12 : SWIGINTERN PyObject *_wrap_wrapper_GDALVectorTranslateDestDS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   50983          12 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   50984          12 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   50985          12 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   50986          12 :   GDALVectorTranslateOptions *arg3 = (GDALVectorTranslateOptions *) 0 ;
   50987          12 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   50988          12 :   void *arg5 = (void *) NULL ;
   50989          12 :   void *argp1 = 0 ;
   50990          12 :   int res1 = 0 ;
   50991          12 :   void *argp2 = 0 ;
   50992          12 :   int res2 = 0 ;
   50993          12 :   void *argp3 = 0 ;
   50994          12 :   int res3 = 0 ;
   50995          12 :   PyObject *swig_obj[5] ;
   50996          12 :   int result;
   50997             :   
   50998             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   50999          12 :   PyProgressData *psProgressInfo;
   51000          12 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   51001          12 :   psProgressInfo->nLastReported = -1;
   51002          12 :   psProgressInfo->psPyCallback = NULL;
   51003          12 :   psProgressInfo->psPyCallbackData = NULL;
   51004          12 :   arg5 = psProgressInfo;
   51005          12 :   if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALVectorTranslateDestDS", 3, 5, swig_obj)) SWIG_fail;
   51006          12 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   51007          12 :   if (!SWIG_IsOK(res1)) {
   51008           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "wrapper_GDALVectorTranslateDestDS" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   51009             :   }
   51010          12 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   51011          12 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   51012          12 :   if (!SWIG_IsOK(res2)) {
   51013           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "wrapper_GDALVectorTranslateDestDS" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   51014             :   }
   51015          12 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   51016          12 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALVectorTranslateOptions, 0 |  0 );
   51017          12 :   if (!SWIG_IsOK(res3)) {
   51018           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "wrapper_GDALVectorTranslateDestDS" "', argument " "3"" of type '" "GDALVectorTranslateOptions *""'"); 
   51019             :   }
   51020          12 :   arg3 = reinterpret_cast< GDALVectorTranslateOptions * >(argp3);
   51021          12 :   if (swig_obj[3]) {
   51022          12 :     {
   51023             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   51024             :       /* callback_func typemap */
   51025             :       
   51026             :       /* In some cases 0 is passed instead of None. */
   51027             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   51028          12 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   51029             :       {
   51030           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   51031             :         {
   51032           0 :           swig_obj[3] = Py_None;
   51033             :         }
   51034             :       }
   51035             :       
   51036          12 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   51037           0 :         void* cbfunction = NULL;
   51038           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   51039             :             (void**)&cbfunction,
   51040             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   51041             :             SWIG_POINTER_EXCEPTION | 0 ));
   51042             :         
   51043           0 :         if ( cbfunction == GDALTermProgress ) {
   51044             :           arg4 = GDALTermProgress;
   51045             :         } else {
   51046           0 :           if (!PyCallable_Check(swig_obj[3])) {
   51047           0 :             PyErr_SetString( PyExc_RuntimeError,
   51048             :               "Object given is not a Python function" );
   51049           0 :             SWIG_fail;
   51050             :           }
   51051           0 :           psProgressInfo->psPyCallback = swig_obj[3];
   51052           0 :           arg4 = PyProgressProxy;
   51053             :         }
   51054             :         
   51055             :       }
   51056             :       
   51057             :     }
   51058             :   }
   51059          12 :   if (swig_obj[4]) {
   51060          12 :     {
   51061             :       /* %typemap(in) ( void* callback_data=NULL)  */
   51062          12 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   51063             :     }
   51064             :   }
   51065          12 :   {
   51066          12 :     const int bLocalUseExceptions = GetUseExceptions();
   51067          12 :     if ( bLocalUseExceptions ) {
   51068          11 :       pushErrorHandler();
   51069             :     }
   51070          12 :     {
   51071          12 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   51072          12 :       result = (int)wrapper_GDALVectorTranslateDestDS(arg1,arg2,arg3,arg4,arg5);
   51073          12 :       SWIG_PYTHON_THREAD_END_ALLOW;
   51074             :     }
   51075          12 :     if ( bLocalUseExceptions ) {
   51076          11 :       popErrorHandler();
   51077             :     }
   51078             : #ifndef SED_HACKS
   51079             :     if ( bLocalUseExceptions ) {
   51080             :       CPLErr eclass = CPLGetLastErrorType();
   51081             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   51082             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   51083             :       }
   51084             :     }
   51085             : #endif
   51086             :   }
   51087          12 :   resultobj = SWIG_From_int(static_cast< int >(result));
   51088          12 :   {
   51089             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   51090             :     
   51091          12 :     CPLFree(psProgressInfo);
   51092             :     
   51093             :   }
   51094          13 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   51095             :   return resultobj;
   51096           0 : fail:
   51097           0 :   {
   51098             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   51099             :     
   51100           0 :     CPLFree(psProgressInfo);
   51101             :     
   51102             :   }
   51103             :   return NULL;
   51104             : }
   51105             : 
   51106             : 
   51107         511 : SWIGINTERN PyObject *_wrap_wrapper_GDALVectorTranslateDestName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51108         511 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51109         511 :   char *arg1 = (char *) 0 ;
   51110         511 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   51111         511 :   GDALVectorTranslateOptions *arg3 = (GDALVectorTranslateOptions *) 0 ;
   51112         511 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   51113         511 :   void *arg5 = (void *) NULL ;
   51114         511 :   int bToFree1 = 0 ;
   51115         511 :   void *argp2 = 0 ;
   51116         511 :   int res2 = 0 ;
   51117         511 :   void *argp3 = 0 ;
   51118         511 :   int res3 = 0 ;
   51119         511 :   PyObject *swig_obj[5] ;
   51120         511 :   GDALDatasetShadow *result = 0 ;
   51121             :   
   51122             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   51123         511 :   PyProgressData *psProgressInfo;
   51124         511 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   51125         511 :   psProgressInfo->nLastReported = -1;
   51126         511 :   psProgressInfo->psPyCallback = NULL;
   51127         511 :   psProgressInfo->psPyCallbackData = NULL;
   51128         511 :   arg5 = psProgressInfo;
   51129         511 :   if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALVectorTranslateDestName", 3, 5, swig_obj)) SWIG_fail;
   51130         511 :   {
   51131             :     /* %typemap(in) (const char *utf8_path) */
   51132         511 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   51133             :     {
   51134         408 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   51135             :     }
   51136             :     else
   51137             :     {
   51138         103 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   51139             :       
   51140             :     }
   51141         511 :     if (arg1 == NULL)
   51142             :     {
   51143           1 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   51144           1 :       SWIG_fail;
   51145             :     }
   51146             :   }
   51147         510 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   51148         510 :   if (!SWIG_IsOK(res2)) {
   51149           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "wrapper_GDALVectorTranslateDestName" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   51150             :   }
   51151         510 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   51152         510 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALVectorTranslateOptions, 0 |  0 );
   51153         510 :   if (!SWIG_IsOK(res3)) {
   51154           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "wrapper_GDALVectorTranslateDestName" "', argument " "3"" of type '" "GDALVectorTranslateOptions *""'"); 
   51155             :   }
   51156         510 :   arg3 = reinterpret_cast< GDALVectorTranslateOptions * >(argp3);
   51157         510 :   if (swig_obj[3]) {
   51158         510 :     {
   51159             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   51160             :       /* callback_func typemap */
   51161             :       
   51162             :       /* In some cases 0 is passed instead of None. */
   51163             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   51164         510 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   51165             :       {
   51166           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   51167             :         {
   51168           0 :           swig_obj[3] = Py_None;
   51169             :         }
   51170             :       }
   51171             :       
   51172         510 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   51173           2 :         void* cbfunction = NULL;
   51174           2 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   51175             :             (void**)&cbfunction,
   51176             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   51177             :             SWIG_POINTER_EXCEPTION | 0 ));
   51178             :         
   51179           2 :         if ( cbfunction == GDALTermProgress ) {
   51180             :           arg4 = GDALTermProgress;
   51181             :         } else {
   51182           2 :           if (!PyCallable_Check(swig_obj[3])) {
   51183           0 :             PyErr_SetString( PyExc_RuntimeError,
   51184             :               "Object given is not a Python function" );
   51185           0 :             SWIG_fail;
   51186             :           }
   51187           2 :           psProgressInfo->psPyCallback = swig_obj[3];
   51188           2 :           arg4 = PyProgressProxy;
   51189             :         }
   51190             :         
   51191             :       }
   51192             :       
   51193             :     }
   51194             :   }
   51195         510 :   if (swig_obj[4]) {
   51196         510 :     {
   51197             :       /* %typemap(in) ( void* callback_data=NULL)  */
   51198         510 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   51199             :     }
   51200             :   }
   51201         510 :   {
   51202         510 :     if (!arg1) {
   51203         510 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   51204             :     }
   51205             :   }
   51206         510 :   {
   51207         510 :     const int bLocalUseExceptions = GetUseExceptions();
   51208         510 :     if ( bLocalUseExceptions ) {
   51209         367 :       pushErrorHandler();
   51210             :     }
   51211         510 :     {
   51212         510 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   51213         510 :       result = (GDALDatasetShadow *)wrapper_GDALVectorTranslateDestName((char const *)arg1,arg2,arg3,arg4,arg5);
   51214         510 :       SWIG_PYTHON_THREAD_END_ALLOW;
   51215             :     }
   51216         510 :     if ( bLocalUseExceptions ) {
   51217         367 :       popErrorHandler();
   51218             :     }
   51219             : #ifndef SED_HACKS
   51220             :     if ( bLocalUseExceptions ) {
   51221             :       CPLErr eclass = CPLGetLastErrorType();
   51222             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   51223             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   51224             :       }
   51225             :     }
   51226             : #endif
   51227             :   }
   51228         510 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   51229         510 :   {
   51230             :     /* %typemap(freearg) (const char *utf8_path) */
   51231         510 :     GDALPythonFreeCStr(arg1, bToFree1);
   51232             :   }
   51233         510 :   {
   51234             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   51235             :     
   51236         510 :     CPLFree(psProgressInfo);
   51237             :     
   51238             :   }
   51239         522 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   51240             :   return resultobj;
   51241           1 : fail:
   51242           1 :   {
   51243             :     /* %typemap(freearg) (const char *utf8_path) */
   51244           1 :     GDALPythonFreeCStr(arg1, bToFree1);
   51245             :   }
   51246           1 :   {
   51247             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   51248             :     
   51249           1 :     CPLFree(psProgressInfo);
   51250             :     
   51251             :   }
   51252             :   return NULL;
   51253             : }
   51254             : 
   51255             : 
   51256          39 : SWIGINTERN PyObject *_wrap_new_GDALDEMProcessingOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51257          39 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51258          39 :   char **arg1 = (char **) 0 ;
   51259          39 :   PyObject *swig_obj[1] ;
   51260          39 :   GDALDEMProcessingOptions *result = 0 ;
   51261             :   
   51262          39 :   if (!args) SWIG_fail;
   51263          39 :   swig_obj[0] = args;
   51264          39 :   {
   51265             :     /* %typemap(in) char **dict */
   51266          39 :     arg1 = NULL;
   51267          39 :     if ( PySequence_Check( swig_obj[0] ) ) {
   51268          39 :       int bErr = FALSE;
   51269          39 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   51270          39 :       if ( bErr )
   51271             :       {
   51272           0 :         SWIG_fail;
   51273             :       }
   51274             :     }
   51275           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   51276           0 :       int bErr = FALSE;
   51277           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   51278           0 :       if ( bErr )
   51279             :       {
   51280           0 :         SWIG_fail;
   51281             :       }
   51282             :     }
   51283             :     else {
   51284           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   51285           0 :       SWIG_fail;
   51286             :     }
   51287             :   }
   51288          39 :   {
   51289          39 :     const int bLocalUseExceptions = GetUseExceptions();
   51290          39 :     if ( bLocalUseExceptions ) {
   51291          39 :       pushErrorHandler();
   51292             :     }
   51293          39 :     {
   51294          39 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   51295          39 :       result = (GDALDEMProcessingOptions *)new_GDALDEMProcessingOptions(arg1);
   51296          39 :       SWIG_PYTHON_THREAD_END_ALLOW;
   51297             :     }
   51298          39 :     if ( bLocalUseExceptions ) {
   51299          39 :       popErrorHandler();
   51300             :     }
   51301             : #ifndef SED_HACKS
   51302             :     if ( bLocalUseExceptions ) {
   51303             :       CPLErr eclass = CPLGetLastErrorType();
   51304             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   51305             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   51306             :       }
   51307             :     }
   51308             : #endif
   51309             :   }
   51310          39 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDEMProcessingOptions, SWIG_POINTER_NEW |  0 );
   51311          39 :   {
   51312             :     /* %typemap(freearg) char **dict */
   51313          39 :     CSLDestroy( arg1 );
   51314             :   }
   51315          39 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   51316             :   return resultobj;
   51317           0 : fail:
   51318           0 :   {
   51319             :     /* %typemap(freearg) char **dict */
   51320           0 :     CSLDestroy( arg1 );
   51321             :   }
   51322             :   return NULL;
   51323             : }
   51324             : 
   51325             : 
   51326          39 : SWIGINTERN PyObject *_wrap_delete_GDALDEMProcessingOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51327          39 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51328          39 :   GDALDEMProcessingOptions *arg1 = (GDALDEMProcessingOptions *) 0 ;
   51329          39 :   void *argp1 = 0 ;
   51330          39 :   int res1 = 0 ;
   51331          39 :   PyObject *swig_obj[1] ;
   51332             :   
   51333          39 :   if (!args) SWIG_fail;
   51334          39 :   swig_obj[0] = args;
   51335          39 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDEMProcessingOptions, SWIG_POINTER_DISOWN |  0 );
   51336          39 :   if (!SWIG_IsOK(res1)) {
   51337           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALDEMProcessingOptions" "', argument " "1"" of type '" "GDALDEMProcessingOptions *""'"); 
   51338             :   }
   51339          39 :   arg1 = reinterpret_cast< GDALDEMProcessingOptions * >(argp1);
   51340          39 :   {
   51341          39 :     const int bLocalUseExceptions = GetUseExceptions();
   51342          39 :     if ( bLocalUseExceptions ) {
   51343          39 :       pushErrorHandler();
   51344             :     }
   51345          39 :     {
   51346          39 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   51347          39 :       delete_GDALDEMProcessingOptions(arg1);
   51348          39 :       SWIG_PYTHON_THREAD_END_ALLOW;
   51349             :     }
   51350          39 :     if ( bLocalUseExceptions ) {
   51351          39 :       popErrorHandler();
   51352             :     }
   51353             : #ifndef SED_HACKS
   51354             :     if ( bLocalUseExceptions ) {
   51355             :       CPLErr eclass = CPLGetLastErrorType();
   51356             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   51357             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   51358             :       }
   51359             :     }
   51360             : #endif
   51361             :   }
   51362          39 :   resultobj = SWIG_Py_Void();
   51363          39 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   51364             :   return resultobj;
   51365             : fail:
   51366             :   return NULL;
   51367             : }
   51368             : 
   51369             : 
   51370         271 : SWIGINTERN PyObject *GDALDEMProcessingOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51371         271 :   PyObject *obj;
   51372         271 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   51373         271 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALDEMProcessingOptions, SWIG_NewClientData(obj));
   51374         271 :   return SWIG_Py_Void();
   51375             : }
   51376             : 
   51377          39 : SWIGINTERN PyObject *GDALDEMProcessingOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51378          39 :   return SWIG_Python_InitShadowInstance(args);
   51379             : }
   51380             : 
   51381          39 : SWIGINTERN PyObject *_wrap_DEMProcessingInternal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51382          39 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51383          39 :   char *arg1 = (char *) 0 ;
   51384          39 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   51385          39 :   char *arg3 = (char *) 0 ;
   51386          39 :   char *arg4 = (char *) 0 ;
   51387          39 :   GDALDEMProcessingOptions *arg5 = (GDALDEMProcessingOptions *) 0 ;
   51388          39 :   GDALProgressFunc arg6 = (GDALProgressFunc) NULL ;
   51389          39 :   void *arg7 = (void *) NULL ;
   51390          39 :   int bToFree1 = 0 ;
   51391          39 :   void *argp2 = 0 ;
   51392          39 :   int res2 = 0 ;
   51393          39 :   int res3 ;
   51394          39 :   char *buf3 = 0 ;
   51395          39 :   int alloc3 = 0 ;
   51396          39 :   int res4 ;
   51397          39 :   char *buf4 = 0 ;
   51398          39 :   int alloc4 = 0 ;
   51399          39 :   void *argp5 = 0 ;
   51400          39 :   int res5 = 0 ;
   51401          39 :   PyObject *swig_obj[7] ;
   51402          39 :   GDALDatasetShadow *result = 0 ;
   51403             :   
   51404             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   51405          39 :   PyProgressData *psProgressInfo;
   51406          39 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   51407          39 :   psProgressInfo->nLastReported = -1;
   51408          39 :   psProgressInfo->psPyCallback = NULL;
   51409          39 :   psProgressInfo->psPyCallbackData = NULL;
   51410          39 :   arg7 = psProgressInfo;
   51411          39 :   if (!SWIG_Python_UnpackTuple(args, "DEMProcessingInternal", 5, 7, swig_obj)) SWIG_fail;
   51412          39 :   {
   51413             :     /* %typemap(in) (const char *utf8_path) */
   51414          39 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   51415             :     {
   51416          38 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   51417             :     }
   51418             :     else
   51419             :     {
   51420           1 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   51421             :       
   51422             :     }
   51423          39 :     if (arg1 == NULL)
   51424             :     {
   51425           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   51426           0 :       SWIG_fail;
   51427             :     }
   51428             :   }
   51429          39 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   51430          39 :   if (!SWIG_IsOK(res2)) {
   51431           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DEMProcessingInternal" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   51432             :   }
   51433          39 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   51434          39 :   res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   51435          39 :   if (!SWIG_IsOK(res3)) {
   51436           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "DEMProcessingInternal" "', argument " "3"" of type '" "char const *""'");
   51437             :   }
   51438          39 :   arg3 = reinterpret_cast< char * >(buf3);
   51439          39 :   res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, NULL, &alloc4);
   51440          39 :   if (!SWIG_IsOK(res4)) {
   51441           0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "DEMProcessingInternal" "', argument " "4"" of type '" "char const *""'");
   51442             :   }
   51443          39 :   arg4 = reinterpret_cast< char * >(buf4);
   51444          39 :   res5 = SWIG_ConvertPtr(swig_obj[4], &argp5,SWIGTYPE_p_GDALDEMProcessingOptions, 0 |  0 );
   51445          39 :   if (!SWIG_IsOK(res5)) {
   51446           0 :     SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "DEMProcessingInternal" "', argument " "5"" of type '" "GDALDEMProcessingOptions *""'"); 
   51447             :   }
   51448          39 :   arg5 = reinterpret_cast< GDALDEMProcessingOptions * >(argp5);
   51449          39 :   if (swig_obj[5]) {
   51450          39 :     {
   51451             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   51452             :       /* callback_func typemap */
   51453             :       
   51454             :       /* In some cases 0 is passed instead of None. */
   51455             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   51456          39 :       if ( PyLong_Check(swig_obj[5]) || PyInt_Check(swig_obj[5]) )
   51457             :       {
   51458           0 :         if( PyLong_AsLong(swig_obj[5]) == 0 )
   51459             :         {
   51460           0 :           swig_obj[5] = Py_None;
   51461             :         }
   51462             :       }
   51463             :       
   51464          39 :       if (swig_obj[5] && swig_obj[5] != Py_None ) {
   51465           0 :         void* cbfunction = NULL;
   51466           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[5],
   51467             :             (void**)&cbfunction,
   51468             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   51469             :             SWIG_POINTER_EXCEPTION | 0 ));
   51470             :         
   51471           0 :         if ( cbfunction == GDALTermProgress ) {
   51472             :           arg6 = GDALTermProgress;
   51473             :         } else {
   51474           0 :           if (!PyCallable_Check(swig_obj[5])) {
   51475           0 :             PyErr_SetString( PyExc_RuntimeError,
   51476             :               "Object given is not a Python function" );
   51477           0 :             SWIG_fail;
   51478             :           }
   51479           0 :           psProgressInfo->psPyCallback = swig_obj[5];
   51480           0 :           arg6 = PyProgressProxy;
   51481             :         }
   51482             :         
   51483             :       }
   51484             :       
   51485             :     }
   51486             :   }
   51487          39 :   if (swig_obj[6]) {
   51488          39 :     {
   51489             :       /* %typemap(in) ( void* callback_data=NULL)  */
   51490          39 :       psProgressInfo->psPyCallbackData = swig_obj[6] ;
   51491             :     }
   51492             :   }
   51493          39 :   {
   51494          39 :     if (!arg1) {
   51495          39 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   51496             :     }
   51497             :   }
   51498          39 :   {
   51499          39 :     if (!arg2) {
   51500           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   51501             :     }
   51502             :   }
   51503          39 :   {
   51504          39 :     if (!arg3) {
   51505           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   51506             :     }
   51507             :   }
   51508          39 :   {
   51509          39 :     const int bLocalUseExceptions = GetUseExceptions();
   51510          39 :     if ( bLocalUseExceptions ) {
   51511          39 :       pushErrorHandler();
   51512             :     }
   51513          39 :     {
   51514          39 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   51515          39 :       result = (GDALDatasetShadow *)wrapper_GDALDEMProcessing((char const *)arg1,arg2,(char const *)arg3,(char const *)arg4,arg5,arg6,arg7);
   51516          39 :       SWIG_PYTHON_THREAD_END_ALLOW;
   51517             :     }
   51518          39 :     if ( bLocalUseExceptions ) {
   51519          39 :       popErrorHandler();
   51520             :     }
   51521             : #ifndef SED_HACKS
   51522             :     if ( bLocalUseExceptions ) {
   51523             :       CPLErr eclass = CPLGetLastErrorType();
   51524             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   51525             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   51526             :       }
   51527             :     }
   51528             : #endif
   51529             :   }
   51530          39 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   51531          39 :   {
   51532             :     /* %typemap(freearg) (const char *utf8_path) */
   51533          39 :     GDALPythonFreeCStr(arg1, bToFree1);
   51534             :   }
   51535          39 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   51536          39 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   51537          39 :   {
   51538             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   51539             :     
   51540          39 :     CPLFree(psProgressInfo);
   51541             :     
   51542             :   }
   51543          39 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   51544             :   return resultobj;
   51545           0 : fail:
   51546           0 :   {
   51547             :     /* %typemap(freearg) (const char *utf8_path) */
   51548           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   51549             :   }
   51550           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   51551           0 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   51552           0 :   {
   51553             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   51554             :     
   51555           0 :     CPLFree(psProgressInfo);
   51556             :     
   51557             :   }
   51558             :   return NULL;
   51559             : }
   51560             : 
   51561             : 
   51562          45 : SWIGINTERN PyObject *_wrap_new_GDALNearblackOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51563          45 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51564          45 :   char **arg1 = (char **) 0 ;
   51565          45 :   PyObject *swig_obj[1] ;
   51566          45 :   GDALNearblackOptions *result = 0 ;
   51567             :   
   51568          45 :   if (!args) SWIG_fail;
   51569          45 :   swig_obj[0] = args;
   51570          45 :   {
   51571             :     /* %typemap(in) char **dict */
   51572          45 :     arg1 = NULL;
   51573          45 :     if ( PySequence_Check( swig_obj[0] ) ) {
   51574          45 :       int bErr = FALSE;
   51575          45 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   51576          45 :       if ( bErr )
   51577             :       {
   51578           0 :         SWIG_fail;
   51579             :       }
   51580             :     }
   51581           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   51582           0 :       int bErr = FALSE;
   51583           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   51584           0 :       if ( bErr )
   51585             :       {
   51586           0 :         SWIG_fail;
   51587             :       }
   51588             :     }
   51589             :     else {
   51590           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   51591           0 :       SWIG_fail;
   51592             :     }
   51593             :   }
   51594          45 :   {
   51595          45 :     const int bLocalUseExceptions = GetUseExceptions();
   51596          45 :     if ( bLocalUseExceptions ) {
   51597          45 :       pushErrorHandler();
   51598             :     }
   51599          45 :     {
   51600          45 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   51601          45 :       result = (GDALNearblackOptions *)new_GDALNearblackOptions(arg1);
   51602          45 :       SWIG_PYTHON_THREAD_END_ALLOW;
   51603             :     }
   51604          45 :     if ( bLocalUseExceptions ) {
   51605          45 :       popErrorHandler();
   51606             :     }
   51607             : #ifndef SED_HACKS
   51608             :     if ( bLocalUseExceptions ) {
   51609             :       CPLErr eclass = CPLGetLastErrorType();
   51610             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   51611             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   51612             :       }
   51613             :     }
   51614             : #endif
   51615             :   }
   51616          45 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALNearblackOptions, SWIG_POINTER_NEW |  0 );
   51617          45 :   {
   51618             :     /* %typemap(freearg) char **dict */
   51619          45 :     CSLDestroy( arg1 );
   51620             :   }
   51621          45 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   51622             :   return resultobj;
   51623           0 : fail:
   51624           0 :   {
   51625             :     /* %typemap(freearg) char **dict */
   51626           0 :     CSLDestroy( arg1 );
   51627             :   }
   51628             :   return NULL;
   51629             : }
   51630             : 
   51631             : 
   51632          45 : SWIGINTERN PyObject *_wrap_delete_GDALNearblackOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51633          45 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51634          45 :   GDALNearblackOptions *arg1 = (GDALNearblackOptions *) 0 ;
   51635          45 :   void *argp1 = 0 ;
   51636          45 :   int res1 = 0 ;
   51637          45 :   PyObject *swig_obj[1] ;
   51638             :   
   51639          45 :   if (!args) SWIG_fail;
   51640          45 :   swig_obj[0] = args;
   51641          45 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALNearblackOptions, SWIG_POINTER_DISOWN |  0 );
   51642          45 :   if (!SWIG_IsOK(res1)) {
   51643           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALNearblackOptions" "', argument " "1"" of type '" "GDALNearblackOptions *""'"); 
   51644             :   }
   51645          45 :   arg1 = reinterpret_cast< GDALNearblackOptions * >(argp1);
   51646          45 :   {
   51647          45 :     const int bLocalUseExceptions = GetUseExceptions();
   51648          45 :     if ( bLocalUseExceptions ) {
   51649          45 :       pushErrorHandler();
   51650             :     }
   51651          45 :     {
   51652          45 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   51653          45 :       delete_GDALNearblackOptions(arg1);
   51654          45 :       SWIG_PYTHON_THREAD_END_ALLOW;
   51655             :     }
   51656          45 :     if ( bLocalUseExceptions ) {
   51657          45 :       popErrorHandler();
   51658             :     }
   51659             : #ifndef SED_HACKS
   51660             :     if ( bLocalUseExceptions ) {
   51661             :       CPLErr eclass = CPLGetLastErrorType();
   51662             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   51663             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   51664             :       }
   51665             :     }
   51666             : #endif
   51667             :   }
   51668          45 :   resultobj = SWIG_Py_Void();
   51669          45 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   51670             :   return resultobj;
   51671             : fail:
   51672             :   return NULL;
   51673             : }
   51674             : 
   51675             : 
   51676         271 : SWIGINTERN PyObject *GDALNearblackOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51677         271 :   PyObject *obj;
   51678         271 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   51679         271 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALNearblackOptions, SWIG_NewClientData(obj));
   51680         271 :   return SWIG_Py_Void();
   51681             : }
   51682             : 
   51683          45 : SWIGINTERN PyObject *GDALNearblackOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51684          45 :   return SWIG_Python_InitShadowInstance(args);
   51685             : }
   51686             : 
   51687           2 : SWIGINTERN PyObject *_wrap_wrapper_GDALNearblackDestDS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51688           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51689           2 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   51690           2 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   51691           2 :   GDALNearblackOptions *arg3 = (GDALNearblackOptions *) 0 ;
   51692           2 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   51693           2 :   void *arg5 = (void *) NULL ;
   51694           2 :   void *argp1 = 0 ;
   51695           2 :   int res1 = 0 ;
   51696           2 :   void *argp2 = 0 ;
   51697           2 :   int res2 = 0 ;
   51698           2 :   void *argp3 = 0 ;
   51699           2 :   int res3 = 0 ;
   51700           2 :   PyObject *swig_obj[5] ;
   51701           2 :   int result;
   51702             :   
   51703             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   51704           2 :   PyProgressData *psProgressInfo;
   51705           2 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   51706           2 :   psProgressInfo->nLastReported = -1;
   51707           2 :   psProgressInfo->psPyCallback = NULL;
   51708           2 :   psProgressInfo->psPyCallbackData = NULL;
   51709           2 :   arg5 = psProgressInfo;
   51710           2 :   if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALNearblackDestDS", 3, 5, swig_obj)) SWIG_fail;
   51711           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   51712           2 :   if (!SWIG_IsOK(res1)) {
   51713           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "wrapper_GDALNearblackDestDS" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   51714             :   }
   51715           2 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   51716           2 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   51717           2 :   if (!SWIG_IsOK(res2)) {
   51718           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "wrapper_GDALNearblackDestDS" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   51719             :   }
   51720           2 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   51721           2 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALNearblackOptions, 0 |  0 );
   51722           2 :   if (!SWIG_IsOK(res3)) {
   51723           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "wrapper_GDALNearblackDestDS" "', argument " "3"" of type '" "GDALNearblackOptions *""'"); 
   51724             :   }
   51725           2 :   arg3 = reinterpret_cast< GDALNearblackOptions * >(argp3);
   51726           2 :   if (swig_obj[3]) {
   51727           2 :     {
   51728             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   51729             :       /* callback_func typemap */
   51730             :       
   51731             :       /* In some cases 0 is passed instead of None. */
   51732             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   51733           2 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   51734             :       {
   51735           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   51736             :         {
   51737           0 :           swig_obj[3] = Py_None;
   51738             :         }
   51739             :       }
   51740             :       
   51741           2 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   51742           0 :         void* cbfunction = NULL;
   51743           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   51744             :             (void**)&cbfunction,
   51745             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   51746             :             SWIG_POINTER_EXCEPTION | 0 ));
   51747             :         
   51748           0 :         if ( cbfunction == GDALTermProgress ) {
   51749             :           arg4 = GDALTermProgress;
   51750             :         } else {
   51751           0 :           if (!PyCallable_Check(swig_obj[3])) {
   51752           0 :             PyErr_SetString( PyExc_RuntimeError,
   51753             :               "Object given is not a Python function" );
   51754           0 :             SWIG_fail;
   51755             :           }
   51756           0 :           psProgressInfo->psPyCallback = swig_obj[3];
   51757           0 :           arg4 = PyProgressProxy;
   51758             :         }
   51759             :         
   51760             :       }
   51761             :       
   51762             :     }
   51763             :   }
   51764           2 :   if (swig_obj[4]) {
   51765           2 :     {
   51766             :       /* %typemap(in) ( void* callback_data=NULL)  */
   51767           2 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   51768             :     }
   51769             :   }
   51770           2 :   {
   51771           2 :     const int bLocalUseExceptions = GetUseExceptions();
   51772           2 :     if ( bLocalUseExceptions ) {
   51773           2 :       pushErrorHandler();
   51774             :     }
   51775           2 :     {
   51776           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   51777           2 :       result = (int)wrapper_GDALNearblackDestDS(arg1,arg2,arg3,arg4,arg5);
   51778           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   51779             :     }
   51780           2 :     if ( bLocalUseExceptions ) {
   51781           2 :       popErrorHandler();
   51782             :     }
   51783             : #ifndef SED_HACKS
   51784             :     if ( bLocalUseExceptions ) {
   51785             :       CPLErr eclass = CPLGetLastErrorType();
   51786             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   51787             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   51788             :       }
   51789             :     }
   51790             : #endif
   51791             :   }
   51792           2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   51793           2 :   {
   51794             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   51795             :     
   51796           2 :     CPLFree(psProgressInfo);
   51797             :     
   51798             :   }
   51799           2 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   51800             :   return resultobj;
   51801           0 : fail:
   51802           0 :   {
   51803             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   51804             :     
   51805           0 :     CPLFree(psProgressInfo);
   51806             :     
   51807             :   }
   51808             :   return NULL;
   51809             : }
   51810             : 
   51811             : 
   51812          43 : SWIGINTERN PyObject *_wrap_wrapper_GDALNearblackDestName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51813          43 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51814          43 :   char *arg1 = (char *) 0 ;
   51815          43 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   51816          43 :   GDALNearblackOptions *arg3 = (GDALNearblackOptions *) 0 ;
   51817          43 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   51818          43 :   void *arg5 = (void *) NULL ;
   51819          43 :   int bToFree1 = 0 ;
   51820          43 :   void *argp2 = 0 ;
   51821          43 :   int res2 = 0 ;
   51822          43 :   void *argp3 = 0 ;
   51823          43 :   int res3 = 0 ;
   51824          43 :   PyObject *swig_obj[5] ;
   51825          43 :   GDALDatasetShadow *result = 0 ;
   51826             :   
   51827             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   51828          43 :   PyProgressData *psProgressInfo;
   51829          43 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   51830          43 :   psProgressInfo->nLastReported = -1;
   51831          43 :   psProgressInfo->psPyCallback = NULL;
   51832          43 :   psProgressInfo->psPyCallbackData = NULL;
   51833          43 :   arg5 = psProgressInfo;
   51834          43 :   if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALNearblackDestName", 3, 5, swig_obj)) SWIG_fail;
   51835          43 :   {
   51836             :     /* %typemap(in) (const char *utf8_path) */
   51837          43 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   51838             :     {
   51839          41 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   51840             :     }
   51841             :     else
   51842             :     {
   51843           2 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   51844             :       
   51845             :     }
   51846          43 :     if (arg1 == NULL)
   51847             :     {
   51848           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   51849           0 :       SWIG_fail;
   51850             :     }
   51851             :   }
   51852          43 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   51853          43 :   if (!SWIG_IsOK(res2)) {
   51854           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "wrapper_GDALNearblackDestName" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   51855             :   }
   51856          43 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   51857          43 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALNearblackOptions, 0 |  0 );
   51858          43 :   if (!SWIG_IsOK(res3)) {
   51859           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "wrapper_GDALNearblackDestName" "', argument " "3"" of type '" "GDALNearblackOptions *""'"); 
   51860             :   }
   51861          43 :   arg3 = reinterpret_cast< GDALNearblackOptions * >(argp3);
   51862          43 :   if (swig_obj[3]) {
   51863          43 :     {
   51864             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   51865             :       /* callback_func typemap */
   51866             :       
   51867             :       /* In some cases 0 is passed instead of None. */
   51868             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   51869          43 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   51870             :       {
   51871           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   51872             :         {
   51873           0 :           swig_obj[3] = Py_None;
   51874             :         }
   51875             :       }
   51876             :       
   51877          43 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   51878           0 :         void* cbfunction = NULL;
   51879           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   51880             :             (void**)&cbfunction,
   51881             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   51882             :             SWIG_POINTER_EXCEPTION | 0 ));
   51883             :         
   51884           0 :         if ( cbfunction == GDALTermProgress ) {
   51885             :           arg4 = GDALTermProgress;
   51886             :         } else {
   51887           0 :           if (!PyCallable_Check(swig_obj[3])) {
   51888           0 :             PyErr_SetString( PyExc_RuntimeError,
   51889             :               "Object given is not a Python function" );
   51890           0 :             SWIG_fail;
   51891             :           }
   51892           0 :           psProgressInfo->psPyCallback = swig_obj[3];
   51893           0 :           arg4 = PyProgressProxy;
   51894             :         }
   51895             :         
   51896             :       }
   51897             :       
   51898             :     }
   51899             :   }
   51900          43 :   if (swig_obj[4]) {
   51901          43 :     {
   51902             :       /* %typemap(in) ( void* callback_data=NULL)  */
   51903          43 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   51904             :     }
   51905             :   }
   51906          43 :   {
   51907          43 :     if (!arg1) {
   51908          43 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   51909             :     }
   51910             :   }
   51911          43 :   {
   51912          43 :     const int bLocalUseExceptions = GetUseExceptions();
   51913          43 :     if ( bLocalUseExceptions ) {
   51914          43 :       pushErrorHandler();
   51915             :     }
   51916          43 :     {
   51917          43 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   51918          43 :       result = (GDALDatasetShadow *)wrapper_GDALNearblackDestName((char const *)arg1,arg2,arg3,arg4,arg5);
   51919          43 :       SWIG_PYTHON_THREAD_END_ALLOW;
   51920             :     }
   51921          43 :     if ( bLocalUseExceptions ) {
   51922          43 :       popErrorHandler();
   51923             :     }
   51924             : #ifndef SED_HACKS
   51925             :     if ( bLocalUseExceptions ) {
   51926             :       CPLErr eclass = CPLGetLastErrorType();
   51927             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   51928             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   51929             :       }
   51930             :     }
   51931             : #endif
   51932             :   }
   51933          43 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   51934          43 :   {
   51935             :     /* %typemap(freearg) (const char *utf8_path) */
   51936          43 :     GDALPythonFreeCStr(arg1, bToFree1);
   51937             :   }
   51938          43 :   {
   51939             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   51940             :     
   51941          43 :     CPLFree(psProgressInfo);
   51942             :     
   51943             :   }
   51944          43 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   51945             :   return resultobj;
   51946           0 : fail:
   51947           0 :   {
   51948             :     /* %typemap(freearg) (const char *utf8_path) */
   51949           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   51950             :   }
   51951           0 :   {
   51952             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   51953             :     
   51954           0 :     CPLFree(psProgressInfo);
   51955             :     
   51956             :   }
   51957             :   return NULL;
   51958             : }
   51959             : 
   51960             : 
   51961          52 : SWIGINTERN PyObject *_wrap_new_GDALGridOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51962          52 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51963          52 :   char **arg1 = (char **) 0 ;
   51964          52 :   PyObject *swig_obj[1] ;
   51965          52 :   GDALGridOptions *result = 0 ;
   51966             :   
   51967          52 :   if (!args) SWIG_fail;
   51968          52 :   swig_obj[0] = args;
   51969          52 :   {
   51970             :     /* %typemap(in) char **dict */
   51971          52 :     arg1 = NULL;
   51972          52 :     if ( PySequence_Check( swig_obj[0] ) ) {
   51973          52 :       int bErr = FALSE;
   51974          52 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   51975          52 :       if ( bErr )
   51976             :       {
   51977           0 :         SWIG_fail;
   51978             :       }
   51979             :     }
   51980           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   51981           0 :       int bErr = FALSE;
   51982           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   51983           0 :       if ( bErr )
   51984             :       {
   51985           0 :         SWIG_fail;
   51986             :       }
   51987             :     }
   51988             :     else {
   51989           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   51990           0 :       SWIG_fail;
   51991             :     }
   51992             :   }
   51993          52 :   {
   51994          52 :     const int bLocalUseExceptions = GetUseExceptions();
   51995          52 :     if ( bLocalUseExceptions ) {
   51996          51 :       pushErrorHandler();
   51997             :     }
   51998          52 :     {
   51999          52 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52000          52 :       result = (GDALGridOptions *)new_GDALGridOptions(arg1);
   52001          52 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52002             :     }
   52003          52 :     if ( bLocalUseExceptions ) {
   52004          51 :       popErrorHandler();
   52005             :     }
   52006             : #ifndef SED_HACKS
   52007             :     if ( bLocalUseExceptions ) {
   52008             :       CPLErr eclass = CPLGetLastErrorType();
   52009             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52010             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52011             :       }
   52012             :     }
   52013             : #endif
   52014             :   }
   52015          52 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALGridOptions, SWIG_POINTER_NEW |  0 );
   52016          52 :   {
   52017             :     /* %typemap(freearg) char **dict */
   52018          52 :     CSLDestroy( arg1 );
   52019             :   }
   52020          52 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   52021             :   return resultobj;
   52022           0 : fail:
   52023           0 :   {
   52024             :     /* %typemap(freearg) char **dict */
   52025           0 :     CSLDestroy( arg1 );
   52026             :   }
   52027             :   return NULL;
   52028             : }
   52029             : 
   52030             : 
   52031          52 : SWIGINTERN PyObject *_wrap_delete_GDALGridOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52032          52 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52033          52 :   GDALGridOptions *arg1 = (GDALGridOptions *) 0 ;
   52034          52 :   void *argp1 = 0 ;
   52035          52 :   int res1 = 0 ;
   52036          52 :   PyObject *swig_obj[1] ;
   52037             :   
   52038          52 :   if (!args) SWIG_fail;
   52039          52 :   swig_obj[0] = args;
   52040          52 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGridOptions, SWIG_POINTER_DISOWN |  0 );
   52041          52 :   if (!SWIG_IsOK(res1)) {
   52042           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALGridOptions" "', argument " "1"" of type '" "GDALGridOptions *""'"); 
   52043             :   }
   52044          52 :   arg1 = reinterpret_cast< GDALGridOptions * >(argp1);
   52045          52 :   {
   52046          52 :     const int bLocalUseExceptions = GetUseExceptions();
   52047          52 :     if ( bLocalUseExceptions ) {
   52048          51 :       pushErrorHandler();
   52049             :     }
   52050          52 :     {
   52051          52 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52052          52 :       delete_GDALGridOptions(arg1);
   52053          52 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52054             :     }
   52055          52 :     if ( bLocalUseExceptions ) {
   52056          51 :       popErrorHandler();
   52057             :     }
   52058             : #ifndef SED_HACKS
   52059             :     if ( bLocalUseExceptions ) {
   52060             :       CPLErr eclass = CPLGetLastErrorType();
   52061             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52062             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52063             :       }
   52064             :     }
   52065             : #endif
   52066             :   }
   52067          52 :   resultobj = SWIG_Py_Void();
   52068          52 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   52069             :   return resultobj;
   52070             : fail:
   52071             :   return NULL;
   52072             : }
   52073             : 
   52074             : 
   52075         271 : SWIGINTERN PyObject *GDALGridOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52076         271 :   PyObject *obj;
   52077         271 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   52078         271 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALGridOptions, SWIG_NewClientData(obj));
   52079         271 :   return SWIG_Py_Void();
   52080             : }
   52081             : 
   52082          52 : SWIGINTERN PyObject *GDALGridOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52083          52 :   return SWIG_Python_InitShadowInstance(args);
   52084             : }
   52085             : 
   52086          52 : SWIGINTERN PyObject *_wrap_GridInternal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52087          52 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52088          52 :   char *arg1 = (char *) 0 ;
   52089          52 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   52090          52 :   GDALGridOptions *arg3 = (GDALGridOptions *) 0 ;
   52091          52 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   52092          52 :   void *arg5 = (void *) NULL ;
   52093          52 :   int bToFree1 = 0 ;
   52094          52 :   void *argp2 = 0 ;
   52095          52 :   int res2 = 0 ;
   52096          52 :   void *argp3 = 0 ;
   52097          52 :   int res3 = 0 ;
   52098          52 :   PyObject *swig_obj[5] ;
   52099          52 :   GDALDatasetShadow *result = 0 ;
   52100             :   
   52101             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   52102          52 :   PyProgressData *psProgressInfo;
   52103          52 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   52104          52 :   psProgressInfo->nLastReported = -1;
   52105          52 :   psProgressInfo->psPyCallback = NULL;
   52106          52 :   psProgressInfo->psPyCallbackData = NULL;
   52107          52 :   arg5 = psProgressInfo;
   52108          52 :   if (!SWIG_Python_UnpackTuple(args, "GridInternal", 3, 5, swig_obj)) SWIG_fail;
   52109          52 :   {
   52110             :     /* %typemap(in) (const char *utf8_path) */
   52111          52 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   52112             :     {
   52113          52 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   52114             :     }
   52115             :     else
   52116             :     {
   52117           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   52118             :       
   52119             :     }
   52120          52 :     if (arg1 == NULL)
   52121             :     {
   52122           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   52123           0 :       SWIG_fail;
   52124             :     }
   52125             :   }
   52126          52 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   52127          52 :   if (!SWIG_IsOK(res2)) {
   52128           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GridInternal" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   52129             :   }
   52130          52 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   52131          52 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALGridOptions, 0 |  0 );
   52132          52 :   if (!SWIG_IsOK(res3)) {
   52133           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "GridInternal" "', argument " "3"" of type '" "GDALGridOptions *""'"); 
   52134             :   }
   52135          52 :   arg3 = reinterpret_cast< GDALGridOptions * >(argp3);
   52136          52 :   if (swig_obj[3]) {
   52137          52 :     {
   52138             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   52139             :       /* callback_func typemap */
   52140             :       
   52141             :       /* In some cases 0 is passed instead of None. */
   52142             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   52143          52 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   52144             :       {
   52145           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   52146             :         {
   52147           0 :           swig_obj[3] = Py_None;
   52148             :         }
   52149             :       }
   52150             :       
   52151          52 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   52152           0 :         void* cbfunction = NULL;
   52153           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   52154             :             (void**)&cbfunction,
   52155             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   52156             :             SWIG_POINTER_EXCEPTION | 0 ));
   52157             :         
   52158           0 :         if ( cbfunction == GDALTermProgress ) {
   52159             :           arg4 = GDALTermProgress;
   52160             :         } else {
   52161           0 :           if (!PyCallable_Check(swig_obj[3])) {
   52162           0 :             PyErr_SetString( PyExc_RuntimeError,
   52163             :               "Object given is not a Python function" );
   52164           0 :             SWIG_fail;
   52165             :           }
   52166           0 :           psProgressInfo->psPyCallback = swig_obj[3];
   52167           0 :           arg4 = PyProgressProxy;
   52168             :         }
   52169             :         
   52170             :       }
   52171             :       
   52172             :     }
   52173             :   }
   52174          52 :   if (swig_obj[4]) {
   52175          52 :     {
   52176             :       /* %typemap(in) ( void* callback_data=NULL)  */
   52177          52 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   52178             :     }
   52179             :   }
   52180          52 :   {
   52181          52 :     if (!arg1) {
   52182          52 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   52183             :     }
   52184             :   }
   52185          52 :   {
   52186          52 :     if (!arg2) {
   52187           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   52188             :     }
   52189             :   }
   52190          52 :   {
   52191          52 :     const int bLocalUseExceptions = GetUseExceptions();
   52192          52 :     if ( bLocalUseExceptions ) {
   52193          51 :       pushErrorHandler();
   52194             :     }
   52195          52 :     {
   52196          52 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52197          52 :       result = (GDALDatasetShadow *)wrapper_GDALGrid((char const *)arg1,arg2,arg3,arg4,arg5);
   52198          52 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52199             :     }
   52200          52 :     if ( bLocalUseExceptions ) {
   52201          51 :       popErrorHandler();
   52202             :     }
   52203             : #ifndef SED_HACKS
   52204             :     if ( bLocalUseExceptions ) {
   52205             :       CPLErr eclass = CPLGetLastErrorType();
   52206             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52207             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52208             :       }
   52209             :     }
   52210             : #endif
   52211             :   }
   52212          52 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   52213          52 :   {
   52214             :     /* %typemap(freearg) (const char *utf8_path) */
   52215          52 :     GDALPythonFreeCStr(arg1, bToFree1);
   52216             :   }
   52217          52 :   {
   52218             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   52219             :     
   52220          52 :     CPLFree(psProgressInfo);
   52221             :     
   52222             :   }
   52223          55 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   52224             :   return resultobj;
   52225           0 : fail:
   52226           0 :   {
   52227             :     /* %typemap(freearg) (const char *utf8_path) */
   52228           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   52229             :   }
   52230           0 :   {
   52231             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   52232             :     
   52233           0 :     CPLFree(psProgressInfo);
   52234             :     
   52235             :   }
   52236             :   return NULL;
   52237             : }
   52238             : 
   52239             : 
   52240          19 : SWIGINTERN PyObject *_wrap_new_GDALRasterizeOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52241          19 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52242          19 :   char **arg1 = (char **) 0 ;
   52243          19 :   PyObject *swig_obj[1] ;
   52244          19 :   GDALRasterizeOptions *result = 0 ;
   52245             :   
   52246          19 :   if (!args) SWIG_fail;
   52247          19 :   swig_obj[0] = args;
   52248          19 :   {
   52249             :     /* %typemap(in) char **dict */
   52250          19 :     arg1 = NULL;
   52251          19 :     if ( PySequence_Check( swig_obj[0] ) ) {
   52252          19 :       int bErr = FALSE;
   52253          19 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   52254          19 :       if ( bErr )
   52255             :       {
   52256           0 :         SWIG_fail;
   52257             :       }
   52258             :     }
   52259           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   52260           0 :       int bErr = FALSE;
   52261           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   52262           0 :       if ( bErr )
   52263             :       {
   52264           0 :         SWIG_fail;
   52265             :       }
   52266             :     }
   52267             :     else {
   52268           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   52269           0 :       SWIG_fail;
   52270             :     }
   52271             :   }
   52272          19 :   {
   52273          19 :     const int bLocalUseExceptions = GetUseExceptions();
   52274          19 :     if ( bLocalUseExceptions ) {
   52275          19 :       pushErrorHandler();
   52276             :     }
   52277          19 :     {
   52278          19 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52279          19 :       result = (GDALRasterizeOptions *)new_GDALRasterizeOptions(arg1);
   52280          19 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52281             :     }
   52282          19 :     if ( bLocalUseExceptions ) {
   52283          19 :       popErrorHandler();
   52284             :     }
   52285             : #ifndef SED_HACKS
   52286             :     if ( bLocalUseExceptions ) {
   52287             :       CPLErr eclass = CPLGetLastErrorType();
   52288             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52289             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52290             :       }
   52291             :     }
   52292             : #endif
   52293             :   }
   52294          19 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterizeOptions, SWIG_POINTER_NEW |  0 );
   52295          19 :   {
   52296             :     /* %typemap(freearg) char **dict */
   52297          19 :     CSLDestroy( arg1 );
   52298             :   }
   52299          19 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   52300             :   return resultobj;
   52301           0 : fail:
   52302           0 :   {
   52303             :     /* %typemap(freearg) char **dict */
   52304           0 :     CSLDestroy( arg1 );
   52305             :   }
   52306             :   return NULL;
   52307             : }
   52308             : 
   52309             : 
   52310          19 : SWIGINTERN PyObject *_wrap_delete_GDALRasterizeOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52311          19 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52312          19 :   GDALRasterizeOptions *arg1 = (GDALRasterizeOptions *) 0 ;
   52313          19 :   void *argp1 = 0 ;
   52314          19 :   int res1 = 0 ;
   52315          19 :   PyObject *swig_obj[1] ;
   52316             :   
   52317          19 :   if (!args) SWIG_fail;
   52318          19 :   swig_obj[0] = args;
   52319          19 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterizeOptions, SWIG_POINTER_DISOWN |  0 );
   52320          19 :   if (!SWIG_IsOK(res1)) {
   52321           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALRasterizeOptions" "', argument " "1"" of type '" "GDALRasterizeOptions *""'"); 
   52322             :   }
   52323          19 :   arg1 = reinterpret_cast< GDALRasterizeOptions * >(argp1);
   52324          19 :   {
   52325          19 :     const int bLocalUseExceptions = GetUseExceptions();
   52326          19 :     if ( bLocalUseExceptions ) {
   52327          19 :       pushErrorHandler();
   52328             :     }
   52329          19 :     {
   52330          19 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52331          19 :       delete_GDALRasterizeOptions(arg1);
   52332          19 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52333             :     }
   52334          19 :     if ( bLocalUseExceptions ) {
   52335          19 :       popErrorHandler();
   52336             :     }
   52337             : #ifndef SED_HACKS
   52338             :     if ( bLocalUseExceptions ) {
   52339             :       CPLErr eclass = CPLGetLastErrorType();
   52340             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52341             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52342             :       }
   52343             :     }
   52344             : #endif
   52345             :   }
   52346          19 :   resultobj = SWIG_Py_Void();
   52347          19 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   52348             :   return resultobj;
   52349             : fail:
   52350             :   return NULL;
   52351             : }
   52352             : 
   52353             : 
   52354         271 : SWIGINTERN PyObject *GDALRasterizeOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52355         271 :   PyObject *obj;
   52356         271 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   52357         271 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALRasterizeOptions, SWIG_NewClientData(obj));
   52358         271 :   return SWIG_Py_Void();
   52359             : }
   52360             : 
   52361          19 : SWIGINTERN PyObject *GDALRasterizeOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52362          19 :   return SWIG_Python_InitShadowInstance(args);
   52363             : }
   52364             : 
   52365          12 : SWIGINTERN PyObject *_wrap_wrapper_GDALRasterizeDestDS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52366          12 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52367          12 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   52368          12 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   52369          12 :   GDALRasterizeOptions *arg3 = (GDALRasterizeOptions *) 0 ;
   52370          12 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   52371          12 :   void *arg5 = (void *) NULL ;
   52372          12 :   void *argp1 = 0 ;
   52373          12 :   int res1 = 0 ;
   52374          12 :   void *argp2 = 0 ;
   52375          12 :   int res2 = 0 ;
   52376          12 :   void *argp3 = 0 ;
   52377          12 :   int res3 = 0 ;
   52378          12 :   PyObject *swig_obj[5] ;
   52379          12 :   int result;
   52380             :   
   52381             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   52382          12 :   PyProgressData *psProgressInfo;
   52383          12 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   52384          12 :   psProgressInfo->nLastReported = -1;
   52385          12 :   psProgressInfo->psPyCallback = NULL;
   52386          12 :   psProgressInfo->psPyCallbackData = NULL;
   52387          12 :   arg5 = psProgressInfo;
   52388          12 :   if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALRasterizeDestDS", 3, 5, swig_obj)) SWIG_fail;
   52389          12 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   52390          12 :   if (!SWIG_IsOK(res1)) {
   52391           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "wrapper_GDALRasterizeDestDS" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   52392             :   }
   52393          12 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   52394          12 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   52395          12 :   if (!SWIG_IsOK(res2)) {
   52396           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "wrapper_GDALRasterizeDestDS" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   52397             :   }
   52398          12 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   52399          12 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALRasterizeOptions, 0 |  0 );
   52400          12 :   if (!SWIG_IsOK(res3)) {
   52401           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "wrapper_GDALRasterizeDestDS" "', argument " "3"" of type '" "GDALRasterizeOptions *""'"); 
   52402             :   }
   52403          12 :   arg3 = reinterpret_cast< GDALRasterizeOptions * >(argp3);
   52404          12 :   if (swig_obj[3]) {
   52405          12 :     {
   52406             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   52407             :       /* callback_func typemap */
   52408             :       
   52409             :       /* In some cases 0 is passed instead of None. */
   52410             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   52411          12 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   52412             :       {
   52413           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   52414             :         {
   52415           0 :           swig_obj[3] = Py_None;
   52416             :         }
   52417             :       }
   52418             :       
   52419          12 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   52420           0 :         void* cbfunction = NULL;
   52421           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   52422             :             (void**)&cbfunction,
   52423             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   52424             :             SWIG_POINTER_EXCEPTION | 0 ));
   52425             :         
   52426           0 :         if ( cbfunction == GDALTermProgress ) {
   52427             :           arg4 = GDALTermProgress;
   52428             :         } else {
   52429           0 :           if (!PyCallable_Check(swig_obj[3])) {
   52430           0 :             PyErr_SetString( PyExc_RuntimeError,
   52431             :               "Object given is not a Python function" );
   52432           0 :             SWIG_fail;
   52433             :           }
   52434           0 :           psProgressInfo->psPyCallback = swig_obj[3];
   52435           0 :           arg4 = PyProgressProxy;
   52436             :         }
   52437             :         
   52438             :       }
   52439             :       
   52440             :     }
   52441             :   }
   52442          12 :   if (swig_obj[4]) {
   52443          12 :     {
   52444             :       /* %typemap(in) ( void* callback_data=NULL)  */
   52445          12 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   52446             :     }
   52447             :   }
   52448          12 :   {
   52449          12 :     const int bLocalUseExceptions = GetUseExceptions();
   52450          12 :     if ( bLocalUseExceptions ) {
   52451          12 :       pushErrorHandler();
   52452             :     }
   52453          12 :     {
   52454          12 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52455          12 :       result = (int)wrapper_GDALRasterizeDestDS(arg1,arg2,arg3,arg4,arg5);
   52456          12 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52457             :     }
   52458          12 :     if ( bLocalUseExceptions ) {
   52459          12 :       popErrorHandler();
   52460             :     }
   52461             : #ifndef SED_HACKS
   52462             :     if ( bLocalUseExceptions ) {
   52463             :       CPLErr eclass = CPLGetLastErrorType();
   52464             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52465             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52466             :       }
   52467             :     }
   52468             : #endif
   52469             :   }
   52470          12 :   resultobj = SWIG_From_int(static_cast< int >(result));
   52471          12 :   {
   52472             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   52473             :     
   52474          12 :     CPLFree(psProgressInfo);
   52475             :     
   52476             :   }
   52477          12 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   52478             :   return resultobj;
   52479           0 : fail:
   52480           0 :   {
   52481             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   52482             :     
   52483           0 :     CPLFree(psProgressInfo);
   52484             :     
   52485             :   }
   52486             :   return NULL;
   52487             : }
   52488             : 
   52489             : 
   52490           7 : SWIGINTERN PyObject *_wrap_wrapper_GDALRasterizeDestName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52491           7 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52492           7 :   char *arg1 = (char *) 0 ;
   52493           7 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   52494           7 :   GDALRasterizeOptions *arg3 = (GDALRasterizeOptions *) 0 ;
   52495           7 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   52496           7 :   void *arg5 = (void *) NULL ;
   52497           7 :   int bToFree1 = 0 ;
   52498           7 :   void *argp2 = 0 ;
   52499           7 :   int res2 = 0 ;
   52500           7 :   void *argp3 = 0 ;
   52501           7 :   int res3 = 0 ;
   52502           7 :   PyObject *swig_obj[5] ;
   52503           7 :   GDALDatasetShadow *result = 0 ;
   52504             :   
   52505             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   52506           7 :   PyProgressData *psProgressInfo;
   52507           7 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   52508           7 :   psProgressInfo->nLastReported = -1;
   52509           7 :   psProgressInfo->psPyCallback = NULL;
   52510           7 :   psProgressInfo->psPyCallbackData = NULL;
   52511           7 :   arg5 = psProgressInfo;
   52512           7 :   if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALRasterizeDestName", 3, 5, swig_obj)) SWIG_fail;
   52513           7 :   {
   52514             :     /* %typemap(in) (const char *utf8_path) */
   52515           7 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   52516             :     {
   52517           6 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   52518             :     }
   52519             :     else
   52520             :     {
   52521           1 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   52522             :       
   52523             :     }
   52524           7 :     if (arg1 == NULL)
   52525             :     {
   52526           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   52527           0 :       SWIG_fail;
   52528             :     }
   52529             :   }
   52530           7 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   52531           7 :   if (!SWIG_IsOK(res2)) {
   52532           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "wrapper_GDALRasterizeDestName" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   52533             :   }
   52534           7 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   52535           7 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALRasterizeOptions, 0 |  0 );
   52536           7 :   if (!SWIG_IsOK(res3)) {
   52537           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "wrapper_GDALRasterizeDestName" "', argument " "3"" of type '" "GDALRasterizeOptions *""'"); 
   52538             :   }
   52539           7 :   arg3 = reinterpret_cast< GDALRasterizeOptions * >(argp3);
   52540           7 :   if (swig_obj[3]) {
   52541           7 :     {
   52542             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   52543             :       /* callback_func typemap */
   52544             :       
   52545             :       /* In some cases 0 is passed instead of None. */
   52546             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   52547           7 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   52548             :       {
   52549           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   52550             :         {
   52551           0 :           swig_obj[3] = Py_None;
   52552             :         }
   52553             :       }
   52554             :       
   52555           7 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   52556           0 :         void* cbfunction = NULL;
   52557           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   52558             :             (void**)&cbfunction,
   52559             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   52560             :             SWIG_POINTER_EXCEPTION | 0 ));
   52561             :         
   52562           0 :         if ( cbfunction == GDALTermProgress ) {
   52563             :           arg4 = GDALTermProgress;
   52564             :         } else {
   52565           0 :           if (!PyCallable_Check(swig_obj[3])) {
   52566           0 :             PyErr_SetString( PyExc_RuntimeError,
   52567             :               "Object given is not a Python function" );
   52568           0 :             SWIG_fail;
   52569             :           }
   52570           0 :           psProgressInfo->psPyCallback = swig_obj[3];
   52571           0 :           arg4 = PyProgressProxy;
   52572             :         }
   52573             :         
   52574             :       }
   52575             :       
   52576             :     }
   52577             :   }
   52578           7 :   if (swig_obj[4]) {
   52579           7 :     {
   52580             :       /* %typemap(in) ( void* callback_data=NULL)  */
   52581           7 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   52582             :     }
   52583             :   }
   52584           7 :   {
   52585           7 :     if (!arg1) {
   52586           7 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   52587             :     }
   52588             :   }
   52589           7 :   {
   52590           7 :     const int bLocalUseExceptions = GetUseExceptions();
   52591           7 :     if ( bLocalUseExceptions ) {
   52592           7 :       pushErrorHandler();
   52593             :     }
   52594           7 :     {
   52595           7 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52596           7 :       result = (GDALDatasetShadow *)wrapper_GDALRasterizeDestName((char const *)arg1,arg2,arg3,arg4,arg5);
   52597           7 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52598             :     }
   52599           7 :     if ( bLocalUseExceptions ) {
   52600           7 :       popErrorHandler();
   52601             :     }
   52602             : #ifndef SED_HACKS
   52603             :     if ( bLocalUseExceptions ) {
   52604             :       CPLErr eclass = CPLGetLastErrorType();
   52605             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52606             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52607             :       }
   52608             :     }
   52609             : #endif
   52610             :   }
   52611           7 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   52612           7 :   {
   52613             :     /* %typemap(freearg) (const char *utf8_path) */
   52614           7 :     GDALPythonFreeCStr(arg1, bToFree1);
   52615             :   }
   52616           7 :   {
   52617             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   52618             :     
   52619           7 :     CPLFree(psProgressInfo);
   52620             :     
   52621             :   }
   52622          12 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   52623             :   return resultobj;
   52624           0 : fail:
   52625           0 :   {
   52626             :     /* %typemap(freearg) (const char *utf8_path) */
   52627           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   52628             :   }
   52629           0 :   {
   52630             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   52631             :     
   52632           0 :     CPLFree(psProgressInfo);
   52633             :     
   52634             :   }
   52635             :   return NULL;
   52636             : }
   52637             : 
   52638             : 
   52639          39 : SWIGINTERN PyObject *_wrap_new_GDALFootprintOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52640          39 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52641          39 :   char **arg1 = (char **) 0 ;
   52642          39 :   PyObject *swig_obj[1] ;
   52643          39 :   GDALFootprintOptions *result = 0 ;
   52644             :   
   52645          39 :   if (!args) SWIG_fail;
   52646          39 :   swig_obj[0] = args;
   52647          39 :   {
   52648             :     /* %typemap(in) char **dict */
   52649          39 :     arg1 = NULL;
   52650          39 :     if ( PySequence_Check( swig_obj[0] ) ) {
   52651          39 :       int bErr = FALSE;
   52652          39 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   52653          39 :       if ( bErr )
   52654             :       {
   52655           0 :         SWIG_fail;
   52656             :       }
   52657             :     }
   52658           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   52659           0 :       int bErr = FALSE;
   52660           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   52661           0 :       if ( bErr )
   52662             :       {
   52663           0 :         SWIG_fail;
   52664             :       }
   52665             :     }
   52666             :     else {
   52667           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   52668           0 :       SWIG_fail;
   52669             :     }
   52670             :   }
   52671          39 :   {
   52672          39 :     const int bLocalUseExceptions = GetUseExceptions();
   52673          39 :     if ( bLocalUseExceptions ) {
   52674          39 :       pushErrorHandler();
   52675             :     }
   52676          39 :     {
   52677          39 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52678          39 :       result = (GDALFootprintOptions *)new_GDALFootprintOptions(arg1);
   52679          39 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52680             :     }
   52681          39 :     if ( bLocalUseExceptions ) {
   52682          39 :       popErrorHandler();
   52683             :     }
   52684             : #ifndef SED_HACKS
   52685             :     if ( bLocalUseExceptions ) {
   52686             :       CPLErr eclass = CPLGetLastErrorType();
   52687             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52688             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52689             :       }
   52690             :     }
   52691             : #endif
   52692             :   }
   52693          39 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALFootprintOptions, SWIG_POINTER_NEW |  0 );
   52694          39 :   {
   52695             :     /* %typemap(freearg) char **dict */
   52696          39 :     CSLDestroy( arg1 );
   52697             :   }
   52698          41 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   52699             :   return resultobj;
   52700           0 : fail:
   52701           0 :   {
   52702             :     /* %typemap(freearg) char **dict */
   52703           0 :     CSLDestroy( arg1 );
   52704             :   }
   52705             :   return NULL;
   52706             : }
   52707             : 
   52708             : 
   52709          37 : SWIGINTERN PyObject *_wrap_delete_GDALFootprintOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52710          37 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52711          37 :   GDALFootprintOptions *arg1 = (GDALFootprintOptions *) 0 ;
   52712          37 :   void *argp1 = 0 ;
   52713          37 :   int res1 = 0 ;
   52714          37 :   PyObject *swig_obj[1] ;
   52715             :   
   52716          37 :   if (!args) SWIG_fail;
   52717          37 :   swig_obj[0] = args;
   52718          37 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALFootprintOptions, SWIG_POINTER_DISOWN |  0 );
   52719          37 :   if (!SWIG_IsOK(res1)) {
   52720           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALFootprintOptions" "', argument " "1"" of type '" "GDALFootprintOptions *""'"); 
   52721             :   }
   52722          37 :   arg1 = reinterpret_cast< GDALFootprintOptions * >(argp1);
   52723          37 :   {
   52724          37 :     const int bLocalUseExceptions = GetUseExceptions();
   52725          37 :     if ( bLocalUseExceptions ) {
   52726          37 :       pushErrorHandler();
   52727             :     }
   52728          37 :     {
   52729          37 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52730          37 :       delete_GDALFootprintOptions(arg1);
   52731          37 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52732             :     }
   52733          37 :     if ( bLocalUseExceptions ) {
   52734          37 :       popErrorHandler();
   52735             :     }
   52736             : #ifndef SED_HACKS
   52737             :     if ( bLocalUseExceptions ) {
   52738             :       CPLErr eclass = CPLGetLastErrorType();
   52739             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52740             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52741             :       }
   52742             :     }
   52743             : #endif
   52744             :   }
   52745          37 :   resultobj = SWIG_Py_Void();
   52746          37 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   52747             :   return resultobj;
   52748             : fail:
   52749             :   return NULL;
   52750             : }
   52751             : 
   52752             : 
   52753         271 : SWIGINTERN PyObject *GDALFootprintOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52754         271 :   PyObject *obj;
   52755         271 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   52756         271 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALFootprintOptions, SWIG_NewClientData(obj));
   52757         271 :   return SWIG_Py_Void();
   52758             : }
   52759             : 
   52760          37 : SWIGINTERN PyObject *GDALFootprintOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52761          37 :   return SWIG_Python_InitShadowInstance(args);
   52762             : }
   52763             : 
   52764           3 : SWIGINTERN PyObject *_wrap_wrapper_GDALFootprintDestDS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52765           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52766           3 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   52767           3 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   52768           3 :   GDALFootprintOptions *arg3 = (GDALFootprintOptions *) 0 ;
   52769           3 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   52770           3 :   void *arg5 = (void *) NULL ;
   52771           3 :   void *argp1 = 0 ;
   52772           3 :   int res1 = 0 ;
   52773           3 :   void *argp2 = 0 ;
   52774           3 :   int res2 = 0 ;
   52775           3 :   void *argp3 = 0 ;
   52776           3 :   int res3 = 0 ;
   52777           3 :   PyObject *swig_obj[5] ;
   52778           3 :   int result;
   52779             :   
   52780             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   52781           3 :   PyProgressData *psProgressInfo;
   52782           3 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   52783           3 :   psProgressInfo->nLastReported = -1;
   52784           3 :   psProgressInfo->psPyCallback = NULL;
   52785           3 :   psProgressInfo->psPyCallbackData = NULL;
   52786           3 :   arg5 = psProgressInfo;
   52787           3 :   if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALFootprintDestDS", 3, 5, swig_obj)) SWIG_fail;
   52788           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   52789           3 :   if (!SWIG_IsOK(res1)) {
   52790           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "wrapper_GDALFootprintDestDS" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   52791             :   }
   52792           3 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   52793           3 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   52794           3 :   if (!SWIG_IsOK(res2)) {
   52795           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "wrapper_GDALFootprintDestDS" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   52796             :   }
   52797           3 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   52798           3 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALFootprintOptions, 0 |  0 );
   52799           3 :   if (!SWIG_IsOK(res3)) {
   52800           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "wrapper_GDALFootprintDestDS" "', argument " "3"" of type '" "GDALFootprintOptions *""'"); 
   52801             :   }
   52802           3 :   arg3 = reinterpret_cast< GDALFootprintOptions * >(argp3);
   52803           3 :   if (swig_obj[3]) {
   52804           3 :     {
   52805             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   52806             :       /* callback_func typemap */
   52807             :       
   52808             :       /* In some cases 0 is passed instead of None. */
   52809             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   52810           3 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   52811             :       {
   52812           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   52813             :         {
   52814           0 :           swig_obj[3] = Py_None;
   52815             :         }
   52816             :       }
   52817             :       
   52818           3 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   52819           0 :         void* cbfunction = NULL;
   52820           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   52821             :             (void**)&cbfunction,
   52822             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   52823             :             SWIG_POINTER_EXCEPTION | 0 ));
   52824             :         
   52825           0 :         if ( cbfunction == GDALTermProgress ) {
   52826             :           arg4 = GDALTermProgress;
   52827             :         } else {
   52828           0 :           if (!PyCallable_Check(swig_obj[3])) {
   52829           0 :             PyErr_SetString( PyExc_RuntimeError,
   52830             :               "Object given is not a Python function" );
   52831           0 :             SWIG_fail;
   52832             :           }
   52833           0 :           psProgressInfo->psPyCallback = swig_obj[3];
   52834           0 :           arg4 = PyProgressProxy;
   52835             :         }
   52836             :         
   52837             :       }
   52838             :       
   52839             :     }
   52840             :   }
   52841           3 :   if (swig_obj[4]) {
   52842           3 :     {
   52843             :       /* %typemap(in) ( void* callback_data=NULL)  */
   52844           3 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   52845             :     }
   52846             :   }
   52847           3 :   {
   52848           3 :     const int bLocalUseExceptions = GetUseExceptions();
   52849           3 :     if ( bLocalUseExceptions ) {
   52850           3 :       pushErrorHandler();
   52851             :     }
   52852           3 :     {
   52853           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52854           3 :       result = (int)wrapper_GDALFootprintDestDS(arg1,arg2,arg3,arg4,arg5);
   52855           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52856             :     }
   52857           3 :     if ( bLocalUseExceptions ) {
   52858           3 :       popErrorHandler();
   52859             :     }
   52860             : #ifndef SED_HACKS
   52861             :     if ( bLocalUseExceptions ) {
   52862             :       CPLErr eclass = CPLGetLastErrorType();
   52863             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52864             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52865             :       }
   52866             :     }
   52867             : #endif
   52868             :   }
   52869           3 :   resultobj = SWIG_From_int(static_cast< int >(result));
   52870           3 :   {
   52871             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   52872             :     
   52873           3 :     CPLFree(psProgressInfo);
   52874             :     
   52875             :   }
   52876           5 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   52877             :   return resultobj;
   52878           0 : fail:
   52879           0 :   {
   52880             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   52881             :     
   52882           0 :     CPLFree(psProgressInfo);
   52883             :     
   52884             :   }
   52885             :   return NULL;
   52886             : }
   52887             : 
   52888             : 
   52889          34 : SWIGINTERN PyObject *_wrap_wrapper_GDALFootprintDestName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52890          34 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52891          34 :   char *arg1 = (char *) 0 ;
   52892          34 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   52893          34 :   GDALFootprintOptions *arg3 = (GDALFootprintOptions *) 0 ;
   52894          34 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   52895          34 :   void *arg5 = (void *) NULL ;
   52896          34 :   int bToFree1 = 0 ;
   52897          34 :   void *argp2 = 0 ;
   52898          34 :   int res2 = 0 ;
   52899          34 :   void *argp3 = 0 ;
   52900          34 :   int res3 = 0 ;
   52901          34 :   PyObject *swig_obj[5] ;
   52902          34 :   GDALDatasetShadow *result = 0 ;
   52903             :   
   52904             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   52905          34 :   PyProgressData *psProgressInfo;
   52906          34 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   52907          34 :   psProgressInfo->nLastReported = -1;
   52908          34 :   psProgressInfo->psPyCallback = NULL;
   52909          34 :   psProgressInfo->psPyCallbackData = NULL;
   52910          34 :   arg5 = psProgressInfo;
   52911          34 :   if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALFootprintDestName", 3, 5, swig_obj)) SWIG_fail;
   52912          34 :   {
   52913             :     /* %typemap(in) (const char *utf8_path) */
   52914          34 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   52915             :     {
   52916          33 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   52917             :     }
   52918             :     else
   52919             :     {
   52920           1 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   52921             :       
   52922             :     }
   52923          34 :     if (arg1 == NULL)
   52924             :     {
   52925           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   52926           0 :       SWIG_fail;
   52927             :     }
   52928             :   }
   52929          34 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   52930          34 :   if (!SWIG_IsOK(res2)) {
   52931           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "wrapper_GDALFootprintDestName" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   52932             :   }
   52933          34 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   52934          34 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALFootprintOptions, 0 |  0 );
   52935          34 :   if (!SWIG_IsOK(res3)) {
   52936           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "wrapper_GDALFootprintDestName" "', argument " "3"" of type '" "GDALFootprintOptions *""'"); 
   52937             :   }
   52938          34 :   arg3 = reinterpret_cast< GDALFootprintOptions * >(argp3);
   52939          34 :   if (swig_obj[3]) {
   52940          34 :     {
   52941             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   52942             :       /* callback_func typemap */
   52943             :       
   52944             :       /* In some cases 0 is passed instead of None. */
   52945             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   52946          34 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   52947             :       {
   52948           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   52949             :         {
   52950           0 :           swig_obj[3] = Py_None;
   52951             :         }
   52952             :       }
   52953             :       
   52954          34 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   52955           0 :         void* cbfunction = NULL;
   52956           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   52957             :             (void**)&cbfunction,
   52958             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   52959             :             SWIG_POINTER_EXCEPTION | 0 ));
   52960             :         
   52961           0 :         if ( cbfunction == GDALTermProgress ) {
   52962             :           arg4 = GDALTermProgress;
   52963             :         } else {
   52964           0 :           if (!PyCallable_Check(swig_obj[3])) {
   52965           0 :             PyErr_SetString( PyExc_RuntimeError,
   52966             :               "Object given is not a Python function" );
   52967           0 :             SWIG_fail;
   52968             :           }
   52969           0 :           psProgressInfo->psPyCallback = swig_obj[3];
   52970           0 :           arg4 = PyProgressProxy;
   52971             :         }
   52972             :         
   52973             :       }
   52974             :       
   52975             :     }
   52976             :   }
   52977          34 :   if (swig_obj[4]) {
   52978          34 :     {
   52979             :       /* %typemap(in) ( void* callback_data=NULL)  */
   52980          34 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   52981             :     }
   52982             :   }
   52983          34 :   {
   52984          34 :     if (!arg1) {
   52985          34 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   52986             :     }
   52987             :   }
   52988          34 :   {
   52989          34 :     const int bLocalUseExceptions = GetUseExceptions();
   52990          34 :     if ( bLocalUseExceptions ) {
   52991          34 :       pushErrorHandler();
   52992             :     }
   52993          34 :     {
   52994          34 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52995          34 :       result = (GDALDatasetShadow *)wrapper_GDALFootprintDestName((char const *)arg1,arg2,arg3,arg4,arg5);
   52996          34 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52997             :     }
   52998          34 :     if ( bLocalUseExceptions ) {
   52999          34 :       popErrorHandler();
   53000             :     }
   53001             : #ifndef SED_HACKS
   53002             :     if ( bLocalUseExceptions ) {
   53003             :       CPLErr eclass = CPLGetLastErrorType();
   53004             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53005             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53006             :       }
   53007             :     }
   53008             : #endif
   53009             :   }
   53010          34 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   53011          34 :   {
   53012             :     /* %typemap(freearg) (const char *utf8_path) */
   53013          34 :     GDALPythonFreeCStr(arg1, bToFree1);
   53014             :   }
   53015          34 :   {
   53016             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   53017             :     
   53018          34 :     CPLFree(psProgressInfo);
   53019             :     
   53020             :   }
   53021          44 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   53022             :   return resultobj;
   53023           0 : fail:
   53024           0 :   {
   53025             :     /* %typemap(freearg) (const char *utf8_path) */
   53026           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   53027             :   }
   53028           0 :   {
   53029             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   53030             :     
   53031           0 :     CPLFree(psProgressInfo);
   53032             :     
   53033             :   }
   53034             :   return NULL;
   53035             : }
   53036             : 
   53037             : 
   53038         126 : SWIGINTERN PyObject *_wrap_new_GDALBuildVRTOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53039         126 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53040         126 :   char **arg1 = (char **) 0 ;
   53041         126 :   PyObject *swig_obj[1] ;
   53042         126 :   GDALBuildVRTOptions *result = 0 ;
   53043             :   
   53044         126 :   if (!args) SWIG_fail;
   53045         126 :   swig_obj[0] = args;
   53046         126 :   {
   53047             :     /* %typemap(in) char **dict */
   53048         126 :     arg1 = NULL;
   53049         126 :     if ( PySequence_Check( swig_obj[0] ) ) {
   53050         126 :       int bErr = FALSE;
   53051         126 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   53052         126 :       if ( bErr )
   53053             :       {
   53054           0 :         SWIG_fail;
   53055             :       }
   53056             :     }
   53057           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   53058           0 :       int bErr = FALSE;
   53059           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   53060           0 :       if ( bErr )
   53061             :       {
   53062           0 :         SWIG_fail;
   53063             :       }
   53064             :     }
   53065             :     else {
   53066           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   53067           0 :       SWIG_fail;
   53068             :     }
   53069             :   }
   53070         126 :   {
   53071         126 :     const int bLocalUseExceptions = GetUseExceptions();
   53072         126 :     if ( bLocalUseExceptions ) {
   53073         112 :       pushErrorHandler();
   53074             :     }
   53075         126 :     {
   53076         126 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53077         126 :       result = (GDALBuildVRTOptions *)new_GDALBuildVRTOptions(arg1);
   53078         126 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53079             :     }
   53080         126 :     if ( bLocalUseExceptions ) {
   53081         112 :       popErrorHandler();
   53082             :     }
   53083             : #ifndef SED_HACKS
   53084             :     if ( bLocalUseExceptions ) {
   53085             :       CPLErr eclass = CPLGetLastErrorType();
   53086             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53087             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53088             :       }
   53089             :     }
   53090             : #endif
   53091             :   }
   53092         126 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALBuildVRTOptions, SWIG_POINTER_NEW |  0 );
   53093         126 :   {
   53094             :     /* %typemap(freearg) char **dict */
   53095         126 :     CSLDestroy( arg1 );
   53096             :   }
   53097         126 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   53098             :   return resultobj;
   53099           0 : fail:
   53100           0 :   {
   53101             :     /* %typemap(freearg) char **dict */
   53102           0 :     CSLDestroy( arg1 );
   53103             :   }
   53104             :   return NULL;
   53105             : }
   53106             : 
   53107             : 
   53108         126 : SWIGINTERN PyObject *_wrap_delete_GDALBuildVRTOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53109         126 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53110         126 :   GDALBuildVRTOptions *arg1 = (GDALBuildVRTOptions *) 0 ;
   53111         126 :   void *argp1 = 0 ;
   53112         126 :   int res1 = 0 ;
   53113         126 :   PyObject *swig_obj[1] ;
   53114             :   
   53115         126 :   if (!args) SWIG_fail;
   53116         126 :   swig_obj[0] = args;
   53117         126 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALBuildVRTOptions, SWIG_POINTER_DISOWN |  0 );
   53118         126 :   if (!SWIG_IsOK(res1)) {
   53119           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALBuildVRTOptions" "', argument " "1"" of type '" "GDALBuildVRTOptions *""'"); 
   53120             :   }
   53121         126 :   arg1 = reinterpret_cast< GDALBuildVRTOptions * >(argp1);
   53122         126 :   {
   53123         126 :     const int bLocalUseExceptions = GetUseExceptions();
   53124         126 :     if ( bLocalUseExceptions ) {
   53125         112 :       pushErrorHandler();
   53126             :     }
   53127         126 :     {
   53128         126 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53129         126 :       delete_GDALBuildVRTOptions(arg1);
   53130         126 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53131             :     }
   53132         126 :     if ( bLocalUseExceptions ) {
   53133         112 :       popErrorHandler();
   53134             :     }
   53135             : #ifndef SED_HACKS
   53136             :     if ( bLocalUseExceptions ) {
   53137             :       CPLErr eclass = CPLGetLastErrorType();
   53138             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53139             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53140             :       }
   53141             :     }
   53142             : #endif
   53143             :   }
   53144         126 :   resultobj = SWIG_Py_Void();
   53145         126 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   53146             :   return resultobj;
   53147             : fail:
   53148             :   return NULL;
   53149             : }
   53150             : 
   53151             : 
   53152         271 : SWIGINTERN PyObject *GDALBuildVRTOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53153         271 :   PyObject *obj;
   53154         271 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   53155         271 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALBuildVRTOptions, SWIG_NewClientData(obj));
   53156         271 :   return SWIG_Py_Void();
   53157             : }
   53158             : 
   53159         126 : SWIGINTERN PyObject *GDALBuildVRTOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53160         126 :   return SWIG_Python_InitShadowInstance(args);
   53161             : }
   53162             : 
   53163          60 : SWIGINTERN PyObject *_wrap_BuildVRTInternalObjects(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53164          60 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53165          60 :   char *arg1 = (char *) 0 ;
   53166          60 :   int arg2 ;
   53167          60 :   GDALDatasetShadow **arg3 = (GDALDatasetShadow **) 0 ;
   53168          60 :   GDALBuildVRTOptions *arg4 = (GDALBuildVRTOptions *) 0 ;
   53169          60 :   GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
   53170          60 :   void *arg6 = (void *) NULL ;
   53171          60 :   int bToFree1 = 0 ;
   53172          60 :   void *argp4 = 0 ;
   53173          60 :   int res4 = 0 ;
   53174          60 :   PyObject *swig_obj[5] ;
   53175          60 :   GDALDatasetShadow *result = 0 ;
   53176             :   
   53177             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   53178          60 :   PyProgressData *psProgressInfo;
   53179          60 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   53180          60 :   psProgressInfo->nLastReported = -1;
   53181          60 :   psProgressInfo->psPyCallback = NULL;
   53182          60 :   psProgressInfo->psPyCallbackData = NULL;
   53183          60 :   arg6 = psProgressInfo;
   53184          60 :   if (!SWIG_Python_UnpackTuple(args, "BuildVRTInternalObjects", 3, 5, swig_obj)) SWIG_fail;
   53185          60 :   {
   53186             :     /* %typemap(in) (const char *utf8_path) */
   53187          60 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   53188             :     {
   53189          56 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   53190             :     }
   53191             :     else
   53192             :     {
   53193           4 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   53194             :       
   53195             :     }
   53196          60 :     if (arg1 == NULL)
   53197             :     {
   53198           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   53199           0 :       SWIG_fail;
   53200             :     }
   53201             :   }
   53202          60 :   {
   53203             :     /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALDatasetShadow *optional_##GDALDatasetShadow)*/
   53204          60 :     if ( !PySequence_Check(swig_obj[1]) ) {
   53205           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   53206           0 :       SWIG_fail;
   53207             :     }
   53208          60 :     Py_ssize_t size = PySequence_Size(swig_obj[1]);
   53209          60 :     if( size > (Py_ssize_t)INT_MAX ) {
   53210           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   53211           0 :       SWIG_fail;
   53212             :     }
   53213          60 :     if( (size_t)size > SIZE_MAX / sizeof(GDALDatasetShadow*) ) {
   53214           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   53215           0 :       SWIG_fail;
   53216             :     }
   53217          60 :     arg2 = (int)size;
   53218          60 :     arg3 = (GDALDatasetShadow**) VSIMalloc(arg2*sizeof(GDALDatasetShadow*));
   53219          60 :     if( !arg3) {
   53220           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   53221           0 :       SWIG_fail;
   53222             :     }
   53223             :     
   53224        1154 :     for( int i = 0; i<arg2; i++ ) {
   53225        1094 :       PyObject *o = PySequence_GetItem(swig_obj[1],i);
   53226        1094 :       GDALDatasetShadow* rawobjectpointer = NULL;
   53227        1094 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_EXCEPTION | 0 ));
   53228        1094 :       if (!rawobjectpointer) {
   53229           0 :         Py_DECREF(o);
   53230           0 :         PyErr_SetString(PyExc_TypeError, "object of wrong GDALDatasetShadow");
   53231           0 :         SWIG_fail;
   53232             :       }
   53233        1094 :       arg3[i] = rawobjectpointer;
   53234        1094 :       Py_DECREF(o);
   53235             :       
   53236             :     }
   53237             :   }
   53238          60 :   res4 = SWIG_ConvertPtr(swig_obj[2], &argp4,SWIGTYPE_p_GDALBuildVRTOptions, 0 |  0 );
   53239          60 :   if (!SWIG_IsOK(res4)) {
   53240           0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "BuildVRTInternalObjects" "', argument " "4"" of type '" "GDALBuildVRTOptions *""'"); 
   53241             :   }
   53242          60 :   arg4 = reinterpret_cast< GDALBuildVRTOptions * >(argp4);
   53243          60 :   if (swig_obj[3]) {
   53244          60 :     {
   53245             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   53246             :       /* callback_func typemap */
   53247             :       
   53248             :       /* In some cases 0 is passed instead of None. */
   53249             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   53250          60 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   53251             :       {
   53252           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   53253             :         {
   53254           0 :           swig_obj[3] = Py_None;
   53255             :         }
   53256             :       }
   53257             :       
   53258          60 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   53259           0 :         void* cbfunction = NULL;
   53260           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   53261             :             (void**)&cbfunction,
   53262             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   53263             :             SWIG_POINTER_EXCEPTION | 0 ));
   53264             :         
   53265           0 :         if ( cbfunction == GDALTermProgress ) {
   53266             :           arg5 = GDALTermProgress;
   53267             :         } else {
   53268           0 :           if (!PyCallable_Check(swig_obj[3])) {
   53269           0 :             PyErr_SetString( PyExc_RuntimeError,
   53270             :               "Object given is not a Python function" );
   53271           0 :             SWIG_fail;
   53272             :           }
   53273           0 :           psProgressInfo->psPyCallback = swig_obj[3];
   53274           0 :           arg5 = PyProgressProxy;
   53275             :         }
   53276             :         
   53277             :       }
   53278             :       
   53279             :     }
   53280             :   }
   53281          60 :   if (swig_obj[4]) {
   53282          60 :     {
   53283             :       /* %typemap(in) ( void* callback_data=NULL)  */
   53284          60 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   53285             :     }
   53286             :   }
   53287          60 :   {
   53288          60 :     if (!arg1) {
   53289          60 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   53290             :     }
   53291             :   }
   53292          60 :   {
   53293          60 :     const int bLocalUseExceptions = GetUseExceptions();
   53294          60 :     if ( bLocalUseExceptions ) {
   53295          48 :       pushErrorHandler();
   53296             :     }
   53297          60 :     {
   53298          60 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53299          60 :       result = (GDALDatasetShadow *)wrapper_GDALBuildVRT_objects((char const *)arg1,arg2,arg3,arg4,arg5,arg6);
   53300          60 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53301             :     }
   53302          60 :     if ( bLocalUseExceptions ) {
   53303          48 :       popErrorHandler();
   53304             :     }
   53305             : #ifndef SED_HACKS
   53306             :     if ( bLocalUseExceptions ) {
   53307             :       CPLErr eclass = CPLGetLastErrorType();
   53308             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53309             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53310             :       }
   53311             :     }
   53312             : #endif
   53313             :   }
   53314          60 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   53315          60 :   {
   53316             :     /* %typemap(freearg) (const char *utf8_path) */
   53317          60 :     GDALPythonFreeCStr(arg1, bToFree1);
   53318             :   }
   53319          60 :   {
   53320             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDatasetShadow **poObjects)*/
   53321          60 :     CPLFree( arg3 );
   53322             :   }
   53323          60 :   {
   53324             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   53325             :     
   53326          60 :     CPLFree(psProgressInfo);
   53327             :     
   53328             :   }
   53329          60 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   53330             :   return resultobj;
   53331           0 : fail:
   53332           0 :   {
   53333             :     /* %typemap(freearg) (const char *utf8_path) */
   53334           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   53335             :   }
   53336           0 :   {
   53337             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDatasetShadow **poObjects)*/
   53338           0 :     CPLFree( arg3 );
   53339             :   }
   53340           0 :   {
   53341             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   53342             :     
   53343           0 :     CPLFree(psProgressInfo);
   53344             :     
   53345             :   }
   53346             :   return NULL;
   53347             : }
   53348             : 
   53349             : 
   53350          66 : SWIGINTERN PyObject *_wrap_BuildVRTInternalNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53351          66 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53352          66 :   char *arg1 = (char *) 0 ;
   53353          66 :   char **arg2 = (char **) 0 ;
   53354          66 :   GDALBuildVRTOptions *arg3 = (GDALBuildVRTOptions *) 0 ;
   53355          66 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   53356          66 :   void *arg5 = (void *) NULL ;
   53357          66 :   int bToFree1 = 0 ;
   53358          66 :   void *argp3 = 0 ;
   53359          66 :   int res3 = 0 ;
   53360          66 :   PyObject *swig_obj[5] ;
   53361          66 :   GDALDatasetShadow *result = 0 ;
   53362             :   
   53363             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   53364          66 :   PyProgressData *psProgressInfo;
   53365          66 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   53366          66 :   psProgressInfo->nLastReported = -1;
   53367          66 :   psProgressInfo->psPyCallback = NULL;
   53368          66 :   psProgressInfo->psPyCallbackData = NULL;
   53369          66 :   arg5 = psProgressInfo;
   53370          66 :   if (!SWIG_Python_UnpackTuple(args, "BuildVRTInternalNames", 3, 5, swig_obj)) SWIG_fail;
   53371          66 :   {
   53372             :     /* %typemap(in) (const char *utf8_path) */
   53373          66 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   53374             :     {
   53375          64 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   53376             :     }
   53377             :     else
   53378             :     {
   53379           2 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   53380             :       
   53381             :     }
   53382          66 :     if (arg1 == NULL)
   53383             :     {
   53384           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   53385           0 :       SWIG_fail;
   53386             :     }
   53387             :   }
   53388          66 :   {
   53389             :     /* %typemap(in) char **dict */
   53390          66 :     arg2 = NULL;
   53391          66 :     if ( PySequence_Check( swig_obj[1] ) ) {
   53392          66 :       int bErr = FALSE;
   53393          66 :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   53394          66 :       if ( bErr )
   53395             :       {
   53396           0 :         SWIG_fail;
   53397             :       }
   53398             :     }
   53399           0 :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   53400           0 :       int bErr = FALSE;
   53401           0 :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   53402           0 :       if ( bErr )
   53403             :       {
   53404           0 :         SWIG_fail;
   53405             :       }
   53406             :     }
   53407             :     else {
   53408           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   53409           0 :       SWIG_fail;
   53410             :     }
   53411             :   }
   53412          66 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALBuildVRTOptions, 0 |  0 );
   53413          66 :   if (!SWIG_IsOK(res3)) {
   53414           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "BuildVRTInternalNames" "', argument " "3"" of type '" "GDALBuildVRTOptions *""'"); 
   53415             :   }
   53416          66 :   arg3 = reinterpret_cast< GDALBuildVRTOptions * >(argp3);
   53417          66 :   if (swig_obj[3]) {
   53418          66 :     {
   53419             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   53420             :       /* callback_func typemap */
   53421             :       
   53422             :       /* In some cases 0 is passed instead of None. */
   53423             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   53424          66 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   53425             :       {
   53426           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   53427             :         {
   53428           0 :           swig_obj[3] = Py_None;
   53429             :         }
   53430             :       }
   53431             :       
   53432          66 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   53433           1 :         void* cbfunction = NULL;
   53434           1 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   53435             :             (void**)&cbfunction,
   53436             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   53437             :             SWIG_POINTER_EXCEPTION | 0 ));
   53438             :         
   53439           1 :         if ( cbfunction == GDALTermProgress ) {
   53440             :           arg4 = GDALTermProgress;
   53441             :         } else {
   53442           1 :           if (!PyCallable_Check(swig_obj[3])) {
   53443           0 :             PyErr_SetString( PyExc_RuntimeError,
   53444             :               "Object given is not a Python function" );
   53445           0 :             SWIG_fail;
   53446             :           }
   53447           1 :           psProgressInfo->psPyCallback = swig_obj[3];
   53448           1 :           arg4 = PyProgressProxy;
   53449             :         }
   53450             :         
   53451             :       }
   53452             :       
   53453             :     }
   53454             :   }
   53455          66 :   if (swig_obj[4]) {
   53456          66 :     {
   53457             :       /* %typemap(in) ( void* callback_data=NULL)  */
   53458          66 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   53459             :     }
   53460             :   }
   53461          66 :   {
   53462          66 :     if (!arg1) {
   53463          66 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   53464             :     }
   53465             :   }
   53466          66 :   {
   53467          66 :     const int bLocalUseExceptions = GetUseExceptions();
   53468          66 :     if ( bLocalUseExceptions ) {
   53469          64 :       pushErrorHandler();
   53470             :     }
   53471          66 :     {
   53472          66 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53473          66 :       result = (GDALDatasetShadow *)wrapper_GDALBuildVRT_names((char const *)arg1,arg2,arg3,arg4,arg5);
   53474          66 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53475             :     }
   53476          66 :     if ( bLocalUseExceptions ) {
   53477          64 :       popErrorHandler();
   53478             :     }
   53479             : #ifndef SED_HACKS
   53480             :     if ( bLocalUseExceptions ) {
   53481             :       CPLErr eclass = CPLGetLastErrorType();
   53482             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53483             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53484             :       }
   53485             :     }
   53486             : #endif
   53487             :   }
   53488          66 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   53489          66 :   {
   53490             :     /* %typemap(freearg) (const char *utf8_path) */
   53491          66 :     GDALPythonFreeCStr(arg1, bToFree1);
   53492             :   }
   53493          66 :   {
   53494             :     /* %typemap(freearg) char **dict */
   53495          66 :     CSLDestroy( arg2 );
   53496             :   }
   53497          66 :   {
   53498             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   53499             :     
   53500          66 :     CPLFree(psProgressInfo);
   53501             :     
   53502             :   }
   53503          67 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   53504             :   return resultobj;
   53505           0 : fail:
   53506           0 :   {
   53507             :     /* %typemap(freearg) (const char *utf8_path) */
   53508           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   53509             :   }
   53510           0 :   {
   53511             :     /* %typemap(freearg) char **dict */
   53512           0 :     CSLDestroy( arg2 );
   53513             :   }
   53514           0 :   {
   53515             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   53516             :     
   53517           0 :     CPLFree(psProgressInfo);
   53518             :     
   53519             :   }
   53520             :   return NULL;
   53521             : }
   53522             : 
   53523             : 
   53524          22 : SWIGINTERN PyObject *_wrap_new_GDALTileIndexOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53525          22 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53526          22 :   char **arg1 = (char **) 0 ;
   53527          22 :   PyObject *swig_obj[1] ;
   53528          22 :   GDALTileIndexOptions *result = 0 ;
   53529             :   
   53530          22 :   if (!args) SWIG_fail;
   53531          22 :   swig_obj[0] = args;
   53532          22 :   {
   53533             :     /* %typemap(in) char **dict */
   53534          22 :     arg1 = NULL;
   53535          22 :     if ( PySequence_Check( swig_obj[0] ) ) {
   53536          22 :       int bErr = FALSE;
   53537          22 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   53538          22 :       if ( bErr )
   53539             :       {
   53540           0 :         SWIG_fail;
   53541             :       }
   53542             :     }
   53543           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   53544           0 :       int bErr = FALSE;
   53545           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   53546           0 :       if ( bErr )
   53547             :       {
   53548           0 :         SWIG_fail;
   53549             :       }
   53550             :     }
   53551             :     else {
   53552           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   53553           0 :       SWIG_fail;
   53554             :     }
   53555             :   }
   53556          22 :   {
   53557          22 :     const int bLocalUseExceptions = GetUseExceptions();
   53558          22 :     if ( bLocalUseExceptions ) {
   53559          22 :       pushErrorHandler();
   53560             :     }
   53561          22 :     {
   53562          22 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53563          22 :       result = (GDALTileIndexOptions *)new_GDALTileIndexOptions(arg1);
   53564          22 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53565             :     }
   53566          22 :     if ( bLocalUseExceptions ) {
   53567          22 :       popErrorHandler();
   53568             :     }
   53569             : #ifndef SED_HACKS
   53570             :     if ( bLocalUseExceptions ) {
   53571             :       CPLErr eclass = CPLGetLastErrorType();
   53572             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53573             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53574             :       }
   53575             :     }
   53576             : #endif
   53577             :   }
   53578          22 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALTileIndexOptions, SWIG_POINTER_NEW |  0 );
   53579          22 :   {
   53580             :     /* %typemap(freearg) char **dict */
   53581          22 :     CSLDestroy( arg1 );
   53582             :   }
   53583          22 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   53584             :   return resultobj;
   53585           0 : fail:
   53586           0 :   {
   53587             :     /* %typemap(freearg) char **dict */
   53588           0 :     CSLDestroy( arg1 );
   53589             :   }
   53590             :   return NULL;
   53591             : }
   53592             : 
   53593             : 
   53594          22 : SWIGINTERN PyObject *_wrap_delete_GDALTileIndexOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53595          22 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53596          22 :   GDALTileIndexOptions *arg1 = (GDALTileIndexOptions *) 0 ;
   53597          22 :   void *argp1 = 0 ;
   53598          22 :   int res1 = 0 ;
   53599          22 :   PyObject *swig_obj[1] ;
   53600             :   
   53601          22 :   if (!args) SWIG_fail;
   53602          22 :   swig_obj[0] = args;
   53603          22 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALTileIndexOptions, SWIG_POINTER_DISOWN |  0 );
   53604          22 :   if (!SWIG_IsOK(res1)) {
   53605           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALTileIndexOptions" "', argument " "1"" of type '" "GDALTileIndexOptions *""'"); 
   53606             :   }
   53607          22 :   arg1 = reinterpret_cast< GDALTileIndexOptions * >(argp1);
   53608          22 :   {
   53609          22 :     const int bLocalUseExceptions = GetUseExceptions();
   53610          22 :     if ( bLocalUseExceptions ) {
   53611          22 :       pushErrorHandler();
   53612             :     }
   53613          22 :     {
   53614          22 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53615          22 :       delete_GDALTileIndexOptions(arg1);
   53616          22 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53617             :     }
   53618          22 :     if ( bLocalUseExceptions ) {
   53619          22 :       popErrorHandler();
   53620             :     }
   53621             : #ifndef SED_HACKS
   53622             :     if ( bLocalUseExceptions ) {
   53623             :       CPLErr eclass = CPLGetLastErrorType();
   53624             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53625             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53626             :       }
   53627             :     }
   53628             : #endif
   53629             :   }
   53630          22 :   resultobj = SWIG_Py_Void();
   53631          22 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   53632             :   return resultobj;
   53633             : fail:
   53634             :   return NULL;
   53635             : }
   53636             : 
   53637             : 
   53638         271 : SWIGINTERN PyObject *GDALTileIndexOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53639         271 :   PyObject *obj;
   53640         271 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   53641         271 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALTileIndexOptions, SWIG_NewClientData(obj));
   53642         271 :   return SWIG_Py_Void();
   53643             : }
   53644             : 
   53645          22 : SWIGINTERN PyObject *GDALTileIndexOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53646          22 :   return SWIG_Python_InitShadowInstance(args);
   53647             : }
   53648             : 
   53649          22 : SWIGINTERN PyObject *_wrap_TileIndexInternalNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53650          22 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53651          22 :   char *arg1 = (char *) 0 ;
   53652          22 :   char **arg2 = (char **) 0 ;
   53653          22 :   GDALTileIndexOptions *arg3 = (GDALTileIndexOptions *) 0 ;
   53654          22 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   53655          22 :   void *arg5 = (void *) NULL ;
   53656          22 :   int bToFree1 = 0 ;
   53657          22 :   void *argp3 = 0 ;
   53658          22 :   int res3 = 0 ;
   53659          22 :   PyObject *swig_obj[5] ;
   53660          22 :   GDALDatasetShadow *result = 0 ;
   53661             :   
   53662             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   53663          22 :   PyProgressData *psProgressInfo;
   53664          22 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   53665          22 :   psProgressInfo->nLastReported = -1;
   53666          22 :   psProgressInfo->psPyCallback = NULL;
   53667          22 :   psProgressInfo->psPyCallbackData = NULL;
   53668          22 :   arg5 = psProgressInfo;
   53669          22 :   if (!SWIG_Python_UnpackTuple(args, "TileIndexInternalNames", 3, 5, swig_obj)) SWIG_fail;
   53670          22 :   {
   53671             :     /* %typemap(in) (const char *utf8_path) */
   53672          22 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   53673             :     {
   53674          22 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   53675             :     }
   53676             :     else
   53677             :     {
   53678           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   53679             :       
   53680             :     }
   53681          22 :     if (arg1 == NULL)
   53682             :     {
   53683           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   53684           0 :       SWIG_fail;
   53685             :     }
   53686             :   }
   53687          22 :   {
   53688             :     /* %typemap(in) char **dict */
   53689          22 :     arg2 = NULL;
   53690          22 :     if ( PySequence_Check( swig_obj[1] ) ) {
   53691          22 :       int bErr = FALSE;
   53692          22 :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   53693          22 :       if ( bErr )
   53694             :       {
   53695           0 :         SWIG_fail;
   53696             :       }
   53697             :     }
   53698           0 :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   53699           0 :       int bErr = FALSE;
   53700           0 :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   53701           0 :       if ( bErr )
   53702             :       {
   53703           0 :         SWIG_fail;
   53704             :       }
   53705             :     }
   53706             :     else {
   53707           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   53708           0 :       SWIG_fail;
   53709             :     }
   53710             :   }
   53711          22 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALTileIndexOptions, 0 |  0 );
   53712          22 :   if (!SWIG_IsOK(res3)) {
   53713           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "TileIndexInternalNames" "', argument " "3"" of type '" "GDALTileIndexOptions *""'"); 
   53714             :   }
   53715          22 :   arg3 = reinterpret_cast< GDALTileIndexOptions * >(argp3);
   53716          22 :   if (swig_obj[3]) {
   53717          22 :     {
   53718             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   53719             :       /* callback_func typemap */
   53720             :       
   53721             :       /* In some cases 0 is passed instead of None. */
   53722             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   53723          22 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   53724             :       {
   53725           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   53726             :         {
   53727           0 :           swig_obj[3] = Py_None;
   53728             :         }
   53729             :       }
   53730             :       
   53731          22 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   53732           0 :         void* cbfunction = NULL;
   53733           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   53734             :             (void**)&cbfunction,
   53735             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   53736             :             SWIG_POINTER_EXCEPTION | 0 ));
   53737             :         
   53738           0 :         if ( cbfunction == GDALTermProgress ) {
   53739             :           arg4 = GDALTermProgress;
   53740             :         } else {
   53741           0 :           if (!PyCallable_Check(swig_obj[3])) {
   53742           0 :             PyErr_SetString( PyExc_RuntimeError,
   53743             :               "Object given is not a Python function" );
   53744           0 :             SWIG_fail;
   53745             :           }
   53746           0 :           psProgressInfo->psPyCallback = swig_obj[3];
   53747           0 :           arg4 = PyProgressProxy;
   53748             :         }
   53749             :         
   53750             :       }
   53751             :       
   53752             :     }
   53753             :   }
   53754          22 :   if (swig_obj[4]) {
   53755          22 :     {
   53756             :       /* %typemap(in) ( void* callback_data=NULL)  */
   53757          22 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   53758             :     }
   53759             :   }
   53760          22 :   {
   53761          22 :     if (!arg1) {
   53762          22 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   53763             :     }
   53764             :   }
   53765          22 :   {
   53766          22 :     const int bLocalUseExceptions = GetUseExceptions();
   53767          22 :     if ( bLocalUseExceptions ) {
   53768          22 :       pushErrorHandler();
   53769             :     }
   53770          22 :     {
   53771          22 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53772          22 :       result = (GDALDatasetShadow *)wrapper_TileIndex_names((char const *)arg1,arg2,arg3,arg4,arg5);
   53773          22 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53774             :     }
   53775          22 :     if ( bLocalUseExceptions ) {
   53776          22 :       popErrorHandler();
   53777             :     }
   53778             : #ifndef SED_HACKS
   53779             :     if ( bLocalUseExceptions ) {
   53780             :       CPLErr eclass = CPLGetLastErrorType();
   53781             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53782             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53783             :       }
   53784             :     }
   53785             : #endif
   53786             :   }
   53787          22 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   53788          22 :   {
   53789             :     /* %typemap(freearg) (const char *utf8_path) */
   53790          22 :     GDALPythonFreeCStr(arg1, bToFree1);
   53791             :   }
   53792          22 :   {
   53793             :     /* %typemap(freearg) char **dict */
   53794          22 :     CSLDestroy( arg2 );
   53795             :   }
   53796          22 :   {
   53797             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   53798             :     
   53799          22 :     CPLFree(psProgressInfo);
   53800             :     
   53801             :   }
   53802          23 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   53803             :   return resultobj;
   53804           0 : fail:
   53805           0 :   {
   53806             :     /* %typemap(freearg) (const char *utf8_path) */
   53807           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   53808             :   }
   53809           0 :   {
   53810             :     /* %typemap(freearg) char **dict */
   53811           0 :     CSLDestroy( arg2 );
   53812             :   }
   53813           0 :   {
   53814             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   53815             :     
   53816           0 :     CPLFree(psProgressInfo);
   53817             :     
   53818             :   }
   53819             :   return NULL;
   53820             : }
   53821             : 
   53822             : 
   53823         103 : SWIGINTERN PyObject *_wrap_new_GDALMultiDimTranslateOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53824         103 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53825         103 :   char **arg1 = (char **) 0 ;
   53826         103 :   PyObject *swig_obj[1] ;
   53827         103 :   GDALMultiDimTranslateOptions *result = 0 ;
   53828             :   
   53829         103 :   if (!args) SWIG_fail;
   53830         103 :   swig_obj[0] = args;
   53831         103 :   {
   53832             :     /* %typemap(in) char **dict */
   53833         103 :     arg1 = NULL;
   53834         103 :     if ( PySequence_Check( swig_obj[0] ) ) {
   53835         103 :       int bErr = FALSE;
   53836         103 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   53837         103 :       if ( bErr )
   53838             :       {
   53839           0 :         SWIG_fail;
   53840             :       }
   53841             :     }
   53842           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   53843           0 :       int bErr = FALSE;
   53844           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   53845           0 :       if ( bErr )
   53846             :       {
   53847           0 :         SWIG_fail;
   53848             :       }
   53849             :     }
   53850             :     else {
   53851           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   53852           0 :       SWIG_fail;
   53853             :     }
   53854             :   }
   53855         103 :   {
   53856         103 :     const int bLocalUseExceptions = GetUseExceptions();
   53857         103 :     if ( bLocalUseExceptions ) {
   53858          24 :       pushErrorHandler();
   53859             :     }
   53860         103 :     {
   53861         103 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53862         103 :       result = (GDALMultiDimTranslateOptions *)new_GDALMultiDimTranslateOptions(arg1);
   53863         103 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53864             :     }
   53865         103 :     if ( bLocalUseExceptions ) {
   53866          24 :       popErrorHandler();
   53867             :     }
   53868             : #ifndef SED_HACKS
   53869             :     if ( bLocalUseExceptions ) {
   53870             :       CPLErr eclass = CPLGetLastErrorType();
   53871             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53872             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53873             :       }
   53874             :     }
   53875             : #endif
   53876             :   }
   53877         103 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMultiDimTranslateOptions, SWIG_POINTER_NEW |  0 );
   53878         103 :   {
   53879             :     /* %typemap(freearg) char **dict */
   53880         103 :     CSLDestroy( arg1 );
   53881             :   }
   53882         103 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   53883             :   return resultobj;
   53884           0 : fail:
   53885           0 :   {
   53886             :     /* %typemap(freearg) char **dict */
   53887           0 :     CSLDestroy( arg1 );
   53888             :   }
   53889             :   return NULL;
   53890             : }
   53891             : 
   53892             : 
   53893         103 : SWIGINTERN PyObject *_wrap_delete_GDALMultiDimTranslateOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53894         103 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53895         103 :   GDALMultiDimTranslateOptions *arg1 = (GDALMultiDimTranslateOptions *) 0 ;
   53896         103 :   void *argp1 = 0 ;
   53897         103 :   int res1 = 0 ;
   53898         103 :   PyObject *swig_obj[1] ;
   53899             :   
   53900         103 :   if (!args) SWIG_fail;
   53901         103 :   swig_obj[0] = args;
   53902         103 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMultiDimTranslateOptions, SWIG_POINTER_DISOWN |  0 );
   53903         103 :   if (!SWIG_IsOK(res1)) {
   53904           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALMultiDimTranslateOptions" "', argument " "1"" of type '" "GDALMultiDimTranslateOptions *""'"); 
   53905             :   }
   53906         103 :   arg1 = reinterpret_cast< GDALMultiDimTranslateOptions * >(argp1);
   53907         103 :   {
   53908         103 :     const int bLocalUseExceptions = GetUseExceptions();
   53909         103 :     if ( bLocalUseExceptions ) {
   53910          24 :       pushErrorHandler();
   53911             :     }
   53912         103 :     {
   53913         103 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53914         103 :       delete_GDALMultiDimTranslateOptions(arg1);
   53915         103 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53916             :     }
   53917         103 :     if ( bLocalUseExceptions ) {
   53918          24 :       popErrorHandler();
   53919             :     }
   53920             : #ifndef SED_HACKS
   53921             :     if ( bLocalUseExceptions ) {
   53922             :       CPLErr eclass = CPLGetLastErrorType();
   53923             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53924             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53925             :       }
   53926             :     }
   53927             : #endif
   53928             :   }
   53929         103 :   resultobj = SWIG_Py_Void();
   53930         103 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   53931             :   return resultobj;
   53932             : fail:
   53933             :   return NULL;
   53934             : }
   53935             : 
   53936             : 
   53937         271 : SWIGINTERN PyObject *GDALMultiDimTranslateOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53938         271 :   PyObject *obj;
   53939         271 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   53940         271 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALMultiDimTranslateOptions, SWIG_NewClientData(obj));
   53941         271 :   return SWIG_Py_Void();
   53942             : }
   53943             : 
   53944         103 : SWIGINTERN PyObject *GDALMultiDimTranslateOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53945         103 :   return SWIG_Python_InitShadowInstance(args);
   53946             : }
   53947             : 
   53948         103 : SWIGINTERN PyObject *_wrap_wrapper_GDALMultiDimTranslateDestName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53949         103 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53950         103 :   char *arg1 = (char *) 0 ;
   53951         103 :   int arg2 ;
   53952         103 :   GDALDatasetShadow **arg3 = (GDALDatasetShadow **) 0 ;
   53953         103 :   GDALMultiDimTranslateOptions *arg4 = (GDALMultiDimTranslateOptions *) 0 ;
   53954         103 :   GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
   53955         103 :   void *arg6 = (void *) NULL ;
   53956         103 :   int bToFree1 = 0 ;
   53957         103 :   void *argp4 = 0 ;
   53958         103 :   int res4 = 0 ;
   53959         103 :   PyObject *swig_obj[5] ;
   53960         103 :   GDALDatasetShadow *result = 0 ;
   53961             :   
   53962             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   53963         103 :   PyProgressData *psProgressInfo;
   53964         103 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   53965         103 :   psProgressInfo->nLastReported = -1;
   53966         103 :   psProgressInfo->psPyCallback = NULL;
   53967         103 :   psProgressInfo->psPyCallbackData = NULL;
   53968         103 :   arg6 = psProgressInfo;
   53969         103 :   if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALMultiDimTranslateDestName", 3, 5, swig_obj)) SWIG_fail;
   53970         103 :   {
   53971             :     /* %typemap(in) (const char *utf8_path) */
   53972         103 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   53973             :     {
   53974           7 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   53975             :     }
   53976             :     else
   53977             :     {
   53978          96 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   53979             :       
   53980             :     }
   53981         103 :     if (arg1 == NULL)
   53982             :     {
   53983           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   53984           0 :       SWIG_fail;
   53985             :     }
   53986             :   }
   53987         103 :   {
   53988             :     /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALDatasetShadow *optional_##GDALDatasetShadow)*/
   53989         103 :     if ( !PySequence_Check(swig_obj[1]) ) {
   53990           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   53991           0 :       SWIG_fail;
   53992             :     }
   53993         103 :     Py_ssize_t size = PySequence_Size(swig_obj[1]);
   53994         103 :     if( size > (Py_ssize_t)INT_MAX ) {
   53995           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   53996           0 :       SWIG_fail;
   53997             :     }
   53998         103 :     if( (size_t)size > SIZE_MAX / sizeof(GDALDatasetShadow*) ) {
   53999           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   54000           0 :       SWIG_fail;
   54001             :     }
   54002         103 :     arg2 = (int)size;
   54003         103 :     arg3 = (GDALDatasetShadow**) VSIMalloc(arg2*sizeof(GDALDatasetShadow*));
   54004         103 :     if( !arg3) {
   54005           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   54006           0 :       SWIG_fail;
   54007             :     }
   54008             :     
   54009         206 :     for( int i = 0; i<arg2; i++ ) {
   54010         103 :       PyObject *o = PySequence_GetItem(swig_obj[1],i);
   54011         103 :       GDALDatasetShadow* rawobjectpointer = NULL;
   54012         103 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_EXCEPTION | 0 ));
   54013         103 :       if (!rawobjectpointer) {
   54014           0 :         Py_DECREF(o);
   54015           0 :         PyErr_SetString(PyExc_TypeError, "object of wrong GDALDatasetShadow");
   54016           0 :         SWIG_fail;
   54017             :       }
   54018         103 :       arg3[i] = rawobjectpointer;
   54019         103 :       Py_DECREF(o);
   54020             :       
   54021             :     }
   54022             :   }
   54023         103 :   res4 = SWIG_ConvertPtr(swig_obj[2], &argp4,SWIGTYPE_p_GDALMultiDimTranslateOptions, 0 |  0 );
   54024         103 :   if (!SWIG_IsOK(res4)) {
   54025           0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "wrapper_GDALMultiDimTranslateDestName" "', argument " "4"" of type '" "GDALMultiDimTranslateOptions *""'"); 
   54026             :   }
   54027         103 :   arg4 = reinterpret_cast< GDALMultiDimTranslateOptions * >(argp4);
   54028         103 :   if (swig_obj[3]) {
   54029         103 :     {
   54030             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   54031             :       /* callback_func typemap */
   54032             :       
   54033             :       /* In some cases 0 is passed instead of None. */
   54034             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   54035         103 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   54036             :       {
   54037           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   54038             :         {
   54039           0 :           swig_obj[3] = Py_None;
   54040             :         }
   54041             :       }
   54042             :       
   54043         103 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   54044           0 :         void* cbfunction = NULL;
   54045           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   54046             :             (void**)&cbfunction,
   54047             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   54048             :             SWIG_POINTER_EXCEPTION | 0 ));
   54049             :         
   54050           0 :         if ( cbfunction == GDALTermProgress ) {
   54051             :           arg5 = GDALTermProgress;
   54052             :         } else {
   54053           0 :           if (!PyCallable_Check(swig_obj[3])) {
   54054           0 :             PyErr_SetString( PyExc_RuntimeError,
   54055             :               "Object given is not a Python function" );
   54056           0 :             SWIG_fail;
   54057             :           }
   54058           0 :           psProgressInfo->psPyCallback = swig_obj[3];
   54059           0 :           arg5 = PyProgressProxy;
   54060             :         }
   54061             :         
   54062             :       }
   54063             :       
   54064             :     }
   54065             :   }
   54066         103 :   if (swig_obj[4]) {
   54067         103 :     {
   54068             :       /* %typemap(in) ( void* callback_data=NULL)  */
   54069         103 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   54070             :     }
   54071             :   }
   54072         103 :   {
   54073         103 :     if (!arg1) {
   54074         103 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   54075             :     }
   54076             :   }
   54077         103 :   {
   54078         103 :     const int bLocalUseExceptions = GetUseExceptions();
   54079         103 :     if ( bLocalUseExceptions ) {
   54080          24 :       pushErrorHandler();
   54081             :     }
   54082         103 :     {
   54083         103 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   54084         103 :       result = (GDALDatasetShadow *)wrapper_GDALMultiDimTranslateDestName((char const *)arg1,arg2,arg3,arg4,arg5,arg6);
   54085         103 :       SWIG_PYTHON_THREAD_END_ALLOW;
   54086             :     }
   54087         103 :     if ( bLocalUseExceptions ) {
   54088          24 :       popErrorHandler();
   54089             :     }
   54090             : #ifndef SED_HACKS
   54091             :     if ( bLocalUseExceptions ) {
   54092             :       CPLErr eclass = CPLGetLastErrorType();
   54093             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   54094             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   54095             :       }
   54096             :     }
   54097             : #endif
   54098             :   }
   54099         103 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   54100         103 :   {
   54101             :     /* %typemap(freearg) (const char *utf8_path) */
   54102         103 :     GDALPythonFreeCStr(arg1, bToFree1);
   54103             :   }
   54104         103 :   {
   54105             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDatasetShadow **poObjects)*/
   54106         103 :     CPLFree( arg3 );
   54107             :   }
   54108         103 :   {
   54109             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   54110             :     
   54111         103 :     CPLFree(psProgressInfo);
   54112             :     
   54113             :   }
   54114         111 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
   54115             :   return resultobj;
   54116           0 : fail:
   54117           0 :   {
   54118             :     /* %typemap(freearg) (const char *utf8_path) */
   54119           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   54120             :   }
   54121           0 :   {
   54122             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDatasetShadow **poObjects)*/
   54123           0 :     CPLFree( arg3 );
   54124             :   }
   54125           0 :   {
   54126             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   54127             :     
   54128           0 :     CPLFree(psProgressInfo);
   54129             :     
   54130             :   }
   54131             :   return NULL;
   54132             : }
   54133             : 
   54134             : 
   54135             : static PyMethodDef SwigMethods[] = {
   54136             :    { "SWIG_PyInstanceMethod_New", SWIG_PyInstanceMethod_New, METH_O, NULL},
   54137             :    { "GetUseExceptions", _wrap_GetUseExceptions, METH_NOARGS, "GetUseExceptions() -> int"},
   54138             :    { "_GetExceptionsLocal", _wrap__GetExceptionsLocal, METH_NOARGS, "_GetExceptionsLocal() -> int"},
   54139             :    { "_SetExceptionsLocal", _wrap__SetExceptionsLocal, METH_O, "_SetExceptionsLocal(int bVal)"},
   54140             :    { "_UseExceptions", _wrap__UseExceptions, METH_NOARGS, "_UseExceptions()"},
   54141             :    { "_DontUseExceptions", _wrap__DontUseExceptions, METH_NOARGS, "_DontUseExceptions()"},
   54142             :    { "_UserHasSpecifiedIfUsingExceptions", _wrap__UserHasSpecifiedIfUsingExceptions, METH_NOARGS, "_UserHasSpecifiedIfUsingExceptions() -> int"},
   54143             :    { "VSIFReadL", _wrap_VSIFReadL, METH_VARARGS, "VSIFReadL(unsigned int nMembSize, unsigned int nMembCount, VSILFILE fp) -> unsigned int"},
   54144             :    { "VSIGetMemFileBuffer_unsafe", _wrap_VSIGetMemFileBuffer_unsafe, METH_O, "VSIGetMemFileBuffer_unsafe(char const * utf8_path)"},
   54145             :    { "Debug", _wrap_Debug, METH_VARARGS, "Debug(char const * msg_class, char const * message)"},
   54146             :    { "SetErrorHandler", _wrap_SetErrorHandler, METH_VARARGS, "SetErrorHandler(CPLErrorHandler pfnErrorHandler=0) -> CPLErr"},
   54147             :    { "SetCurrentErrorHandlerCatchDebug", _wrap_SetCurrentErrorHandlerCatchDebug, METH_O, "SetCurrentErrorHandlerCatchDebug(int bCatchDebug)"},
   54148             :    { "PushErrorHandler", _wrap_PushErrorHandler, METH_VARARGS, "PushErrorHandler(CPLErrorHandler pfnErrorHandler=0) -> CPLErr"},
   54149             :    { "PopErrorHandler", _wrap_PopErrorHandler, METH_NOARGS, "PopErrorHandler()"},
   54150             :    { "Error", _wrap_Error, METH_VARARGS, "Error(CPLErr msg_class=CE_Failure, int err_code=0, char const * msg=\"error\")"},
   54151             :    { "GOA2GetAuthorizationURL", _wrap_GOA2GetAuthorizationURL, METH_O, "GOA2GetAuthorizationURL(char const * pszScope) -> retStringAndCPLFree *"},
   54152             :    { "GOA2GetRefreshToken", _wrap_GOA2GetRefreshToken, METH_VARARGS, "GOA2GetRefreshToken(char const * pszAuthToken, char const * pszScope) -> retStringAndCPLFree *"},
   54153             :    { "GOA2GetAccessToken", _wrap_GOA2GetAccessToken, METH_VARARGS, "GOA2GetAccessToken(char const * pszRefreshToken, char const * pszScope) -> retStringAndCPLFree *"},
   54154             :    { "ErrorReset", _wrap_ErrorReset, METH_NOARGS, "ErrorReset()"},
   54155             :    { "wrapper_EscapeString", (PyCFunction)(void(*)(void))_wrap_wrapper_EscapeString, METH_VARARGS|METH_KEYWORDS, "wrapper_EscapeString(int len, int scheme=CPLES_SQL) -> retStringAndCPLFree *"},
   54156             :    { "EscapeBinary", (PyCFunction)(void(*)(void))_wrap_EscapeBinary, METH_VARARGS|METH_KEYWORDS, "EscapeBinary(int len, int scheme=CPLES_SQL)"},
   54157             :    { "GetLastErrorNo", _wrap_GetLastErrorNo, METH_NOARGS, "GetLastErrorNo() -> int"},
   54158             :    { "GetLastErrorType", _wrap_GetLastErrorType, METH_NOARGS, "GetLastErrorType() -> int"},
   54159             :    { "GetLastErrorMsg", _wrap_GetLastErrorMsg, METH_NOARGS, "GetLastErrorMsg() -> char const *"},
   54160             :    { "GetErrorCounter", _wrap_GetErrorCounter, METH_NOARGS, "GetErrorCounter() -> unsigned int"},
   54161             :    { "VSIGetLastErrorNo", _wrap_VSIGetLastErrorNo, METH_NOARGS, "VSIGetLastErrorNo() -> int"},
   54162             :    { "VSIGetLastErrorMsg", _wrap_VSIGetLastErrorMsg, METH_NOARGS, "VSIGetLastErrorMsg() -> char const *"},
   54163             :    { "VSIErrorReset", _wrap_VSIErrorReset, METH_NOARGS, "VSIErrorReset()"},
   54164             :    { "PushFinderLocation", _wrap_PushFinderLocation, METH_O, "PushFinderLocation(char const * utf8_path)"},
   54165             :    { "PopFinderLocation", _wrap_PopFinderLocation, METH_NOARGS, "PopFinderLocation()"},
   54166             :    { "FinderClean", _wrap_FinderClean, METH_NOARGS, "FinderClean()"},
   54167             :    { "FindFile", _wrap_FindFile, METH_VARARGS, "FindFile(char const * pszClass, char const * utf8_path) -> char const *"},
   54168             :    { "ReadDir", _wrap_ReadDir, METH_VARARGS, "ReadDir(char const * utf8_path, int nMaxFiles=0) -> char **"},
   54169             :    { "ReadDirRecursive", _wrap_ReadDirRecursive, METH_O, "ReadDirRecursive(char const * utf8_path) -> char **"},
   54170             :    { "OpenDir", _wrap_OpenDir, METH_VARARGS, "OpenDir(char const * utf8_path, int nRecurseDepth=-1, char ** options=None) -> VSIDIR *"},
   54171             :    { "DirEntry_name_get", _wrap_DirEntry_name_get, METH_O, "DirEntry_name_get(DirEntry self) -> char *"},
   54172             :    { "DirEntry_mode_get", _wrap_DirEntry_mode_get, METH_O, "DirEntry_mode_get(DirEntry self) -> int"},
   54173             :    { "DirEntry_size_get", _wrap_DirEntry_size_get, METH_O, "DirEntry_size_get(DirEntry self) -> GIntBig"},
   54174             :    { "DirEntry_mtime_get", _wrap_DirEntry_mtime_get, METH_O, "DirEntry_mtime_get(DirEntry self) -> GIntBig"},
   54175             :    { "DirEntry_modeKnown_get", _wrap_DirEntry_modeKnown_get, METH_O, "DirEntry_modeKnown_get(DirEntry self) -> bool"},
   54176             :    { "DirEntry_sizeKnown_get", _wrap_DirEntry_sizeKnown_get, METH_O, "DirEntry_sizeKnown_get(DirEntry self) -> bool"},
   54177             :    { "DirEntry_mtimeKnown_get", _wrap_DirEntry_mtimeKnown_get, METH_O, "DirEntry_mtimeKnown_get(DirEntry self) -> bool"},
   54178             :    { "DirEntry_extra_get", _wrap_DirEntry_extra_get, METH_O, "DirEntry_extra_get(DirEntry self) -> char **"},
   54179             :    { "new_DirEntry", _wrap_new_DirEntry, METH_O, "new_DirEntry(DirEntry entryIn) -> DirEntry"},
   54180             :    { "delete_DirEntry", _wrap_delete_DirEntry, METH_O, "delete_DirEntry(DirEntry self)"},
   54181             :    { "DirEntry_IsDirectory", _wrap_DirEntry_IsDirectory, METH_O, "DirEntry_IsDirectory(DirEntry self) -> bool"},
   54182             :    { "DirEntry_swigregister", DirEntry_swigregister, METH_O, NULL},
   54183             :    { "DirEntry_swiginit", DirEntry_swiginit, METH_VARARGS, NULL},
   54184             :    { "GetNextDirEntry", _wrap_GetNextDirEntry, METH_O, "GetNextDirEntry(VSIDIR * dir) -> DirEntry"},
   54185             :    { "CloseDir", _wrap_CloseDir, METH_O, "CloseDir(VSIDIR * dir)"},
   54186             :    { "SetConfigOption", _wrap_SetConfigOption, METH_VARARGS, "\n"
   54187             :     "SetConfigOption(char const * pszKey, char const * pszValue)\n"
   54188             :     "\n"
   54189             :     "\n"
   54190             :     "Set the value of a configuration option for all threads.\n"
   54191             :     "See :cpp:func:`CPLSetConfigOption`.\n"
   54192             :     "\n"
   54193             :     "Parameters\n"
   54194             :     "----------\n"
   54195             :     "pszKey : str\n"
   54196             :     "    name of the configuration option\n"
   54197             :     "pszValue : str\n"
   54198             :     "    value of the configuration option\n"
   54199             :     "\n"
   54200             :     "See Also\n"
   54201             :     "--------\n"
   54202             :     ":py:func:`SetThreadLocalConfigOption`\n"
   54203             :     ":py:func:`config_option`\n"
   54204             :     ":py:func:`config_options`\n"
   54205             :     "\n"
   54206             :     "\n"
   54207             :     ""},
   54208             :    { "SetThreadLocalConfigOption", _wrap_SetThreadLocalConfigOption, METH_VARARGS, "\n"
   54209             :     "SetThreadLocalConfigOption(char const * pszKey, char const * pszValue)\n"
   54210             :     "\n"
   54211             :     "\n"
   54212             :     "Set the value of a configuration option for the current thread.\n"
   54213             :     "See :cpp:func:`CPLSetThreadLocalConfigOption`.\n"
   54214             :     "\n"
   54215             :     "Parameters\n"
   54216             :     "----------\n"
   54217             :     "pszKey : str\n"
   54218             :     "    name of the configuration option\n"
   54219             :     "pszValue : str\n"
   54220             :     "    value of the configuration option\n"
   54221             :     "\n"
   54222             :     "See Also\n"
   54223             :     "--------\n"
   54224             :     ":py:func:`SetConfigOption`\n"
   54225             :     ":py:func:`config_option`\n"
   54226             :     ":py:func:`config_options`\n"
   54227             :     "\n"
   54228             :     ""},
   54229             :    { "GetConfigOption", _wrap_GetConfigOption, METH_VARARGS, "\n"
   54230             :     "GetConfigOption(char const * pszKey, char const * pszDefault=None) -> char const *\n"
   54231             :     "\n"
   54232             :     "\n"
   54233             :     "Return the value of a configuration option.\n"
   54234             :     "See :cpp:func:`CPLGetConfigOption`.\n"
   54235             :     "\n"
   54236             :     "Parameters\n"
   54237             :     "----------\n"
   54238             :     "pszKey : str\n"
   54239             :     "    name of the configuration option\n"
   54240             :     "pszDefault : str, optional\n"
   54241             :     "    default value to return if the option has not been set\n"
   54242             :     "\n"
   54243             :     "Returns\n"
   54244             :     "-------\n"
   54245             :     "str\n"
   54246             :     "\n"
   54247             :     "See Also\n"
   54248             :     "--------\n"
   54249             :     ":py:func:`GetConfigOptions`\n"
   54250             :     ":py:func:`GetThreadLocalConfigOption`\n"
   54251             :     "\n"
   54252             :     ""},
   54253             :    { "GetGlobalConfigOption", _wrap_GetGlobalConfigOption, METH_VARARGS, "\n"
   54254             :     "GetGlobalConfigOption(char const * pszKey, char const * pszDefault=None) -> char const *\n"
   54255             :     "\n"
   54256             :     "\n"
   54257             :     "Return the value of a global (not thread-local) configuration option.\n"
   54258             :     "See :cpp:func:`CPLGetGlobalConfigOption`.\n"
   54259             :     "\n"
   54260             :     "Parameters\n"
   54261             :     "----------\n"
   54262             :     "pszKey : str\n"
   54263             :     "    name of the configuration option\n"
   54264             :     "pszDefault : str, optional\n"
   54265             :     "    default value to return if the option has not been set\n"
   54266             :     "\n"
   54267             :     "Returns\n"
   54268             :     "-------\n"
   54269             :     "str\n"
   54270             :     "\n"
   54271             :     ""},
   54272             :    { "GetThreadLocalConfigOption", _wrap_GetThreadLocalConfigOption, METH_VARARGS, "\n"
   54273             :     "GetThreadLocalConfigOption(char const * pszKey, char const * pszDefault=None) -> char const *\n"
   54274             :     "\n"
   54275             :     "\n"
   54276             :     "Return the value of a thread-local configuration option.\n"
   54277             :     "See :cpp:func:`CPLGetThreadLocalConfigOption`.\n"
   54278             :     "\n"
   54279             :     "Parameters\n"
   54280             :     "----------\n"
   54281             :     "pszKey : str\n"
   54282             :     "    name of the configuration option\n"
   54283             :     "pszDefault : str, optional\n"
   54284             :     "    default value to return if the option has not been set\n"
   54285             :     "\n"
   54286             :     "Returns\n"
   54287             :     "-------\n"
   54288             :     "str\n"
   54289             :     "\n"
   54290             :     "\n"
   54291             :     ""},
   54292             :    { "GetConfigOptions", _wrap_GetConfigOptions, METH_NOARGS, "\n"
   54293             :     "GetConfigOptions() -> char **\n"
   54294             :     "\n"
   54295             :     "\n"
   54296             :     "Return a dictionary of currently set configuration options.\n"
   54297             :     "See :cpp:func:`CPLGetConfigOptions`.\n"
   54298             :     "\n"
   54299             :     "Returns\n"
   54300             :     "-------\n"
   54301             :     "dict\n"
   54302             :     "\n"
   54303             :     "Examples\n"
   54304             :     "--------\n"
   54305             :     ">>> with gdal.config_options({'A': '3', 'B': '4'}):\n"
   54306             :     "...     gdal.SetConfigOption('C', '5')\n"
   54307             :     "...     gdal.GetConfigOptions()\n"
   54308             :     "...\n"
   54309             :     "{'C': '5', 'A': '3', 'B': '4'}\n"
   54310             :     "\n"
   54311             :     "See Also\n"
   54312             :     "--------\n"
   54313             :     ":py:func:`GetConfigOption`\n"
   54314             :     ":py:func:`GetGlobalConfigOptions`\n"
   54315             :     "\n"
   54316             :     ""},
   54317             :    { "SetPathSpecificOption", _wrap_SetPathSpecificOption, METH_VARARGS, "SetPathSpecificOption(char const * pszPathPrefix, char const * pszKey, char const * pszValue)"},
   54318             :    { "SetCredential", _wrap_SetCredential, METH_VARARGS, "SetCredential(char const * pszPathPrefix, char const * pszKey, char const * pszValue)"},
   54319             :    { "GetCredential", _wrap_GetCredential, METH_VARARGS, "GetCredential(char const * pszPathPrefix, char const * pszKey, char const * pszDefault=None) -> char const *"},
   54320             :    { "GetPathSpecificOption", _wrap_GetPathSpecificOption, METH_VARARGS, "GetPathSpecificOption(char const * pszPathPrefix, char const * pszKey, char const * pszDefault=None) -> char const *"},
   54321             :    { "ClearCredentials", _wrap_ClearCredentials, METH_VARARGS, "ClearCredentials(char const * pszPathPrefix=None)"},
   54322             :    { "ClearPathSpecificOptions", _wrap_ClearPathSpecificOptions, METH_VARARGS, "ClearPathSpecificOptions(char const * pszPathPrefix=None)"},
   54323             :    { "CPLBinaryToHex", _wrap_CPLBinaryToHex, METH_O, "CPLBinaryToHex(int nBytes) -> retStringAndCPLFree *"},
   54324             :    { "CPLHexToBinary", _wrap_CPLHexToBinary, METH_VARARGS, "CPLHexToBinary(char const * pszHex, int * pnBytes) -> GByte *"},
   54325             :    { "FileFromMemBuffer", _wrap_FileFromMemBuffer, METH_VARARGS, "FileFromMemBuffer(char const * utf8_path, GIntBig nBytes) -> VSI_RETVAL"},
   54326             :    { "Unlink", _wrap_Unlink, METH_O, "Unlink(char const * utf8_path) -> VSI_RETVAL"},
   54327             :    { "UnlinkBatch", _wrap_UnlinkBatch, METH_O, "UnlinkBatch(char ** files) -> bool"},
   54328             :    { "HasThreadSupport", _wrap_HasThreadSupport, METH_NOARGS, "HasThreadSupport() -> int"},
   54329             :    { "Mkdir", _wrap_Mkdir, METH_VARARGS, "Mkdir(char const * utf8_path, int mode) -> VSI_RETVAL"},
   54330             :    { "Rmdir", _wrap_Rmdir, METH_O, "Rmdir(char const * utf8_path) -> VSI_RETVAL"},
   54331             :    { "MkdirRecursive", _wrap_MkdirRecursive, METH_VARARGS, "MkdirRecursive(char const * utf8_path, int mode) -> VSI_RETVAL"},
   54332             :    { "RmdirRecursive", _wrap_RmdirRecursive, METH_O, "RmdirRecursive(char const * utf8_path) -> VSI_RETVAL"},
   54333             :    { "Rename", _wrap_Rename, METH_VARARGS, "Rename(char const * pszOld, char const * pszNew) -> VSI_RETVAL"},
   54334             :    { "Sync", (PyCFunction)(void(*)(void))_wrap_Sync, METH_VARARGS|METH_KEYWORDS, "Sync(char const * pszSource, char const * pszTarget, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> bool"},
   54335             :    { "AbortPendingUploads", _wrap_AbortPendingUploads, METH_O, "AbortPendingUploads(char const * utf8_path) -> bool"},
   54336             :    { "CopyFile", (PyCFunction)(void(*)(void))_wrap_CopyFile, METH_VARARGS|METH_KEYWORDS, "CopyFile(char const * pszSource, char const * pszTarget, VSILFILE fpSource=None, GIntBig nSourceSize=-1, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> int"},
   54337             :    { "GetActualURL", _wrap_GetActualURL, METH_O, "GetActualURL(char const * utf8_path) -> char const *"},
   54338             :    { "GetSignedURL", _wrap_GetSignedURL, METH_VARARGS, "GetSignedURL(char const * utf8_path, char ** options=None) -> retStringAndCPLFree *"},
   54339             :    { "GetFileSystemsPrefixes", _wrap_GetFileSystemsPrefixes, METH_NOARGS, "GetFileSystemsPrefixes() -> char **"},
   54340             :    { "GetFileSystemOptions", _wrap_GetFileSystemOptions, METH_O, "GetFileSystemOptions(char const * utf8_path) -> char const *"},
   54341             :    { "VSILFILE_swigregister", VSILFILE_swigregister, METH_O, NULL},
   54342             :    { "StatBuf_mode_get", _wrap_StatBuf_mode_get, METH_O, "StatBuf_mode_get(StatBuf self) -> int"},
   54343             :    { "StatBuf_size_get", _wrap_StatBuf_size_get, METH_O, "StatBuf_size_get(StatBuf self) -> GIntBig"},
   54344             :    { "StatBuf_mtime_get", _wrap_StatBuf_mtime_get, METH_O, "StatBuf_mtime_get(StatBuf self) -> GIntBig"},
   54345             :    { "new_StatBuf", _wrap_new_StatBuf, METH_O, "new_StatBuf(StatBuf psStatBuf) -> StatBuf"},
   54346             :    { "delete_StatBuf", _wrap_delete_StatBuf, METH_O, "delete_StatBuf(StatBuf self)"},
   54347             :    { "StatBuf_IsDirectory", _wrap_StatBuf_IsDirectory, METH_O, "StatBuf_IsDirectory(StatBuf self) -> int"},
   54348             :    { "StatBuf_swigregister", StatBuf_swigregister, METH_O, NULL},
   54349             :    { "StatBuf_swiginit", StatBuf_swiginit, METH_VARARGS, NULL},
   54350             :    { "VSIStatL", _wrap_VSIStatL, METH_VARARGS, "VSIStatL(char const * utf8_path, int nFlags=0) -> int"},
   54351             :    { "GetFileMetadata", _wrap_GetFileMetadata, METH_VARARGS, "GetFileMetadata(char const * utf8_path, char const * domain, char ** options=None) -> char **"},
   54352             :    { "SetFileMetadata", _wrap_SetFileMetadata, METH_VARARGS, "SetFileMetadata(char const * utf8_path, char ** metadata, char const * domain, char ** options=None) -> bool"},
   54353             :    { "VSIFOpenL", _wrap_VSIFOpenL, METH_VARARGS, "VSIFOpenL(char const * utf8_path, char const * pszMode) -> VSILFILE"},
   54354             :    { "VSIFOpenExL", _wrap_VSIFOpenExL, METH_VARARGS, "VSIFOpenExL(char const * utf8_path, char const * pszMode, int bSetError=FALSE, char ** options=None) -> VSILFILE"},
   54355             :    { "VSIFEofL", _wrap_VSIFEofL, METH_O, "VSIFEofL(VSILFILE fp) -> int"},
   54356             :    { "VSIFFlushL", _wrap_VSIFFlushL, METH_O, "VSIFFlushL(VSILFILE fp) -> int"},
   54357             :    { "VSIFCloseL", _wrap_VSIFCloseL, METH_O, "VSIFCloseL(VSILFILE fp) -> VSI_RETVAL"},
   54358             :    { "VSIFSeekL", _wrap_VSIFSeekL, METH_VARARGS, "VSIFSeekL(VSILFILE fp, GIntBig offset, int whence) -> int"},
   54359             :    { "VSIFTellL", _wrap_VSIFTellL, METH_O, "VSIFTellL(VSILFILE fp) -> GIntBig"},
   54360             :    { "VSIFTruncateL", _wrap_VSIFTruncateL, METH_VARARGS, "VSIFTruncateL(VSILFILE fp, GIntBig length) -> int"},
   54361             :    { "VSISupportsSparseFiles", _wrap_VSISupportsSparseFiles, METH_O, "VSISupportsSparseFiles(char const * utf8_path) -> int"},
   54362             :    { "VSIFGetRangeStatusL", _wrap_VSIFGetRangeStatusL, METH_VARARGS, "VSIFGetRangeStatusL(VSILFILE fp, GIntBig offset, GIntBig length) -> int"},
   54363             :    { "VSIFWriteL", _wrap_VSIFWriteL, METH_VARARGS, "VSIFWriteL(int nLen, int size, int memb, VSILFILE fp) -> int"},
   54364             :    { "VSICurlClearCache", _wrap_VSICurlClearCache, METH_NOARGS, "VSICurlClearCache()"},
   54365             :    { "VSICurlPartialClearCache", _wrap_VSICurlPartialClearCache, METH_O, "VSICurlPartialClearCache(char const * utf8_path)"},
   54366             :    { "NetworkStatsReset", _wrap_NetworkStatsReset, METH_NOARGS, "NetworkStatsReset()"},
   54367             :    { "NetworkStatsGetAsSerializedJSON", _wrap_NetworkStatsGetAsSerializedJSON, METH_VARARGS, "NetworkStatsGetAsSerializedJSON(char ** options=None) -> retStringAndCPLFree *"},
   54368             :    { "ParseCommandLine", _wrap_ParseCommandLine, METH_O, "ParseCommandLine(char const * utf8_path) -> char **"},
   54369             :    { "GetNumCPUs", _wrap_GetNumCPUs, METH_NOARGS, "\n"
   54370             :     "GetNumCPUs() -> int\n"
   54371             :     "\n"
   54372             :     "\n"
   54373             :     "Return the number of processors detected by GDAL.\n"
   54374             :     "\n"
   54375             :     "Returns\n"
   54376             :     "-------\n"
   54377             :     "int\n"
   54378             :     "\n"
   54379             :     ""},
   54380             :    { "GetUsablePhysicalRAM", _wrap_GetUsablePhysicalRAM, METH_NOARGS, "GetUsablePhysicalRAM() -> GIntBig"},
   54381             :    { "MajorObject_GetDescription", _wrap_MajorObject_GetDescription, METH_O, "MajorObject_GetDescription(MajorObject self) -> char const *"},
   54382             :    { "MajorObject_SetDescription", _wrap_MajorObject_SetDescription, METH_VARARGS, "MajorObject_SetDescription(MajorObject self, char const * pszNewDesc)"},
   54383             :    { "MajorObject_GetMetadataDomainList", _wrap_MajorObject_GetMetadataDomainList, METH_O, "MajorObject_GetMetadataDomainList(MajorObject self) -> char **"},
   54384             :    { "MajorObject_GetMetadata_Dict", _wrap_MajorObject_GetMetadata_Dict, METH_VARARGS, "MajorObject_GetMetadata_Dict(MajorObject self, char const * pszDomain=\"\") -> char **"},
   54385             :    { "MajorObject_GetMetadata_List", _wrap_MajorObject_GetMetadata_List, METH_VARARGS, "MajorObject_GetMetadata_List(MajorObject self, char const * pszDomain=\"\") -> char **"},
   54386             :    { "MajorObject_SetMetadata", _wrap_MajorObject_SetMetadata, METH_VARARGS, "\n"
   54387             :     "MajorObject_SetMetadata(MajorObject self, char ** papszMetadata, char const * pszDomain=\"\") -> CPLErr\n"
   54388             :     "MajorObject_SetMetadata(MajorObject self, char * pszMetadataString, char const * pszDomain=\"\") -> CPLErr\n"
   54389             :     ""},
   54390             :    { "MajorObject_GetMetadataItem", _wrap_MajorObject_GetMetadataItem, METH_VARARGS, "MajorObject_GetMetadataItem(MajorObject self, char const * pszName, char const * pszDomain=\"\") -> char const *"},
   54391             :    { "MajorObject_SetMetadataItem", _wrap_MajorObject_SetMetadataItem, METH_VARARGS, "MajorObject_SetMetadataItem(MajorObject self, char const * pszName, char const * pszValue, char const * pszDomain=\"\") -> CPLErr"},
   54392             :    { "MajorObject_swigregister", MajorObject_swigregister, METH_O, NULL},
   54393             :    { "Driver_ShortName_get", _wrap_Driver_ShortName_get, METH_O, "\n"
   54394             :     "Driver_ShortName_get(Driver self) -> char const *\n"
   54395             :     "\n"
   54396             :     "The short name of a :py:class:`Driver` that can be passed to\n"
   54397             :     ":py:func:`GetDriverByName`.\n"
   54398             :     "See :cpp:func:`GDALGetDriverShortName`.\n"
   54399             :     "\n"
   54400             :     ""},
   54401             :    { "Driver_LongName_get", _wrap_Driver_LongName_get, METH_O, "\n"
   54402             :     "Driver_LongName_get(Driver self) -> char const *\n"
   54403             :     "\n"
   54404             :     "The long name of the driver.\n"
   54405             :     "See :cpp:func:`GDALGetDriverLongName`.\n"
   54406             :     "\n"
   54407             :     ""},
   54408             :    { "Driver_HelpTopic_get", _wrap_Driver_HelpTopic_get, METH_O, "\n"
   54409             :     "Driver_HelpTopic_get(Driver self) -> char const *\n"
   54410             :     "\n"
   54411             :     "The URL for driver documentation, relative to the GDAL documentation directory.\n"
   54412             :     "See :cpp:func:`GDALGetDriverHelpTopic`.\n"
   54413             :     "\n"
   54414             :     ""},
   54415             :    { "Driver_Create", (PyCFunction)(void(*)(void))_wrap_Driver_Create, METH_VARARGS|METH_KEYWORDS, "\n"
   54416             :     "Driver_Create(Driver self, char const * utf8_path, int xsize, int ysize, int bands=1, GDALDataType eType=GDT_Byte, char ** options=None) -> Dataset\n"
   54417             :     "\n"
   54418             :     "\n"
   54419             :     "Create a new :py:class:`Dataset` with this driver.\n"
   54420             :     "See :cpp:func:`GDALDriver::Create`.\n"
   54421             :     "\n"
   54422             :     "Parameters\n"
   54423             :     "----------\n"
   54424             :     "utf8_path : str\n"
   54425             :     "   Path of the dataset to create.\n"
   54426             :     "xsize : int\n"
   54427             :     "   Width of created raster in pixels. Set to zero for vector datasets.\n"
   54428             :     "ysize : int\n"
   54429             :     "   Height of created raster in pixels. Set to zero for vector datasets.\n"
   54430             :     "bands : int, default = 1\n"
   54431             :     "    Number of bands. Set to zero for vector datasets.\n"
   54432             :     "eType : int, default = :py:const:`GDT_Byte`\n"
   54433             :     "    Raster data type. Set to :py:const:`GDT_Unknown` for vector datasets.\n"
   54434             :     "options : list/dict\n"
   54435             :     "    List of driver-specific options\n"
   54436             :     "\n"
   54437             :     "Returns\n"
   54438             :     "-------\n"
   54439             :     "Dataset\n"
   54440             :     "\n"
   54441             :     "Examples\n"
   54442             :     "--------\n"
   54443             :     ">>> with gdal.GetDriverByName('GTiff').Create('test.tif', 12, 4, 2, gdal.GDT_Float32, {'COMPRESS': 'DEFLATE'}) as ds:\n"
   54444             :     "...     print(gdal.Info(ds))\n"
   54445             :     "...\n"
   54446             :     "Driver: GTiff/GeoTIFF\n"
   54447             :     "Files: test.tif\n"
   54448             :     "Size is 12, 4\n"
   54449             :     "Image Structure Metadata:\n"
   54450             :     "  INTERLEAVE=PIXEL\n"
   54451             :     "Corner Coordinates:\n"
   54452             :     "Upper Left  (    0.0,    0.0)\n"
   54453             :     "Lower Left  (    0.0,    4.0)\n"
   54454             :     "Upper Right (   12.0,    0.0)\n"
   54455             :     "Lower Right (   12.0,    4.0)\n"
   54456             :     "Center      (    6.0,    2.0)\n"
   54457             :     "Band 1 Block=12x4 Type=Float32, ColorInterp=Gray\n"
   54458             :     "Band 2 Block=12x4 Type=Float32, ColorInterp=Undefined\n"
   54459             :     "\n"
   54460             :     ">>> with gdal.GetDriverByName('ESRI Shapefile').Create('test.shp', 0, 0, 0, gdal.GDT_Unknown) as ds:\n"
   54461             :     "...     print(gdal.VectorInfo(ds))\n"
   54462             :     "...\n"
   54463             :     "INFO: Open of `test.shp'\n"
   54464             :     "      using driver `ESRI Shapefile' successful.\n"
   54465             :     "\n"
   54466             :     ""},
   54467             :    { "Driver_CreateMultiDimensional", (PyCFunction)(void(*)(void))_wrap_Driver_CreateMultiDimensional, METH_VARARGS|METH_KEYWORDS, "\n"
   54468             :     "Driver_CreateMultiDimensional(Driver self, char const * utf8_path, char ** root_group_options=None, char ** options=None) -> Dataset\n"
   54469             :     "\n"
   54470             :     "\n"
   54471             :     "Create a new multidimensional dataset.\n"
   54472             :     "See :cpp:func:`GDALDriver::CreateMultiDimensional`.\n"
   54473             :     "\n"
   54474             :     "Parameters\n"
   54475             :     "----------\n"
   54476             :     "utf8_path : str\n"
   54477             :     "   Path of the dataset to create.\n"
   54478             :     "root_group_options : dict/list\n"
   54479             :     "   Driver-specific options regarding the creation of the\n"
   54480             :     "   root group.\n"
   54481             :     "options : list/dict\n"
   54482             :     "   List of driver-specific options regarding the creation\n"
   54483             :     "   of the Dataset.\n"
   54484             :     "\n"
   54485             :     "Returns\n"
   54486             :     "-------\n"
   54487             :     "Dataset\n"
   54488             :     "\n"
   54489             :     "Examples\n"
   54490             :     "--------\n"
   54491             :     ">>> with gdal.GetDriverByName('netCDF').CreateMultiDimensional('test.nc') as ds:\n"
   54492             :     "...     gdal.MultiDimInfo(ds)\n"
   54493             :     "...\n"
   54494             :     "{'type': 'group', 'driver': 'netCDF', 'name': '/', 'attributes': {'Conventions': 'CF-1.6'}, 'structural_info': {'NC_FORMAT': 'NETCDF4'}}\n"
   54495             :     "\n"
   54496             :     "\n"
   54497             :     ""},
   54498             :    { "Driver_CreateCopy", (PyCFunction)(void(*)(void))_wrap_Driver_CreateCopy, METH_VARARGS|METH_KEYWORDS, "\n"
   54499             :     "Driver_CreateCopy(Driver self, char const * utf8_path, Dataset src, int strict=1, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset\n"
   54500             :     "\n"
   54501             :     "\n"
   54502             :     "Create a copy of a :py:class:`Dataset`.\n"
   54503             :     "See :cpp:func:`GDALDriver::CreateCopy`.\n"
   54504             :     "\n"
   54505             :     "Parameters\n"
   54506             :     "----------\n"
   54507             :     "utf8_path : str\n"
   54508             :     "   Path of the dataset to create.\n"
   54509             :     "src : Dataset\n"
   54510             :     "   The Dataset being duplicated.\n"
   54511             :     "strict : bool, default=1\n"
   54512             :     "   Indicates whether the copy must be strictly equivalent or if\n"
   54513             :     "   it may be adapted as needed for the output format.\n"
   54514             :     "options : list/dict\n"
   54515             :     "   List of driver-specific options\n"
   54516             :     "callback : function, optional\n"
   54517             :     "   A progress callback function\n"
   54518             :     "callback_data: optional\n"
   54519             :     "   Optional data to be passed to callback function\n"
   54520             :     "\n"
   54521             :     "Returns\n"
   54522             :     "-------\n"
   54523             :     "Dataset\n"
   54524             :     "\n"
   54525             :     ""},
   54526             :    { "Driver_Delete", _wrap_Driver_Delete, METH_VARARGS, "\n"
   54527             :     "Driver_Delete(Driver self, char const * utf8_path) -> CPLErr\n"
   54528             :     "\n"
   54529             :     "Delete a :py:class:`Dataset`.\n"
   54530             :     "See :cpp:func:`GDALDriver::Delete`.\n"
   54531             :     "\n"
   54532             :     "Parameters\n"
   54533             :     "----------\n"
   54534             :     "utf8_path : str\n"
   54535             :     "   Path of the dataset to delete.\n"
   54536             :     "\n"
   54537             :     "Returns\n"
   54538             :     "-------\n"
   54539             :     "int:\n"
   54540             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   54541             :     "\n"
   54542             :     ""},
   54543             :    { "Driver_Rename", _wrap_Driver_Rename, METH_VARARGS, "\n"
   54544             :     "Driver_Rename(Driver self, char const * newName, char const * oldName) -> CPLErr\n"
   54545             :     "\n"
   54546             :     "Rename a :py:class:`Dataset`.\n"
   54547             :     "See :cpp:func:`GDALDriver::Rename`.\n"
   54548             :     "\n"
   54549             :     "Parameters\n"
   54550             :     "----------\n"
   54551             :     "newName : str\n"
   54552             :     "    new path for the dataset\n"
   54553             :     "oldName : str\n"
   54554             :     "    old path for the dataset\n"
   54555             :     "\n"
   54556             :     "Returns\n"
   54557             :     "-------\n"
   54558             :     "int:\n"
   54559             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   54560             :     "\n"
   54561             :     ""},
   54562             :    { "Driver_CopyFiles", _wrap_Driver_CopyFiles, METH_VARARGS, "\n"
   54563             :     "Driver_CopyFiles(Driver self, char const * newName, char const * oldName) -> CPLErr\n"
   54564             :     "\n"
   54565             :     "Copy all the files associated with a :py:class:`Dataset`.\n"
   54566             :     "\n"
   54567             :     "Parameters\n"
   54568             :     "----------\n"
   54569             :     "newName : str\n"
   54570             :     "    new path for the dataset\n"
   54571             :     "oldName : str\n"
   54572             :     "    old path for the dataset\n"
   54573             :     "\n"
   54574             :     "Returns\n"
   54575             :     "-------\n"
   54576             :     "int:\n"
   54577             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   54578             :     "\n"
   54579             :     ""},
   54580             :    { "Driver_TestCapability", _wrap_Driver_TestCapability, METH_VARARGS, "Driver_TestCapability(Driver self, char const * cap) -> bool"},
   54581             :    { "Driver_Register", _wrap_Driver_Register, METH_O, "\n"
   54582             :     "Driver_Register(Driver self) -> int\n"
   54583             :     "\n"
   54584             :     "Register the driver for use.\n"
   54585             :     "See :cpp:func:`GDALDriverManager::RegisterDriver`.\n"
   54586             :     "\n"
   54587             :     ""},
   54588             :    { "Driver_Deregister", _wrap_Driver_Deregister, METH_O, "\n"
   54589             :     "Driver_Deregister(Driver self)\n"
   54590             :     "\n"
   54591             :     "Deregister the driver.\n"
   54592             :     "See :cpp:func:`GDALDriverManager::DeregisterDriver`.\n"
   54593             :     "\n"
   54594             :     ""},
   54595             :    { "Driver_swigregister", Driver_swigregister, METH_O, NULL},
   54596             :    { "ColorEntry_c1_set", _wrap_ColorEntry_c1_set, METH_VARARGS, "ColorEntry_c1_set(ColorEntry self, short c1)"},
   54597             :    { "ColorEntry_c1_get", _wrap_ColorEntry_c1_get, METH_O, "ColorEntry_c1_get(ColorEntry self) -> short"},
   54598             :    { "ColorEntry_c2_set", _wrap_ColorEntry_c2_set, METH_VARARGS, "ColorEntry_c2_set(ColorEntry self, short c2)"},
   54599             :    { "ColorEntry_c2_get", _wrap_ColorEntry_c2_get, METH_O, "ColorEntry_c2_get(ColorEntry self) -> short"},
   54600             :    { "ColorEntry_c3_set", _wrap_ColorEntry_c3_set, METH_VARARGS, "ColorEntry_c3_set(ColorEntry self, short c3)"},
   54601             :    { "ColorEntry_c3_get", _wrap_ColorEntry_c3_get, METH_O, "ColorEntry_c3_get(ColorEntry self) -> short"},
   54602             :    { "ColorEntry_c4_set", _wrap_ColorEntry_c4_set, METH_VARARGS, "ColorEntry_c4_set(ColorEntry self, short c4)"},
   54603             :    { "ColorEntry_c4_get", _wrap_ColorEntry_c4_get, METH_O, "ColorEntry_c4_get(ColorEntry self) -> short"},
   54604             :    { "ColorEntry_swigregister", ColorEntry_swigregister, METH_O, NULL},
   54605             :    { "GCP_GCPX_set", _wrap_GCP_GCPX_set, METH_VARARGS, "GCP_GCPX_set(GCP self, double GCPX)"},
   54606             :    { "GCP_GCPX_get", _wrap_GCP_GCPX_get, METH_O, "GCP_GCPX_get(GCP self) -> double"},
   54607             :    { "GCP_GCPY_set", _wrap_GCP_GCPY_set, METH_VARARGS, "GCP_GCPY_set(GCP self, double GCPY)"},
   54608             :    { "GCP_GCPY_get", _wrap_GCP_GCPY_get, METH_O, "GCP_GCPY_get(GCP self) -> double"},
   54609             :    { "GCP_GCPZ_set", _wrap_GCP_GCPZ_set, METH_VARARGS, "GCP_GCPZ_set(GCP self, double GCPZ)"},
   54610             :    { "GCP_GCPZ_get", _wrap_GCP_GCPZ_get, METH_O, "GCP_GCPZ_get(GCP self) -> double"},
   54611             :    { "GCP_GCPPixel_set", _wrap_GCP_GCPPixel_set, METH_VARARGS, "GCP_GCPPixel_set(GCP self, double GCPPixel)"},
   54612             :    { "GCP_GCPPixel_get", _wrap_GCP_GCPPixel_get, METH_O, "GCP_GCPPixel_get(GCP self) -> double"},
   54613             :    { "GCP_GCPLine_set", _wrap_GCP_GCPLine_set, METH_VARARGS, "GCP_GCPLine_set(GCP self, double GCPLine)"},
   54614             :    { "GCP_GCPLine_get", _wrap_GCP_GCPLine_get, METH_O, "GCP_GCPLine_get(GCP self) -> double"},
   54615             :    { "GCP_Info_set", _wrap_GCP_Info_set, METH_VARARGS, "GCP_Info_set(GCP self, char * Info)"},
   54616             :    { "GCP_Info_get", _wrap_GCP_Info_get, METH_O, "GCP_Info_get(GCP self) -> char *"},
   54617             :    { "GCP_Id_set", _wrap_GCP_Id_set, METH_VARARGS, "GCP_Id_set(GCP self, char * Id)"},
   54618             :    { "GCP_Id_get", _wrap_GCP_Id_get, METH_O, "GCP_Id_get(GCP self) -> char *"},
   54619             :    { "new_GCP", _wrap_new_GCP, METH_VARARGS, "new_GCP(double x=0.0, double y=0.0, double z=0.0, double pixel=0.0, double line=0.0, char const * info=\"\", char const * id=\"\") -> GCP"},
   54620             :    { "delete_GCP", _wrap_delete_GCP, METH_O, "delete_GCP(GCP self)"},
   54621             :    { "GCP_swigregister", GCP_swigregister, METH_O, NULL},
   54622             :    { "GCP_swiginit", GCP_swiginit, METH_VARARGS, NULL},
   54623             :    { "GDAL_GCP_GCPX_get", _wrap_GDAL_GCP_GCPX_get, METH_O, "GDAL_GCP_GCPX_get(GCP gcp) -> double"},
   54624             :    { "GDAL_GCP_GCPX_set", _wrap_GDAL_GCP_GCPX_set, METH_VARARGS, "GDAL_GCP_GCPX_set(GCP gcp, double dfGCPX)"},
   54625             :    { "GDAL_GCP_GCPY_get", _wrap_GDAL_GCP_GCPY_get, METH_O, "GDAL_GCP_GCPY_get(GCP gcp) -> double"},
   54626             :    { "GDAL_GCP_GCPY_set", _wrap_GDAL_GCP_GCPY_set, METH_VARARGS, "GDAL_GCP_GCPY_set(GCP gcp, double dfGCPY)"},
   54627             :    { "GDAL_GCP_GCPZ_get", _wrap_GDAL_GCP_GCPZ_get, METH_O, "GDAL_GCP_GCPZ_get(GCP gcp) -> double"},
   54628             :    { "GDAL_GCP_GCPZ_set", _wrap_GDAL_GCP_GCPZ_set, METH_VARARGS, "GDAL_GCP_GCPZ_set(GCP gcp, double dfGCPZ)"},
   54629             :    { "GDAL_GCP_GCPPixel_get", _wrap_GDAL_GCP_GCPPixel_get, METH_O, "GDAL_GCP_GCPPixel_get(GCP gcp) -> double"},
   54630             :    { "GDAL_GCP_GCPPixel_set", _wrap_GDAL_GCP_GCPPixel_set, METH_VARARGS, "GDAL_GCP_GCPPixel_set(GCP gcp, double dfGCPPixel)"},
   54631             :    { "GDAL_GCP_GCPLine_get", _wrap_GDAL_GCP_GCPLine_get, METH_O, "GDAL_GCP_GCPLine_get(GCP gcp) -> double"},
   54632             :    { "GDAL_GCP_GCPLine_set", _wrap_GDAL_GCP_GCPLine_set, METH_VARARGS, "GDAL_GCP_GCPLine_set(GCP gcp, double dfGCPLine)"},
   54633             :    { "GDAL_GCP_Info_get", _wrap_GDAL_GCP_Info_get, METH_O, "GDAL_GCP_Info_get(GCP gcp) -> char const *"},
   54634             :    { "GDAL_GCP_Info_set", _wrap_GDAL_GCP_Info_set, METH_VARARGS, "GDAL_GCP_Info_set(GCP gcp, char const * pszInfo)"},
   54635             :    { "GDAL_GCP_Id_get", _wrap_GDAL_GCP_Id_get, METH_O, "GDAL_GCP_Id_get(GCP gcp) -> char const *"},
   54636             :    { "GDAL_GCP_Id_set", _wrap_GDAL_GCP_Id_set, METH_VARARGS, "GDAL_GCP_Id_set(GCP gcp, char const * pszId)"},
   54637             :    { "GCPsToGeoTransform", _wrap_GCPsToGeoTransform, METH_VARARGS, "GCPsToGeoTransform(int nGCPs, int bApproxOK=1) -> RETURN_NONE"},
   54638             :    { "delete_VirtualMem", _wrap_delete_VirtualMem, METH_O, "delete_VirtualMem(VirtualMem self)"},
   54639             :    { "VirtualMem_GetAddr", _wrap_VirtualMem_GetAddr, METH_O, "VirtualMem_GetAddr(VirtualMem self)"},
   54640             :    { "VirtualMem_Pin", _wrap_VirtualMem_Pin, METH_VARARGS, "VirtualMem_Pin(VirtualMem self, size_t start_offset=0, size_t nsize=0, int bWriteOp=0)"},
   54641             :    { "VirtualMem_swigregister", VirtualMem_swigregister, METH_O, NULL},
   54642             :    { "delete_AsyncReader", _wrap_delete_AsyncReader, METH_O, "delete_AsyncReader(AsyncReader self)"},
   54643             :    { "AsyncReader_GetNextUpdatedRegion", _wrap_AsyncReader_GetNextUpdatedRegion, METH_VARARGS, "AsyncReader_GetNextUpdatedRegion(AsyncReader self, double timeout) -> GDALAsyncStatusType"},
   54644             :    { "AsyncReader_GetBuffer", _wrap_AsyncReader_GetBuffer, METH_O, "AsyncReader_GetBuffer(AsyncReader self)"},
   54645             :    { "AsyncReader_LockBuffer", _wrap_AsyncReader_LockBuffer, METH_VARARGS, "AsyncReader_LockBuffer(AsyncReader self, double timeout) -> int"},
   54646             :    { "AsyncReader_UnlockBuffer", _wrap_AsyncReader_UnlockBuffer, METH_O, "AsyncReader_UnlockBuffer(AsyncReader self)"},
   54647             :    { "AsyncReader_swigregister", AsyncReader_swigregister, METH_O, NULL},
   54648             :    { "Dataset_RasterXSize_get", _wrap_Dataset_RasterXSize_get, METH_O, "\n"
   54649             :     "Dataset_RasterXSize_get(Dataset self) -> int\n"
   54650             :     "\n"
   54651             :     "\n"
   54652             :     "Raster width in pixels. See :cpp:func:`GDALGetRasterXSize`.\n"
   54653             :     "\n"
   54654             :     "\n"
   54655             :     ""},
   54656             :    { "Dataset_RasterYSize_get", _wrap_Dataset_RasterYSize_get, METH_O, "\n"
   54657             :     "Dataset_RasterYSize_get(Dataset self) -> int\n"
   54658             :     "\n"
   54659             :     "\n"
   54660             :     "Raster height in pixels. See :cpp:func:`GDALGetRasterYSize`.\n"
   54661             :     "\n"
   54662             :     "\n"
   54663             :     ""},
   54664             :    { "Dataset_RasterCount_get", _wrap_Dataset_RasterCount_get, METH_O, "\n"
   54665             :     "Dataset_RasterCount_get(Dataset self) -> int\n"
   54666             :     "\n"
   54667             :     "\n"
   54668             :     "The number of bands in this dataset.\n"
   54669             :     "\n"
   54670             :     "\n"
   54671             :     ""},
   54672             :    { "delete_Dataset", _wrap_delete_Dataset, METH_O, "delete_Dataset(Dataset self)"},
   54673             :    { "Dataset_Close", _wrap_Dataset_Close, METH_O, "\n"
   54674             :     "Dataset_Close(Dataset self) -> CPLErr\n"
   54675             :     "\n"
   54676             :     "Closes opened dataset and releases allocated resources.\n"
   54677             :     "\n"
   54678             :     "This method can be used to force the dataset to close\n"
   54679             :     "when one more references to the dataset are still\n"
   54680             :     "reachable. If :py:meth:`Close` is never called, the dataset will\n"
   54681             :     "be closed automatically during garbage collection.\n"
   54682             :     "\n"
   54683             :     "In most cases, it is preferable to open or create a dataset\n"
   54684             :     "using a context manager instead of calling :py:meth:`Close`\n"
   54685             :     "directly.\n"
   54686             :     "\n"
   54687             :     "\n"
   54688             :     ""},
   54689             :    { "Dataset_GetDriver", _wrap_Dataset_GetDriver, METH_O, "\n"
   54690             :     "Dataset_GetDriver(Dataset self) -> Driver\n"
   54691             :     "\n"
   54692             :     "\n"
   54693             :     "Fetch the driver used to open or create this :py:class:`Dataset`.\n"
   54694             :     "\n"
   54695             :     "\n"
   54696             :     ""},
   54697             :    { "Dataset_GetRasterBand", _wrap_Dataset_GetRasterBand, METH_VARARGS, "\n"
   54698             :     "Dataset_GetRasterBand(Dataset self, int nBand) -> Band\n"
   54699             :     "\n"
   54700             :     "\n"
   54701             :     "Fetch a :py:class:`Band` band from a :py:class:`Dataset`. See :cpp:func:`GDALGetRasterBand`.\n"
   54702             :     "\n"
   54703             :     "Parameters\n"
   54704             :     "-----------\n"
   54705             :     "nBand : int\n"
   54706             :     "    the index of the band to fetch, from 1 to :py:attr:`RasterCount`\n"
   54707             :     "\n"
   54708             :     "Returns\n"
   54709             :     "--------\n"
   54710             :     "Band:\n"
   54711             :     "    the :py:class:`Band`, or ``None`` on error.\n"
   54712             :     "\n"
   54713             :     "\n"
   54714             :     ""},
   54715             :    { "Dataset_GetRootGroup", _wrap_Dataset_GetRootGroup, METH_O, "\n"
   54716             :     "Dataset_GetRootGroup(Dataset self) -> Group\n"
   54717             :     "\n"
   54718             :     "\n"
   54719             :     "Return the root :py:class:`Group` of this dataset.\n"
   54720             :     "Only value for multidimensional datasets.\n"
   54721             :     "\n"
   54722             :     "Returns\n"
   54723             :     "-------\n"
   54724             :     "Group\n"
   54725             :     "\n"
   54726             :     "\n"
   54727             :     ""},
   54728             :    { "Dataset_GetProjection", _wrap_Dataset_GetProjection, METH_O, "\n"
   54729             :     "Dataset_GetProjection(Dataset self) -> char const *\n"
   54730             :     "\n"
   54731             :     "\n"
   54732             :     "Return a WKT representation of the dataset spatial reference.\n"
   54733             :     "Equivalent to :py:meth:`GetProjectionRef`.\n"
   54734             :     "\n"
   54735             :     "Returns\n"
   54736             :     "-------\n"
   54737             :     "str\n"
   54738             :     "\n"
   54739             :     "\n"
   54740             :     ""},
   54741             :    { "Dataset_GetProjectionRef", _wrap_Dataset_GetProjectionRef, METH_O, "\n"
   54742             :     "Dataset_GetProjectionRef(Dataset self) -> char const *\n"
   54743             :     "\n"
   54744             :     "\n"
   54745             :     "Return a WKT representation of the dataset spatial reference.\n"
   54746             :     "\n"
   54747             :     "Returns\n"
   54748             :     "-------\n"
   54749             :     "str\n"
   54750             :     "\n"
   54751             :     "\n"
   54752             :     ""},
   54753             :    { "Dataset_GetRefCount", _wrap_Dataset_GetRefCount, METH_O, "Dataset_GetRefCount(Dataset self) -> int"},
   54754             :    { "Dataset_GetSummaryRefCount", _wrap_Dataset_GetSummaryRefCount, METH_O, "Dataset_GetSummaryRefCount(Dataset self) -> int"},
   54755             :    { "Dataset_GetSpatialRef", _wrap_Dataset_GetSpatialRef, METH_O, "\n"
   54756             :     "Dataset_GetSpatialRef(Dataset self) -> SpatialReference\n"
   54757             :     "\n"
   54758             :     "\n"
   54759             :     "Fetch the spatial reference for this dataset.\n"
   54760             :     "\n"
   54761             :     "Returns\n"
   54762             :     "--------\n"
   54763             :     "osr.SpatialReference\n"
   54764             :     "\n"
   54765             :     "\n"
   54766             :     ""},
   54767             :    { "Dataset_SetProjection", _wrap_Dataset_SetProjection, METH_VARARGS, "\n"
   54768             :     "Dataset_SetProjection(Dataset self, char const * prj) -> CPLErr\n"
   54769             :     "\n"
   54770             :     "\n"
   54771             :     "Set the spatial reference system for this dataset.\n"
   54772             :     "\n"
   54773             :     "See :cpp:func:`GDALDataset::SetProjection`.\n"
   54774             :     "\n"
   54775             :     "Parameters\n"
   54776             :     "----------\n"
   54777             :     "prj:\n"
   54778             :     "   The projection string in OGC WKT or PROJ.4 format\n"
   54779             :     "\n"
   54780             :     "Returns\n"
   54781             :     "-------\n"
   54782             :     ":py:const:`CE_Failure` if an error occurs, otherwise :py:const:`CE_None`.\n"
   54783             :     "\n"
   54784             :     "\n"
   54785             :     ""},
   54786             :    { "Dataset_SetSpatialRef", _wrap_Dataset_SetSpatialRef, METH_VARARGS, "\n"
   54787             :     "Dataset_SetSpatialRef(Dataset self, SpatialReference srs) -> CPLErr\n"
   54788             :     "\n"
   54789             :     "\n"
   54790             :     "Set the spatial reference system for this dataset.\n"
   54791             :     "\n"
   54792             :     "Parameters\n"
   54793             :     "----------\n"
   54794             :     "srs : SpatialReference\n"
   54795             :     "\n"
   54796             :     "Returns\n"
   54797             :     "-------\n"
   54798             :     ":py:const:`CE_Failure` if an error occurs, otherwise :py:const:`CE_None`.\n"
   54799             :     "\n"
   54800             :     "\n"
   54801             :     ""},
   54802             :    { "Dataset_GetGeoTransform", (PyCFunction)(void(*)(void))_wrap_Dataset_GetGeoTransform, METH_VARARGS|METH_KEYWORDS, "\n"
   54803             :     "Dataset_GetGeoTransform(Dataset self, int * can_return_null=None)\n"
   54804             :     "\n"
   54805             :     "\n"
   54806             :     "Fetch the affine transformation coefficients.\n"
   54807             :     "\n"
   54808             :     "See :cpp:func:`GDALGetGeoTransform`.\n"
   54809             :     "\n"
   54810             :     "Parameters\n"
   54811             :     "-----------\n"
   54812             :     "can_return_null : bool, default=False\n"
   54813             :     "    if ``True``, return ``None`` instead of the default transformation\n"
   54814             :     "    if the transformation for this :py:class:`Dataset` has not been defined.\n"
   54815             :     "\n"
   54816             :     "Returns\n"
   54817             :     "-------\n"
   54818             :     "tuple:\n"
   54819             :     "    a 6-member tuple representing the transformation coefficients\n"
   54820             :     "\n"
   54821             :     "\n"
   54822             :     "\n"
   54823             :     ""},
   54824             :    { "Dataset_SetGeoTransform", _wrap_Dataset_SetGeoTransform, METH_VARARGS, "\n"
   54825             :     "Dataset_SetGeoTransform(Dataset self, double [6] argin) -> CPLErr\n"
   54826             :     "\n"
   54827             :     "\n"
   54828             :     "Set the affine transformation coefficients.\n"
   54829             :     "\n"
   54830             :     "See :py:meth:`GetGeoTransform` for details on the meaning of the coefficients.\n"
   54831             :     "\n"
   54832             :     "Parameters\n"
   54833             :     "----------\n"
   54834             :     "argin : tuple\n"
   54835             :     "\n"
   54836             :     "Returns\n"
   54837             :     "-------\n"
   54838             :     ":py:const:`CE_Failure` if an error occurs, otherwise :py:const:`CE_None`.\n"
   54839             :     "\n"
   54840             :     "\n"
   54841             :     ""},
   54842             :    { "Dataset_BuildOverviews", (PyCFunction)(void(*)(void))_wrap_Dataset_BuildOverviews, METH_VARARGS|METH_KEYWORDS, "\n"
   54843             :     "Dataset_BuildOverviews(Dataset self, char const * resampling=\"NEAREST\", int overviewlist=0, GDALProgressFunc callback=0, void * callback_data=None, char ** options=None) -> int\n"
   54844             :     "\n"
   54845             :     "\n"
   54846             :     "Build raster overview(s) for all bands.\n"
   54847             :     "\n"
   54848             :     "See :cpp:func:`GDALDataset::BuildOverviews`\n"
   54849             :     "\n"
   54850             :     "Parameters\n"
   54851             :     "----------\n"
   54852             :     "resampling : str, optional\n"
   54853             :     "             The resampling method to use. See :cpp:func:`GDALDataset::BuildOveriews`.\n"
   54854             :     "overviewlist : list\n"
   54855             :     "             A list of overview levels (decimation factors) to build, or an\n"
   54856             :     "             empty list to clear existing overviews.\n"
   54857             :     "callback : function, optional\n"
   54858             :     "             A progress callback function\n"
   54859             :     "callback_data: optional\n"
   54860             :     "             Optional data to be passed to callback function\n"
   54861             :     "options : dict/list, optional\n"
   54862             :     "             A dict or list of key=value options\n"
   54863             :     "\n"
   54864             :     "Returns\n"
   54865             :     "-------\n"
   54866             :     ":py:const:`CE_Failure` if an error occurs, otherwise :py:const:`CE_None`.\n"
   54867             :     "\n"
   54868             :     "Examples\n"
   54869             :     "--------\n"
   54870             :     ">>> import numpy as np\n"
   54871             :     ">>> ds = gdal.GetDriverByName('GTiff').Create('test.tif', 12, 12)\n"
   54872             :     ">>> ds.GetRasterBand(1).WriteArray(np.arange(12*12).reshape((12, 12)))\n"
   54873             :     "0\n"
   54874             :     ">>> ds.BuildOverviews('AVERAGE', [2, 4])\n"
   54875             :     "0\n"
   54876             :     ">>> ds.GetRasterBand(1).GetOverviewCount()\n"
   54877             :     "2\n"
   54878             :     ">>> ds.BuildOverviews(overviewlist=[])\n"
   54879             :     "0\n"
   54880             :     ">>> ds.GetRasterBand(1).GetOverviewCount()\n"
   54881             :     "0\n"
   54882             :     "\n"
   54883             :     ""},
   54884             :    { "Dataset_GetGCPCount", _wrap_Dataset_GetGCPCount, METH_O, "\n"
   54885             :     "Dataset_GetGCPCount(Dataset self) -> int\n"
   54886             :     "\n"
   54887             :     "\n"
   54888             :     "Get number of GCPs. See :cpp:func:`GDALGetGCPCount`.\n"
   54889             :     "\n"
   54890             :     "Returns\n"
   54891             :     "--------\n"
   54892             :     "int\n"
   54893             :     "\n"
   54894             :     "\n"
   54895             :     ""},
   54896             :    { "Dataset_GetGCPProjection", _wrap_Dataset_GetGCPProjection, METH_O, "\n"
   54897             :     "Dataset_GetGCPProjection(Dataset self) -> char const *\n"
   54898             :     "\n"
   54899             :     "\n"
   54900             :     "Return a WKT representation of the GCP spatial reference.\n"
   54901             :     "\n"
   54902             :     "Returns\n"
   54903             :     "--------\n"
   54904             :     "string\n"
   54905             :     "\n"
   54906             :     "\n"
   54907             :     ""},
   54908             :    { "Dataset_GetGCPSpatialRef", _wrap_Dataset_GetGCPSpatialRef, METH_O, "\n"
   54909             :     "Dataset_GetGCPSpatialRef(Dataset self) -> SpatialReference\n"
   54910             :     "\n"
   54911             :     "\n"
   54912             :     "Get output spatial reference system for GCPs.\n"
   54913             :     "\n"
   54914             :     "See :cpp:func:`GDALGetGCPSpatialRef`\n"
   54915             :     "\n"
   54916             :     "\n"
   54917             :     ""},
   54918             :    { "Dataset_GetGCPs", _wrap_Dataset_GetGCPs, METH_O, "\n"
   54919             :     "Dataset_GetGCPs(Dataset self)\n"
   54920             :     "\n"
   54921             :     "\n"
   54922             :     "Get the GCPs. See :cpp:func:`GDALGetGCPs`.\n"
   54923             :     "\n"
   54924             :     "Returns\n"
   54925             :     "--------\n"
   54926             :     "tuple\n"
   54927             :     "    a tuple of :py:class:`GCP` objects.\n"
   54928             :     "\n"
   54929             :     "\n"
   54930             :     ""},
   54931             :    { "Dataset__SetGCPs", _wrap_Dataset__SetGCPs, METH_VARARGS, "\n"
   54932             :     "Dataset__SetGCPs(Dataset self, int nGCPs, char const * pszGCPProjection) -> CPLErr\n"
   54933             :     "\n"
   54934             :     "\n"
   54935             :     ""},
   54936             :    { "Dataset__SetGCPs2", _wrap_Dataset__SetGCPs2, METH_VARARGS, "Dataset__SetGCPs2(Dataset self, int nGCPs, SpatialReference hSRS) -> CPLErr"},
   54937             :    { "Dataset_FlushCache", _wrap_Dataset_FlushCache, METH_O, "\n"
   54938             :     "Dataset_FlushCache(Dataset self) -> CPLErr\n"
   54939             :     "\n"
   54940             :     "\n"
   54941             :     "Flush all write-cached data to disk.\n"
   54942             :     "\n"
   54943             :     "See :cpp:func:`GDALDataset::FlushCache`.\n"
   54944             :     "\n"
   54945             :     "Returns\n"
   54946             :     "-------\n"
   54947             :     "int\n"
   54948             :     "    `gdal.CE_None` in case of success\n"
   54949             :     "\n"
   54950             :     ""},
   54951             :    { "Dataset_AddBand", (PyCFunction)(void(*)(void))_wrap_Dataset_AddBand, METH_VARARGS|METH_KEYWORDS, "\n"
   54952             :     "Dataset_AddBand(Dataset self, GDALDataType datatype=GDT_Byte, char ** options=None) -> CPLErr\n"
   54953             :     "\n"
   54954             :     "\n"
   54955             :     "Adds a band to a :py:class:`Dataset`.\n"
   54956             :     "\n"
   54957             :     "Not supported by all drivers.\n"
   54958             :     "\n"
   54959             :     "Parameters\n"
   54960             :     "-----------\n"
   54961             :     "datatype: int\n"
   54962             :     "    the data type of the pixels in the new band\n"
   54963             :     "options: dict/list\n"
   54964             :     "    an optional dict or list of format-specific ``NAME=VALUE`` option strings.\n"
   54965             :     "\n"
   54966             :     "Returns\n"
   54967             :     "-------\n"
   54968             :     "int:\n"
   54969             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   54970             :     "\n"
   54971             :     "Examples\n"
   54972             :     "--------\n"
   54973             :     ">>> ds=gdal.GetDriverByName('MEM').Create('', 10, 10)\n"
   54974             :     ">>> ds.RasterCount\n"
   54975             :     "1\n"
   54976             :     ">>> ds.AddBand(gdal.GDT_Float32)\n"
   54977             :     "0\n"
   54978             :     ">>> ds.RasterCount\n"
   54979             :     "2\n"
   54980             :     "\n"
   54981             :     ""},
   54982             :    { "Dataset_CreateMaskBand", _wrap_Dataset_CreateMaskBand, METH_VARARGS, "\n"
   54983             :     "Dataset_CreateMaskBand(Dataset self, int nFlags) -> CPLErr\n"
   54984             :     "\n"
   54985             :     "\n"
   54986             :     "Adds a mask band to the dataset.\n"
   54987             :     "\n"
   54988             :     "See :cpp:func:`GDALDataset::CreateMaskBand`.\n"
   54989             :     "\n"
   54990             :     "Parameters\n"
   54991             :     "----------\n"
   54992             :     "flags : int\n"
   54993             :     "\n"
   54994             :     "Returns\n"
   54995             :     "-------\n"
   54996             :     "int\n"
   54997             :     "    :py:const:`CE_Failure` if an error occurs, otherwise :py:const:`CE_None`.\n"
   54998             :     "\n"
   54999             :     "\n"
   55000             :     ""},
   55001             :    { "Dataset_GetFileList", _wrap_Dataset_GetFileList, METH_O, "\n"
   55002             :     "Dataset_GetFileList(Dataset self) -> char **\n"
   55003             :     "\n"
   55004             :     "\n"
   55005             :     "Returns a list of files believed to be part of this dataset.\n"
   55006             :     "See :cpp:func:`GDALGetFileList`.\n"
   55007             :     "\n"
   55008             :     "\n"
   55009             :     ""},
   55010             :    { "Dataset_WriteRaster", (PyCFunction)(void(*)(void))_wrap_Dataset_WriteRaster, METH_VARARGS|METH_KEYWORDS, "Dataset_WriteRaster(Dataset self, int xoff, int yoff, int xsize, int ysize, GIntBig buf_len, int * buf_xsize=None, int * buf_ysize=None, GDALDataType * buf_type=None, int band_list=0, GIntBig * buf_pixel_space=None, GIntBig * buf_line_space=None, GIntBig * buf_band_space=None) -> CPLErr"},
   55011             :    { "Dataset_AdviseRead", _wrap_Dataset_AdviseRead, METH_VARARGS, "\n"
   55012             :     "Dataset_AdviseRead(Dataset self, int xoff, int yoff, int xsize, int ysize, int * buf_xsize=None, int * buf_ysize=None, GDALDataType * buf_type=None, int band_list=0, char ** options=None) -> CPLErr\n"
   55013             :     "\n"
   55014             :     "\n"
   55015             :     "Advise driver of upcoming read requests.\n"
   55016             :     "\n"
   55017             :     "See :cpp:func:`GDALDataset::AdviseRead`.\n"
   55018             :     "\n"
   55019             :     "\n"
   55020             :     ""},
   55021             :    { "Dataset_BeginAsyncReader", (PyCFunction)(void(*)(void))_wrap_Dataset_BeginAsyncReader, METH_VARARGS|METH_KEYWORDS, "Dataset_BeginAsyncReader(Dataset self, int xOff, int yOff, int xSize, int ySize, size_t buf_len, int buf_xsize, int buf_ysize, GDALDataType bufType=(GDALDataType) 0, int band_list=0, int nPixelSpace=0, int nLineSpace=0, int nBandSpace=0, char ** options=None) -> AsyncReader"},
   55022             :    { "Dataset_EndAsyncReader", _wrap_Dataset_EndAsyncReader, METH_VARARGS, "Dataset_EndAsyncReader(Dataset self, AsyncReader ario)"},
   55023             :    { "Dataset_GetVirtualMem", (PyCFunction)(void(*)(void))_wrap_Dataset_GetVirtualMem, METH_VARARGS|METH_KEYWORDS, "Dataset_GetVirtualMem(Dataset self, GDALRWFlag eRWFlag, int nXOff, int nYOff, int nXSize, int nYSize, int nBufXSize, int nBufYSize, GDALDataType eBufType, int band_list, int bIsBandSequential, size_t nCacheSize, size_t nPageSizeHint, char ** options=None) -> VirtualMem"},
   55024             :    { "Dataset_GetTiledVirtualMem", (PyCFunction)(void(*)(void))_wrap_Dataset_GetTiledVirtualMem, METH_VARARGS|METH_KEYWORDS, "Dataset_GetTiledVirtualMem(Dataset self, GDALRWFlag eRWFlag, int nXOff, int nYOff, int nXSize, int nYSize, int nTileXSize, int nTileYSize, GDALDataType eBufType, int band_list, GDALTileOrganization eTileOrganization, size_t nCacheSize, char ** options=None) -> VirtualMem"},
   55025             :    { "Dataset_CreateLayer", (PyCFunction)(void(*)(void))_wrap_Dataset_CreateLayer, METH_VARARGS|METH_KEYWORDS, "\n"
   55026             :     "Dataset_CreateLayer(Dataset self, char const * name, SpatialReference srs=None, OGRwkbGeometryType geom_type=wkbUnknown, char ** options=None) -> Layer\n"
   55027             :     "\n"
   55028             :     "\n"
   55029             :     "Create a new layer in a vector Dataset.\n"
   55030             :     "\n"
   55031             :     "Parameters\n"
   55032             :     "----------\n"
   55033             :     "name : string\n"
   55034             :     "       the name for the new layer.  This should ideally not\n"
   55035             :     "       match any existing layer on the datasource.\n"
   55036             :     "srs : osr.SpatialReference, default=None\n"
   55037             :     "      the coordinate system to use for the new layer, or ``None`` if\n"
   55038             :     "      no coordinate system is available.\n"
   55039             :     "geom_type : int, default = :py:const:`ogr.wkbUnknown`\n"
   55040             :     "      geometry type for the layer.  Use :py:const:`ogr.wkbUnknown` if there\n"
   55041             :     "      are no constraints on the types geometry to be written.\n"
   55042             :     "options : dict/list, optional\n"
   55043             :     "      Driver-specific dict or list of name=value options\n"
   55044             :     "\n"
   55045             :     "Returns\n"
   55046             :     "-------\n"
   55047             :     "ogr.Layer or ``None`` on failure.\n"
   55048             :     "\n"
   55049             :     "\n"
   55050             :     "Examples\n"
   55051             :     "--------\n"
   55052             :     ">>> ds = gdal.GetDriverByName('GPKG').Create('test.gpkg', 0, 0)\n"
   55053             :     ">>> ds.GetLayerCount()\n"
   55054             :     "0\n"
   55055             :     ">>> lyr = ds.CreateLayer('poly', geom_type=ogr.wkbPolygon)\n"
   55056             :     ">>> ds.GetLayerCount()\n"
   55057             :     "1\n"
   55058             :     "\n"
   55059             :     "\n"
   55060             :     ""},
   55061             :    { "Dataset_CreateLayerFromGeomFieldDefn", _wrap_Dataset_CreateLayerFromGeomFieldDefn, METH_VARARGS, "Dataset_CreateLayerFromGeomFieldDefn(Dataset self, char const * name, GeomFieldDefn geom_field, char ** options=None) -> Layer"},
   55062             :    { "Dataset_CopyLayer", (PyCFunction)(void(*)(void))_wrap_Dataset_CopyLayer, METH_VARARGS|METH_KEYWORDS, "\n"
   55063             :     "Dataset_CopyLayer(Dataset self, Layer src_layer, char const * new_name, char ** options=None) -> Layer\n"
   55064             :     "\n"
   55065             :     "\n"
   55066             :     "Duplicate an existing :py:class:`ogr.Layer`.\n"
   55067             :     "\n"
   55068             :     "See :cpp:func:`GDALDAtaset::CopyLayer`.\n"
   55069             :     "\n"
   55070             :     "Parameters\n"
   55071             :     "----------\n"
   55072             :     "src_layer : ogr.Layer\n"
   55073             :     "            source layer\n"
   55074             :     "new_name : str\n"
   55075             :     "           name of the layer to create\n"
   55076             :     "options : dict/list\n"
   55077             :     "          a dict or list of name=value driver-specific creation options\n"
   55078             :     "\n"
   55079             :     "Returns\n"
   55080             :     "-------\n"
   55081             :     "ogr.Layer, or ``None`` if an error occurs\n"
   55082             :     "\n"
   55083             :     ""},
   55084             :    { "Dataset_DeleteLayer", _wrap_Dataset_DeleteLayer, METH_VARARGS, "Dataset_DeleteLayer(Dataset self, int index) -> OGRErr"},
   55085             :    { "Dataset_IsLayerPrivate", _wrap_Dataset_IsLayerPrivate, METH_VARARGS, "\n"
   55086             :     "Dataset_IsLayerPrivate(Dataset self, int index) -> bool\n"
   55087             :     "\n"
   55088             :     "\n"
   55089             :     "Parameters\n"
   55090             :     "----------\n"
   55091             :     "index : int\n"
   55092             :     "        Index o layer to check\n"
   55093             :     "\n"
   55094             :     "Returns\n"
   55095             :     "-------\n"
   55096             :     "bool\n"
   55097             :     "     ``True`` if the layer is a private or system table, ``False`` otherwise\n"
   55098             :     "\n"
   55099             :     "\n"
   55100             :     "\n"
   55101             :     ""},
   55102             :    { "Dataset_GetNextFeature", (PyCFunction)(void(*)(void))_wrap_Dataset_GetNextFeature, METH_VARARGS|METH_KEYWORDS, "\n"
   55103             :     "Dataset_GetNextFeature(Dataset self, bool include_layer=True, bool include_pct=False, GDALProgressFunc callback=0, void * callback_data=None) -> Feature\n"
   55104             :     "\n"
   55105             :     "\n"
   55106             :     "Fetch the next available feature from this dataset.\n"
   55107             :     "\n"
   55108             :     "This method is intended for the few drivers where\n"
   55109             :     ":py:meth:`OGRLayer.GetNextFeature` is not efficient, but in general\n"
   55110             :     ":py:meth:`OGRLayer.GetNextFeature` is a more natural API.\n"
   55111             :     "\n"
   55112             :     "See :cpp:func:`GDALDataset::GetNextFeature`.\n"
   55113             :     "\n"
   55114             :     "Returns\n"
   55115             :     "-------\n"
   55116             :     "ogr.Feature\n"
   55117             :     "\n"
   55118             :     "\n"
   55119             :     ""},
   55120             :    { "Dataset_TestCapability", _wrap_Dataset_TestCapability, METH_VARARGS, "\n"
   55121             :     "Dataset_TestCapability(Dataset self, char const * cap) -> bool\n"
   55122             :     "\n"
   55123             :     "\n"
   55124             :     "Test if a capability is available.\n"
   55125             :     "\n"
   55126             :     "Parameters\n"
   55127             :     "----------\n"
   55128             :     "cap : str\n"
   55129             :     "   Name of the capability (e.g., :py:const:`ogr.ODsCTransactions`)\n"
   55130             :     "\n"
   55131             :     "Returns\n"
   55132             :     "-------\n"
   55133             :     "bool\n"
   55134             :     "    ``True`` if the capability is available, ``False`` if invalid or unavailable\n"
   55135             :     "\n"
   55136             :     "Examples\n"
   55137             :     "--------\n"
   55138             :     ">>> ds = gdal.GetDriverByName('ESRI Shapefile').Create('test.shp', 0, 0, 0, gdal.GDT_Unknown)\n"
   55139             :     ">>> ds.TestCapability(ogr.ODsCTransactions)\n"
   55140             :     "False\n"
   55141             :     ">>> ds.TestCapability(ogr.ODsCMeasuredGeometries)\n"
   55142             :     "True\n"
   55143             :     ">>> ds.TestCapability(gdal.GDsCAddRelationship)\n"
   55144             :     "False\n"
   55145             :     "\n"
   55146             :     "\n"
   55147             :     ""},
   55148             :    { "Dataset_ExecuteSQL", (PyCFunction)(void(*)(void))_wrap_Dataset_ExecuteSQL, METH_VARARGS|METH_KEYWORDS, "Dataset_ExecuteSQL(Dataset self, char const * statement, Geometry spatialFilter=None, char const * dialect=\"\") -> Layer"},
   55149             :    { "Dataset_ReleaseResultSet", _wrap_Dataset_ReleaseResultSet, METH_VARARGS, "Dataset_ReleaseResultSet(Dataset self, Layer layer)"},
   55150             :    { "Dataset_GetStyleTable", _wrap_Dataset_GetStyleTable, METH_O, "\n"
   55151             :     "Dataset_GetStyleTable(Dataset self) -> StyleTable\n"
   55152             :     "\n"
   55153             :     "\n"
   55154             :     "Returns dataset style table.\n"
   55155             :     "\n"
   55156             :     "Returns\n"
   55157             :     "-------\n"
   55158             :     "ogr.StyleTable\n"
   55159             :     "\n"
   55160             :     "\n"
   55161             :     ""},
   55162             :    { "Dataset_SetStyleTable", _wrap_Dataset_SetStyleTable, METH_VARARGS, "\n"
   55163             :     "Dataset_SetStyleTable(Dataset self, StyleTable table)\n"
   55164             :     "\n"
   55165             :     "\n"
   55166             :     "Set dataset style table\n"
   55167             :     "\n"
   55168             :     "Parameters\n"
   55169             :     "----------\n"
   55170             :     "table : ogr.StyleTable\n"
   55171             :     "\n"
   55172             :     ""},
   55173             :    { "Dataset_GetLayerByIndex", _wrap_Dataset_GetLayerByIndex, METH_VARARGS, "\n"
   55174             :     "Dataset_GetLayerByIndex(Dataset self, int index=0) -> Layer\n"
   55175             :     "\n"
   55176             :     "\n"
   55177             :     "Fetch a layer by index.\n"
   55178             :     "\n"
   55179             :     "Parameters\n"
   55180             :     "----------\n"
   55181             :     "index : int\n"
   55182             :     "    A layer number between 0 and ``GetLayerCount() - 1``\n"
   55183             :     "\n"
   55184             :     "Returns\n"
   55185             :     "-------\n"
   55186             :     "ogr.Layer\n"
   55187             :     "\n"
   55188             :     "\n"
   55189             :     ""},
   55190             :    { "Dataset_GetLayerByName", _wrap_Dataset_GetLayerByName, METH_VARARGS, "Dataset_GetLayerByName(Dataset self, char const * layer_name) -> Layer"},
   55191             :    { "Dataset_ResetReading", _wrap_Dataset_ResetReading, METH_O, "\n"
   55192             :     "Dataset_ResetReading(Dataset self)\n"
   55193             :     "\n"
   55194             :     "\n"
   55195             :     "Reset feature reading to start on the first feature.\n"
   55196             :     "\n"
   55197             :     "This affects :py:meth:`GetNextFeature`.\n"
   55198             :     "\n"
   55199             :     "Depending on drivers, this may also have the side effect of calling\n"
   55200             :     ":py:meth:`OGRLayer.ResetReading` on the layers of this dataset.\n"
   55201             :     "\n"
   55202             :     "\n"
   55203             :     ""},
   55204             :    { "Dataset_GetLayerCount", _wrap_Dataset_GetLayerCount, METH_O, "\n"
   55205             :     "Dataset_GetLayerCount(Dataset self) -> int\n"
   55206             :     "\n"
   55207             :     "\n"
   55208             :     "Get the number of layers in this dataset.\n"
   55209             :     "\n"
   55210             :     "Returns\n"
   55211             :     "-------\n"
   55212             :     "int\n"
   55213             :     "\n"
   55214             :     "\n"
   55215             :     ""},
   55216             :    { "Dataset_AbortSQL", _wrap_Dataset_AbortSQL, METH_O, "\n"
   55217             :     "Dataset_AbortSQL(Dataset self) -> OGRErr\n"
   55218             :     "\n"
   55219             :     "\n"
   55220             :     "Abort any SQL statement running in the data store.\n"
   55221             :     "\n"
   55222             :     "Not implemented by all drivers. See :cpp:func:`GDALDataset::AbortSQL`.\n"
   55223             :     "\n"
   55224             :     "Returns\n"
   55225             :     "-------\n"
   55226             :     ":py:const:`ogr.OGRERR_NONE` on success or :py:const:`ogr.OGRERR_UNSUPPORTED_OPERATION` if AbortSQL is not supported for this dataset.\n"
   55227             :     "\n"
   55228             :     ""},
   55229             :    { "Dataset_StartTransaction", (PyCFunction)(void(*)(void))_wrap_Dataset_StartTransaction, METH_VARARGS|METH_KEYWORDS, "\n"
   55230             :     "Dataset_StartTransaction(Dataset self, int force=FALSE) -> OGRErr\n"
   55231             :     "\n"
   55232             :     "\n"
   55233             :     "Creates a transaction. See :cpp:func:`GDALDataset::StartTransaction`.\n"
   55234             :     "\n"
   55235             :     "Returns\n"
   55236             :     "-------\n"
   55237             :     "int\n"
   55238             :     "    If starting the transaction fails, will return\n"
   55239             :     "    :py:const:`ogr.OGRERR_FAILURE`. Datasources which do not support transactions will\n"
   55240             :     "    always return :py:const:`OGRERR_UNSUPPORTED_OPERATION`.\n"
   55241             :     "\n"
   55242             :     "\n"
   55243             :     ""},
   55244             :    { "Dataset_CommitTransaction", _wrap_Dataset_CommitTransaction, METH_O, "\n"
   55245             :     "Dataset_CommitTransaction(Dataset self) -> OGRErr\n"
   55246             :     "\n"
   55247             :     "Commits a transaction, for `Datasets` that support transactions.\n"
   55248             :     "\n"
   55249             :     "See :cpp:func:`GDALDataset::CommitTransaction`.\n"
   55250             :     "\n"
   55251             :     ""},
   55252             :    { "Dataset_RollbackTransaction", _wrap_Dataset_RollbackTransaction, METH_O, "\n"
   55253             :     "Dataset_RollbackTransaction(Dataset self) -> OGRErr\n"
   55254             :     "\n"
   55255             :     "\n"
   55256             :     "Roll back a Dataset to its state before the start of the current transaction.\n"
   55257             :     "\n"
   55258             :     "For datasets that support transactions.\n"
   55259             :     "\n"
   55260             :     "Returns\n"
   55261             :     "-------\n"
   55262             :     "int\n"
   55263             :     "    If no transaction is active, or the rollback fails, will return\n"
   55264             :     "    :py:const:`OGRERR_FAILURE`. Datasources which do not support transactions will\n"
   55265             :     "    always return :py:const:`OGRERR_UNSUPPORTED_OPERATION`.\n"
   55266             :     "\n"
   55267             :     "\n"
   55268             :     ""},
   55269             :    { "Dataset_ClearStatistics", _wrap_Dataset_ClearStatistics, METH_O, "\n"
   55270             :     "Dataset_ClearStatistics(Dataset self)\n"
   55271             :     "\n"
   55272             :     "\n"
   55273             :     "Clear statistics\n"
   55274             :     "\n"
   55275             :     "See :cpp:func:`GDALDatset::ClearStatistics`.\n"
   55276             :     "\n"
   55277             :     "\n"
   55278             :     ""},
   55279             :    { "Dataset_GetFieldDomainNames", _wrap_Dataset_GetFieldDomainNames, METH_VARARGS, "\n"
   55280             :     "Dataset_GetFieldDomainNames(Dataset self, char ** options=None) -> char **\n"
   55281             :     "\n"
   55282             :     "\n"
   55283             :     "Get a list of the names of all field domains stored in the dataset.\n"
   55284             :     "\n"
   55285             :     "Parameters\n"
   55286             :     "----------\n"
   55287             :     "options: dict/list, optional\n"
   55288             :     "         Driver-specific options determining how attributes should\n"
   55289             :     "         be retrieved.\n"
   55290             :     "\n"
   55291             :     "Returns\n"
   55292             :     "-------\n"
   55293             :     "list, or ``None`` if no field domains are stored in the dataset.\n"
   55294             :     "\n"
   55295             :     ""},
   55296             :    { "Dataset_GetFieldDomain", _wrap_Dataset_GetFieldDomain, METH_VARARGS, "\n"
   55297             :     "Dataset_GetFieldDomain(Dataset self, char const * name) -> FieldDomain\n"
   55298             :     "\n"
   55299             :     "\n"
   55300             :     "Get a field domain from its name.\n"
   55301             :     "\n"
   55302             :     "Parameters\n"
   55303             :     "----------\n"
   55304             :     "name: str\n"
   55305             :     "      The name of the field domain\n"
   55306             :     "\n"
   55307             :     "Returns\n"
   55308             :     "-------\n"
   55309             :     "ogr.FieldDomain, or ``None`` if it is not found.\n"
   55310             :     "\n"
   55311             :     ""},
   55312             :    { "Dataset_AddFieldDomain", _wrap_Dataset_AddFieldDomain, METH_VARARGS, "\n"
   55313             :     "Dataset_AddFieldDomain(Dataset self, FieldDomain fieldDomain) -> bool\n"
   55314             :     "\n"
   55315             :     "\n"
   55316             :     "Add a :py:class:`ogr.FieldDomain` to the dataset.\n"
   55317             :     "\n"
   55318             :     "Only a few drivers support this operation. See :cpp:func:`GDALDataset::AddFieldDomain`.\n"
   55319             :     "\n"
   55320             :     "Parameters\n"
   55321             :     "----------\n"
   55322             :     "fieldDomain : ogr.FieldDomain\n"
   55323             :     "              The field domain to add\n"
   55324             :     "\n"
   55325             :     "Returns\n"
   55326             :     "--------\n"
   55327             :     "bool:\n"
   55328             :     "    ``True`` if the field domain was added, ``False`` in case of error.\n"
   55329             :     "\n"
   55330             :     "\n"
   55331             :     "\n"
   55332             :     ""},
   55333             :    { "Dataset_DeleteFieldDomain", _wrap_Dataset_DeleteFieldDomain, METH_VARARGS, "\n"
   55334             :     "Dataset_DeleteFieldDomain(Dataset self, char const * name) -> bool\n"
   55335             :     "\n"
   55336             :     "\n"
   55337             :     "Removes a field domain from the Dataset.\n"
   55338             :     "\n"
   55339             :     "Parameters\n"
   55340             :     "----------\n"
   55341             :     "name : str\n"
   55342             :     "       Name of the field domain to delete\n"
   55343             :     "\n"
   55344             :     "Returns\n"
   55345             :     "-------\n"
   55346             :     "bool\n"
   55347             :     "     ``True`` if the field domain was removed, otherwise ``False``.\n"
   55348             :     "\n"
   55349             :     "\n"
   55350             :     ""},
   55351             :    { "Dataset_UpdateFieldDomain", _wrap_Dataset_UpdateFieldDomain, METH_VARARGS, "\n"
   55352             :     "Dataset_UpdateFieldDomain(Dataset self, FieldDomain fieldDomain) -> bool\n"
   55353             :     "\n"
   55354             :     "\n"
   55355             :     "Update an existing field domain by replacing its definition.\n"
   55356             :     "\n"
   55357             :     "The existing field domain with matching name will be replaced.\n"
   55358             :     "\n"
   55359             :     "Requires the :py:const:`ogr.ODsCUpdateFieldDomain` datasset capability.\n"
   55360             :     "\n"
   55361             :     "Parameters\n"
   55362             :     "----------\n"
   55363             :     "fieldDomain : ogr.FieldDomain\n"
   55364             :     "    Updated field domain.\n"
   55365             :     "\n"
   55366             :     "Returns\n"
   55367             :     "-------\n"
   55368             :     "bool\n"
   55369             :     "    ``True`` in case of success\n"
   55370             :     "\n"
   55371             :     "\n"
   55372             :     ""},
   55373             :    { "Dataset_GetRelationshipNames", _wrap_Dataset_GetRelationshipNames, METH_VARARGS, "\n"
   55374             :     "Dataset_GetRelationshipNames(Dataset self, char ** options=None) -> char **\n"
   55375             :     "\n"
   55376             :     "\n"
   55377             :     "Get a list of the names of all relationships stored in the dataset.\n"
   55378             :     "\n"
   55379             :     "Parameters\n"
   55380             :     "----------\n"
   55381             :     "options : dict/list, optional\n"
   55382             :     "    driver-specific options determining how the relationships should be retrieved\n"
   55383             :     "\n"
   55384             :     "\n"
   55385             :     ""},
   55386             :    { "Dataset_GetRelationship", _wrap_Dataset_GetRelationship, METH_VARARGS, "\n"
   55387             :     "Dataset_GetRelationship(Dataset self, char const * name) -> Relationship\n"
   55388             :     "\n"
   55389             :     "\n"
   55390             :     "Get a relationship from its name.\n"
   55391             :     "\n"
   55392             :     "Returns\n"
   55393             :     "-------\n"
   55394             :     "Relationship, or ``None`` if not found.\n"
   55395             :     "\n"
   55396             :     ""},
   55397             :    { "Dataset_AddRelationship", _wrap_Dataset_AddRelationship, METH_VARARGS, "\n"
   55398             :     "Dataset_AddRelationship(Dataset self, Relationship relationship) -> bool\n"
   55399             :     "\n"
   55400             :     "\n"
   55401             :     "Add a :py:class:`Relationship` to the dataset.\n"
   55402             :     "\n"
   55403             :     "See :cpp:func:`GDALDataset::AddRelationship`.\n"
   55404             :     "\n"
   55405             :     "Parameters\n"
   55406             :     "----------\n"
   55407             :     "relationship : Relationship\n"
   55408             :     "               The relationship to add\n"
   55409             :     "\n"
   55410             :     "Returns\n"
   55411             :     "-------\n"
   55412             :     "bool:\n"
   55413             :     "    ``True`` if the field domain was added, ``False`` in case of error.\n"
   55414             :     "\n"
   55415             :     "\n"
   55416             :     ""},
   55417             :    { "Dataset_DeleteRelationship", _wrap_Dataset_DeleteRelationship, METH_VARARGS, "\n"
   55418             :     "Dataset_DeleteRelationship(Dataset self, char const * name) -> bool\n"
   55419             :     "\n"
   55420             :     "\n"
   55421             :     "Removes a relationship from the Dataset.\n"
   55422             :     "\n"
   55423             :     "Parameters\n"
   55424             :     "----------\n"
   55425             :     "name : str\n"
   55426             :     "       Name of the relationship to remove.\n"
   55427             :     "\n"
   55428             :     "Returns\n"
   55429             :     "-------\n"
   55430             :     "bool\n"
   55431             :     "     ``True`` if the relationship  was removed, otherwise ``False``.\n"
   55432             :     "\n"
   55433             :     "\n"
   55434             :     "\n"
   55435             :     ""},
   55436             :    { "Dataset_UpdateRelationship", _wrap_Dataset_UpdateRelationship, METH_VARARGS, "\n"
   55437             :     "Dataset_UpdateRelationship(Dataset self, Relationship relationship) -> bool\n"
   55438             :     "\n"
   55439             :     "\n"
   55440             :     "Update an existing relationship by replacing its definition.\n"
   55441             :     "\n"
   55442             :     "The existing relationship with matching name will be replaced.\n"
   55443             :     "\n"
   55444             :     "Requires the :py:const:`gdal.GDsCUpdateFieldDomain` dataset capability.\n"
   55445             :     "\n"
   55446             :     "Parameters\n"
   55447             :     "----------\n"
   55448             :     "relationship : Relationship\n"
   55449             :     "    Updated relationship\n"
   55450             :     "\n"
   55451             :     "Returns\n"
   55452             :     "-------\n"
   55453             :     "bool\n"
   55454             :     "    ``True`` in case of success\n"
   55455             :     "\n"
   55456             :     "\n"
   55457             :     ""},
   55458             :    { "Dataset_ReadRaster1", (PyCFunction)(void(*)(void))_wrap_Dataset_ReadRaster1, METH_VARARGS|METH_KEYWORDS, "Dataset_ReadRaster1(Dataset self, double xoff, double yoff, double xsize, double ysize, int * buf_xsize=None, int * buf_ysize=None, GDALDataType * buf_type=None, int band_list=0, GIntBig * buf_pixel_space=None, GIntBig * buf_line_space=None, GIntBig * buf_band_space=None, GDALRIOResampleAlg resample_alg=GRIORA_NearestNeighbour, GDALProgressFunc callback=0, void * callback_data=None, void * inputOutputBuf=None) -> CPLErr"},
   55459             :    { "Dataset_swigregister", Dataset_swigregister, METH_O, NULL},
   55460             :    { "new_RasterAttributeTable", _wrap_new_RasterAttributeTable, METH_NOARGS, "new_RasterAttributeTable() -> RasterAttributeTable"},
   55461             :    { "delete_RasterAttributeTable", _wrap_delete_RasterAttributeTable, METH_O, "delete_RasterAttributeTable(RasterAttributeTable self)"},
   55462             :    { "RasterAttributeTable_Clone", _wrap_RasterAttributeTable_Clone, METH_O, "RasterAttributeTable_Clone(RasterAttributeTable self) -> RasterAttributeTable"},
   55463             :    { "RasterAttributeTable_GetColumnCount", _wrap_RasterAttributeTable_GetColumnCount, METH_O, "RasterAttributeTable_GetColumnCount(RasterAttributeTable self) -> int"},
   55464             :    { "RasterAttributeTable_GetNameOfCol", _wrap_RasterAttributeTable_GetNameOfCol, METH_VARARGS, "RasterAttributeTable_GetNameOfCol(RasterAttributeTable self, int iCol) -> char const *"},
   55465             :    { "RasterAttributeTable_GetUsageOfCol", _wrap_RasterAttributeTable_GetUsageOfCol, METH_VARARGS, "RasterAttributeTable_GetUsageOfCol(RasterAttributeTable self, int iCol) -> GDALRATFieldUsage"},
   55466             :    { "RasterAttributeTable_GetTypeOfCol", _wrap_RasterAttributeTable_GetTypeOfCol, METH_VARARGS, "RasterAttributeTable_GetTypeOfCol(RasterAttributeTable self, int iCol) -> GDALRATFieldType"},
   55467             :    { "RasterAttributeTable_GetColOfUsage", _wrap_RasterAttributeTable_GetColOfUsage, METH_VARARGS, "RasterAttributeTable_GetColOfUsage(RasterAttributeTable self, GDALRATFieldUsage eUsage) -> int"},
   55468             :    { "RasterAttributeTable_GetRowCount", _wrap_RasterAttributeTable_GetRowCount, METH_O, "RasterAttributeTable_GetRowCount(RasterAttributeTable self) -> int"},
   55469             :    { "RasterAttributeTable_GetValueAsString", _wrap_RasterAttributeTable_GetValueAsString, METH_VARARGS, "RasterAttributeTable_GetValueAsString(RasterAttributeTable self, int iRow, int iCol) -> char const *"},
   55470             :    { "RasterAttributeTable_GetValueAsInt", _wrap_RasterAttributeTable_GetValueAsInt, METH_VARARGS, "RasterAttributeTable_GetValueAsInt(RasterAttributeTable self, int iRow, int iCol) -> int"},
   55471             :    { "RasterAttributeTable_GetValueAsDouble", _wrap_RasterAttributeTable_GetValueAsDouble, METH_VARARGS, "RasterAttributeTable_GetValueAsDouble(RasterAttributeTable self, int iRow, int iCol) -> double"},
   55472             :    { "RasterAttributeTable_ReadValuesIOAsString", _wrap_RasterAttributeTable_ReadValuesIOAsString, METH_VARARGS, "RasterAttributeTable_ReadValuesIOAsString(RasterAttributeTable self, int iField, int iStartRow, int iLength) -> CPLErr"},
   55473             :    { "RasterAttributeTable_ReadValuesIOAsInteger", _wrap_RasterAttributeTable_ReadValuesIOAsInteger, METH_VARARGS, "RasterAttributeTable_ReadValuesIOAsInteger(RasterAttributeTable self, int iField, int iStartRow, int iLength) -> CPLErr"},
   55474             :    { "RasterAttributeTable_ReadValuesIOAsDouble", _wrap_RasterAttributeTable_ReadValuesIOAsDouble, METH_VARARGS, "RasterAttributeTable_ReadValuesIOAsDouble(RasterAttributeTable self, int iField, int iStartRow, int iLength) -> CPLErr"},
   55475             :    { "RasterAttributeTable_SetValueAsString", _wrap_RasterAttributeTable_SetValueAsString, METH_VARARGS, "RasterAttributeTable_SetValueAsString(RasterAttributeTable self, int iRow, int iCol, char const * pszValue)"},
   55476             :    { "RasterAttributeTable_SetValueAsInt", _wrap_RasterAttributeTable_SetValueAsInt, METH_VARARGS, "RasterAttributeTable_SetValueAsInt(RasterAttributeTable self, int iRow, int iCol, int nValue)"},
   55477             :    { "RasterAttributeTable_SetValueAsDouble", _wrap_RasterAttributeTable_SetValueAsDouble, METH_VARARGS, "RasterAttributeTable_SetValueAsDouble(RasterAttributeTable self, int iRow, int iCol, double dfValue)"},
   55478             :    { "RasterAttributeTable_SetRowCount", _wrap_RasterAttributeTable_SetRowCount, METH_VARARGS, "RasterAttributeTable_SetRowCount(RasterAttributeTable self, int nCount)"},
   55479             :    { "RasterAttributeTable_CreateColumn", _wrap_RasterAttributeTable_CreateColumn, METH_VARARGS, "RasterAttributeTable_CreateColumn(RasterAttributeTable self, char const * pszName, GDALRATFieldType eType, GDALRATFieldUsage eUsage) -> int"},
   55480             :    { "RasterAttributeTable_GetLinearBinning", _wrap_RasterAttributeTable_GetLinearBinning, METH_O, "RasterAttributeTable_GetLinearBinning(RasterAttributeTable self) -> bool"},
   55481             :    { "RasterAttributeTable_SetLinearBinning", _wrap_RasterAttributeTable_SetLinearBinning, METH_VARARGS, "RasterAttributeTable_SetLinearBinning(RasterAttributeTable self, double dfRow0Min, double dfBinSize) -> int"},
   55482             :    { "RasterAttributeTable_GetRowOfValue", _wrap_RasterAttributeTable_GetRowOfValue, METH_VARARGS, "RasterAttributeTable_GetRowOfValue(RasterAttributeTable self, double dfValue) -> int"},
   55483             :    { "RasterAttributeTable_ChangesAreWrittenToFile", _wrap_RasterAttributeTable_ChangesAreWrittenToFile, METH_O, "RasterAttributeTable_ChangesAreWrittenToFile(RasterAttributeTable self) -> int"},
   55484             :    { "RasterAttributeTable_DumpReadable", _wrap_RasterAttributeTable_DumpReadable, METH_O, "RasterAttributeTable_DumpReadable(RasterAttributeTable self)"},
   55485             :    { "RasterAttributeTable_SetTableType", _wrap_RasterAttributeTable_SetTableType, METH_VARARGS, "RasterAttributeTable_SetTableType(RasterAttributeTable self, GDALRATTableType eTableType)"},
   55486             :    { "RasterAttributeTable_GetTableType", _wrap_RasterAttributeTable_GetTableType, METH_O, "RasterAttributeTable_GetTableType(RasterAttributeTable self) -> GDALRATTableType"},
   55487             :    { "RasterAttributeTable_RemoveStatistics", _wrap_RasterAttributeTable_RemoveStatistics, METH_O, "RasterAttributeTable_RemoveStatistics(RasterAttributeTable self)"},
   55488             :    { "RasterAttributeTable_swigregister", RasterAttributeTable_swigregister, METH_O, NULL},
   55489             :    { "RasterAttributeTable_swiginit", RasterAttributeTable_swiginit, METH_VARARGS, NULL},
   55490             :    { "delete_Group", _wrap_delete_Group, METH_O, "delete_Group(Group self)"},
   55491             :    { "Group_GetName", _wrap_Group_GetName, METH_O, "Group_GetName(Group self) -> char const *"},
   55492             :    { "Group_GetFullName", _wrap_Group_GetFullName, METH_O, "Group_GetFullName(Group self) -> char const *"},
   55493             :    { "Group_GetMDArrayNames", _wrap_Group_GetMDArrayNames, METH_VARARGS, "Group_GetMDArrayNames(Group self, char ** options=None) -> char **"},
   55494             :    { "Group_OpenMDArray", _wrap_Group_OpenMDArray, METH_VARARGS, "Group_OpenMDArray(Group self, char const * name, char ** options=None) -> MDArray"},
   55495             :    { "Group_OpenMDArrayFromFullname", _wrap_Group_OpenMDArrayFromFullname, METH_VARARGS, "Group_OpenMDArrayFromFullname(Group self, char const * name, char ** options=None) -> MDArray"},
   55496             :    { "Group_ResolveMDArray", _wrap_Group_ResolveMDArray, METH_VARARGS, "Group_ResolveMDArray(Group self, char const * name, char const * starting_point, char ** options=None) -> MDArray"},
   55497             :    { "Group_GetGroupNames", _wrap_Group_GetGroupNames, METH_VARARGS, "Group_GetGroupNames(Group self, char ** options=None) -> char **"},
   55498             :    { "Group_OpenGroup", _wrap_Group_OpenGroup, METH_VARARGS, "Group_OpenGroup(Group self, char const * name, char ** options=None) -> Group"},
   55499             :    { "Group_OpenGroupFromFullname", _wrap_Group_OpenGroupFromFullname, METH_VARARGS, "Group_OpenGroupFromFullname(Group self, char const * name, char ** options=None) -> Group"},
   55500             :    { "Group_GetVectorLayerNames", _wrap_Group_GetVectorLayerNames, METH_VARARGS, "Group_GetVectorLayerNames(Group self, char ** options=None) -> char **"},
   55501             :    { "Group_OpenVectorLayer", _wrap_Group_OpenVectorLayer, METH_VARARGS, "Group_OpenVectorLayer(Group self, char const * name, char ** options=None) -> Layer"},
   55502             :    { "Group_GetDimensions", _wrap_Group_GetDimensions, METH_VARARGS, "Group_GetDimensions(Group self, char ** options=None)"},
   55503             :    { "Group_GetAttribute", _wrap_Group_GetAttribute, METH_VARARGS, "Group_GetAttribute(Group self, char const * name) -> Attribute"},
   55504             :    { "Group_GetAttributes", _wrap_Group_GetAttributes, METH_VARARGS, "Group_GetAttributes(Group self, char ** options=None)"},
   55505             :    { "Group_GetStructuralInfo", _wrap_Group_GetStructuralInfo, METH_O, "Group_GetStructuralInfo(Group self) -> char **"},
   55506             :    { "Group_CreateGroup", _wrap_Group_CreateGroup, METH_VARARGS, "Group_CreateGroup(Group self, char const * name, char ** options=None) -> Group"},
   55507             :    { "Group_DeleteGroup", _wrap_Group_DeleteGroup, METH_VARARGS, "Group_DeleteGroup(Group self, char const * name, char ** options=None) -> CPLErr"},
   55508             :    { "Group_CreateDimension", _wrap_Group_CreateDimension, METH_VARARGS, "Group_CreateDimension(Group self, char const * name, char const * type, char const * direction, GUIntBig size, char ** options=None) -> Dimension"},
   55509             :    { "Group_CreateMDArray", _wrap_Group_CreateMDArray, METH_VARARGS, "Group_CreateMDArray(Group self, char const * name, int dimensions, ExtendedDataType data_type, char ** options=None) -> MDArray"},
   55510             :    { "Group_DeleteMDArray", _wrap_Group_DeleteMDArray, METH_VARARGS, "Group_DeleteMDArray(Group self, char const * name, char ** options=None) -> CPLErr"},
   55511             :    { "Group_CreateAttribute", _wrap_Group_CreateAttribute, METH_VARARGS, "Group_CreateAttribute(Group self, char const * name, int dimensions, ExtendedDataType data_type, char ** options=None) -> Attribute"},
   55512             :    { "Group_DeleteAttribute", _wrap_Group_DeleteAttribute, METH_VARARGS, "Group_DeleteAttribute(Group self, char const * name, char ** options=None) -> CPLErr"},
   55513             :    { "Group_Rename", _wrap_Group_Rename, METH_VARARGS, "Group_Rename(Group self, char const * newName) -> CPLErr"},
   55514             :    { "Group_SubsetDimensionFromSelection", _wrap_Group_SubsetDimensionFromSelection, METH_VARARGS, "Group_SubsetDimensionFromSelection(Group self, char const * selection, char ** options=None) -> Group"},
   55515             :    { "Group_swigregister", Group_swigregister, METH_O, NULL},
   55516             :    { "Statistics_min_get", _wrap_Statistics_min_get, METH_O, "Statistics_min_get(Statistics self) -> double"},
   55517             :    { "Statistics_max_get", _wrap_Statistics_max_get, METH_O, "Statistics_max_get(Statistics self) -> double"},
   55518             :    { "Statistics_mean_get", _wrap_Statistics_mean_get, METH_O, "Statistics_mean_get(Statistics self) -> double"},
   55519             :    { "Statistics_std_dev_get", _wrap_Statistics_std_dev_get, METH_O, "Statistics_std_dev_get(Statistics self) -> double"},
   55520             :    { "Statistics_valid_count_get", _wrap_Statistics_valid_count_get, METH_O, "Statistics_valid_count_get(Statistics self) -> GIntBig"},
   55521             :    { "delete_Statistics", _wrap_delete_Statistics, METH_O, "delete_Statistics(Statistics self)"},
   55522             :    { "new_Statistics", _wrap_new_Statistics, METH_NOARGS, "new_Statistics() -> Statistics"},
   55523             :    { "Statistics_swigregister", Statistics_swigregister, METH_O, NULL},
   55524             :    { "Statistics_swiginit", Statistics_swiginit, METH_VARARGS, NULL},
   55525             :    { "delete_MDArray", _wrap_delete_MDArray, METH_O, "delete_MDArray(MDArray self)"},
   55526             :    { "MDArray_GetName", _wrap_MDArray_GetName, METH_O, "MDArray_GetName(MDArray self) -> char const *"},
   55527             :    { "MDArray_GetFullName", _wrap_MDArray_GetFullName, METH_O, "MDArray_GetFullName(MDArray self) -> char const *"},
   55528             :    { "MDArray_GetTotalElementsCount", _wrap_MDArray_GetTotalElementsCount, METH_O, "MDArray_GetTotalElementsCount(MDArray self) -> GUIntBig"},
   55529             :    { "MDArray_GetDimensionCount", _wrap_MDArray_GetDimensionCount, METH_O, "MDArray_GetDimensionCount(MDArray self) -> size_t"},
   55530             :    { "MDArray_GetDimensions", _wrap_MDArray_GetDimensions, METH_O, "MDArray_GetDimensions(MDArray self)"},
   55531             :    { "MDArray_GetCoordinateVariables", _wrap_MDArray_GetCoordinateVariables, METH_O, "MDArray_GetCoordinateVariables(MDArray self)"},
   55532             :    { "MDArray_GetBlockSize", _wrap_MDArray_GetBlockSize, METH_O, "MDArray_GetBlockSize(MDArray self)"},
   55533             :    { "MDArray_GetProcessingChunkSize", _wrap_MDArray_GetProcessingChunkSize, METH_VARARGS, "MDArray_GetProcessingChunkSize(MDArray self, size_t nMaxChunkMemory)"},
   55534             :    { "MDArray_GetDataType", _wrap_MDArray_GetDataType, METH_O, "MDArray_GetDataType(MDArray self) -> ExtendedDataType"},
   55535             :    { "MDArray_GetStructuralInfo", _wrap_MDArray_GetStructuralInfo, METH_O, "MDArray_GetStructuralInfo(MDArray self) -> char **"},
   55536             :    { "MDArray_Resize", _wrap_MDArray_Resize, METH_VARARGS, "MDArray_Resize(MDArray self, int newDimensions, char ** options=None) -> CPLErr"},
   55537             :    { "MDArray_Read", _wrap_MDArray_Read, METH_VARARGS, "MDArray_Read(MDArray self, int nDims1, int nDims2, int nDims3, int nDims4, ExtendedDataType buffer_datatype) -> CPLErr"},
   55538             :    { "MDArray_WriteStringArray", _wrap_MDArray_WriteStringArray, METH_VARARGS, "MDArray_WriteStringArray(MDArray self, int nDims1, int nDims2, int nDims3, ExtendedDataType buffer_datatype, char ** options) -> CPLErr"},
   55539             :    { "MDArray_Write", _wrap_MDArray_Write, METH_VARARGS, "MDArray_Write(MDArray self, int nDims1, int nDims2, int nDims3, int nDims4, ExtendedDataType buffer_datatype, GIntBig buf_len) -> CPLErr"},
   55540             :    { "MDArray_AdviseRead", _wrap_MDArray_AdviseRead, METH_VARARGS, "MDArray_AdviseRead(MDArray self, int nDims1, int nDims2, char ** options=None) -> CPLErr"},
   55541             :    { "MDArray_GetAttribute", _wrap_MDArray_GetAttribute, METH_VARARGS, "MDArray_GetAttribute(MDArray self, char const * name) -> Attribute"},
   55542             :    { "MDArray_GetAttributes", _wrap_MDArray_GetAttributes, METH_VARARGS, "MDArray_GetAttributes(MDArray self, char ** options=None)"},
   55543             :    { "MDArray_CreateAttribute", _wrap_MDArray_CreateAttribute, METH_VARARGS, "MDArray_CreateAttribute(MDArray self, char const * name, int dimensions, ExtendedDataType data_type, char ** options=None) -> Attribute"},
   55544             :    { "MDArray_DeleteAttribute", _wrap_MDArray_DeleteAttribute, METH_VARARGS, "MDArray_DeleteAttribute(MDArray self, char const * name, char ** options=None) -> CPLErr"},
   55545             :    { "MDArray_GetNoDataValueAsRaw", _wrap_MDArray_GetNoDataValueAsRaw, METH_O, "MDArray_GetNoDataValueAsRaw(MDArray self) -> CPLErr"},
   55546             :    { "MDArray_GetNoDataValueAsDouble", _wrap_MDArray_GetNoDataValueAsDouble, METH_O, "MDArray_GetNoDataValueAsDouble(MDArray self)"},
   55547             :    { "MDArray_GetNoDataValueAsInt64", _wrap_MDArray_GetNoDataValueAsInt64, METH_O, "MDArray_GetNoDataValueAsInt64(MDArray self)"},
   55548             :    { "MDArray_GetNoDataValueAsUInt64", _wrap_MDArray_GetNoDataValueAsUInt64, METH_O, "MDArray_GetNoDataValueAsUInt64(MDArray self)"},
   55549             :    { "MDArray_GetNoDataValueAsString", _wrap_MDArray_GetNoDataValueAsString, METH_O, "MDArray_GetNoDataValueAsString(MDArray self) -> retStringAndCPLFree *"},
   55550             :    { "MDArray_SetNoDataValueDouble", _wrap_MDArray_SetNoDataValueDouble, METH_VARARGS, "MDArray_SetNoDataValueDouble(MDArray self, double d) -> CPLErr"},
   55551             :    { "MDArray_SetNoDataValueInt64", _wrap_MDArray_SetNoDataValueInt64, METH_VARARGS, "MDArray_SetNoDataValueInt64(MDArray self, GIntBig v) -> CPLErr"},
   55552             :    { "MDArray_SetNoDataValueUInt64", _wrap_MDArray_SetNoDataValueUInt64, METH_VARARGS, "MDArray_SetNoDataValueUInt64(MDArray self, GUIntBig v) -> CPLErr"},
   55553             :    { "MDArray_SetNoDataValueString", _wrap_MDArray_SetNoDataValueString, METH_VARARGS, "MDArray_SetNoDataValueString(MDArray self, char const * nodata) -> CPLErr"},
   55554             :    { "MDArray_SetNoDataValueRaw", _wrap_MDArray_SetNoDataValueRaw, METH_VARARGS, "MDArray_SetNoDataValueRaw(MDArray self, GIntBig nLen) -> CPLErr"},
   55555             :    { "MDArray_DeleteNoDataValue", _wrap_MDArray_DeleteNoDataValue, METH_O, "MDArray_DeleteNoDataValue(MDArray self) -> CPLErr"},
   55556             :    { "MDArray_GetOffset", _wrap_MDArray_GetOffset, METH_O, "MDArray_GetOffset(MDArray self)"},
   55557             :    { "MDArray_GetOffsetStorageType", _wrap_MDArray_GetOffsetStorageType, METH_O, "MDArray_GetOffsetStorageType(MDArray self) -> GDALDataType"},
   55558             :    { "MDArray_GetScale", _wrap_MDArray_GetScale, METH_O, "MDArray_GetScale(MDArray self)"},
   55559             :    { "MDArray_GetScaleStorageType", _wrap_MDArray_GetScaleStorageType, METH_O, "MDArray_GetScaleStorageType(MDArray self) -> GDALDataType"},
   55560             :    { "MDArray_SetOffset", (PyCFunction)(void(*)(void))_wrap_MDArray_SetOffset, METH_VARARGS|METH_KEYWORDS, "MDArray_SetOffset(MDArray self, double val, GDALDataType storageType=GDT_Unknown) -> CPLErr"},
   55561             :    { "MDArray_SetScale", (PyCFunction)(void(*)(void))_wrap_MDArray_SetScale, METH_VARARGS|METH_KEYWORDS, "MDArray_SetScale(MDArray self, double val, GDALDataType storageType=GDT_Unknown) -> CPLErr"},
   55562             :    { "MDArray_SetUnit", _wrap_MDArray_SetUnit, METH_VARARGS, "MDArray_SetUnit(MDArray self, char const * unit) -> CPLErr"},
   55563             :    { "MDArray_GetUnit", _wrap_MDArray_GetUnit, METH_O, "MDArray_GetUnit(MDArray self) -> char const *"},
   55564             :    { "MDArray_SetSpatialRef", _wrap_MDArray_SetSpatialRef, METH_VARARGS, "MDArray_SetSpatialRef(MDArray self, SpatialReference srs) -> OGRErr"},
   55565             :    { "MDArray_GetSpatialRef", _wrap_MDArray_GetSpatialRef, METH_O, "MDArray_GetSpatialRef(MDArray self) -> SpatialReference"},
   55566             :    { "MDArray_GetView", _wrap_MDArray_GetView, METH_VARARGS, "MDArray_GetView(MDArray self, char const * viewExpr) -> MDArray"},
   55567             :    { "MDArray_Transpose", _wrap_MDArray_Transpose, METH_VARARGS, "MDArray_Transpose(MDArray self, int axisMap) -> MDArray"},
   55568             :    { "MDArray_GetUnscaled", _wrap_MDArray_GetUnscaled, METH_O, "MDArray_GetUnscaled(MDArray self) -> MDArray"},
   55569             :    { "MDArray_GetMask", _wrap_MDArray_GetMask, METH_VARARGS, "MDArray_GetMask(MDArray self, char ** options=None) -> MDArray"},
   55570             :    { "MDArray_GetGridded", (PyCFunction)(void(*)(void))_wrap_MDArray_GetGridded, METH_VARARGS|METH_KEYWORDS, "MDArray_GetGridded(MDArray self, char const * pszGridOptions, MDArray xArray=None, MDArray yArray=None, char ** options=None) -> MDArray"},
   55571             :    { "MDArray_AsClassicDataset", _wrap_MDArray_AsClassicDataset, METH_VARARGS, "MDArray_AsClassicDataset(MDArray self, size_t iXDim, size_t iYDim, Group hRootGroup=None, char ** options=None) -> Dataset"},
   55572             :    { "MDArray_GetStatistics", (PyCFunction)(void(*)(void))_wrap_MDArray_GetStatistics, METH_VARARGS|METH_KEYWORDS, "MDArray_GetStatistics(MDArray self, bool approx_ok=FALSE, bool force=TRUE, GDALProgressFunc callback=0, void * callback_data=None) -> Statistics"},
   55573             :    { "MDArray_ComputeStatistics", (PyCFunction)(void(*)(void))_wrap_MDArray_ComputeStatistics, METH_VARARGS|METH_KEYWORDS, "MDArray_ComputeStatistics(MDArray self, bool approx_ok=FALSE, GDALProgressFunc callback=0, void * callback_data=None, char ** options=None) -> Statistics"},
   55574             :    { "MDArray_GetResampled", _wrap_MDArray_GetResampled, METH_VARARGS, "MDArray_GetResampled(MDArray self, int nDimensions, GDALRIOResampleAlg resample_alg, OSRSpatialReferenceShadow ** srs, char ** options=None) -> MDArray"},
   55575             :    { "MDArray_Cache", _wrap_MDArray_Cache, METH_VARARGS, "MDArray_Cache(MDArray self, char ** options=None) -> bool"},
   55576             :    { "MDArray_Rename", _wrap_MDArray_Rename, METH_VARARGS, "MDArray_Rename(MDArray self, char const * newName) -> CPLErr"},
   55577             :    { "MDArray_swigregister", MDArray_swigregister, METH_O, NULL},
   55578             :    { "delete_Attribute", _wrap_delete_Attribute, METH_O, "delete_Attribute(Attribute self)"},
   55579             :    { "Attribute_GetName", _wrap_Attribute_GetName, METH_O, "Attribute_GetName(Attribute self) -> char const *"},
   55580             :    { "Attribute_GetFullName", _wrap_Attribute_GetFullName, METH_O, "Attribute_GetFullName(Attribute self) -> char const *"},
   55581             :    { "Attribute_GetTotalElementsCount", _wrap_Attribute_GetTotalElementsCount, METH_O, "Attribute_GetTotalElementsCount(Attribute self) -> GUIntBig"},
   55582             :    { "Attribute_GetDimensionCount", _wrap_Attribute_GetDimensionCount, METH_O, "Attribute_GetDimensionCount(Attribute self) -> size_t"},
   55583             :    { "Attribute_GetDimensionsSize", _wrap_Attribute_GetDimensionsSize, METH_O, "Attribute_GetDimensionsSize(Attribute self)"},
   55584             :    { "Attribute_GetDataType", _wrap_Attribute_GetDataType, METH_O, "Attribute_GetDataType(Attribute self) -> ExtendedDataType"},
   55585             :    { "Attribute_ReadAsRaw", _wrap_Attribute_ReadAsRaw, METH_O, "Attribute_ReadAsRaw(Attribute self) -> CPLErr"},
   55586             :    { "Attribute_ReadAsString", _wrap_Attribute_ReadAsString, METH_O, "Attribute_ReadAsString(Attribute self) -> char const *"},
   55587             :    { "Attribute_ReadAsInt", _wrap_Attribute_ReadAsInt, METH_O, "Attribute_ReadAsInt(Attribute self) -> int"},
   55588             :    { "Attribute_ReadAsDouble", _wrap_Attribute_ReadAsDouble, METH_O, "Attribute_ReadAsDouble(Attribute self) -> double"},
   55589             :    { "Attribute_ReadAsStringArray", _wrap_Attribute_ReadAsStringArray, METH_O, "Attribute_ReadAsStringArray(Attribute self) -> char **"},
   55590             :    { "Attribute_ReadAsIntArray", _wrap_Attribute_ReadAsIntArray, METH_O, "Attribute_ReadAsIntArray(Attribute self)"},
   55591             :    { "Attribute_ReadAsDoubleArray", _wrap_Attribute_ReadAsDoubleArray, METH_O, "Attribute_ReadAsDoubleArray(Attribute self)"},
   55592             :    { "Attribute_WriteRaw", _wrap_Attribute_WriteRaw, METH_VARARGS, "Attribute_WriteRaw(Attribute self, GIntBig nLen) -> CPLErr"},
   55593             :    { "Attribute_WriteString", _wrap_Attribute_WriteString, METH_VARARGS, "Attribute_WriteString(Attribute self, char const * val) -> CPLErr"},
   55594             :    { "Attribute_WriteStringArray", _wrap_Attribute_WriteStringArray, METH_VARARGS, "Attribute_WriteStringArray(Attribute self, char ** vals) -> CPLErr"},
   55595             :    { "Attribute_WriteInt", _wrap_Attribute_WriteInt, METH_VARARGS, "Attribute_WriteInt(Attribute self, int val) -> CPLErr"},
   55596             :    { "Attribute_WriteDouble", _wrap_Attribute_WriteDouble, METH_VARARGS, "Attribute_WriteDouble(Attribute self, double val) -> CPLErr"},
   55597             :    { "Attribute_WriteDoubleArray", _wrap_Attribute_WriteDoubleArray, METH_VARARGS, "Attribute_WriteDoubleArray(Attribute self, int nList) -> CPLErr"},
   55598             :    { "Attribute_Rename", _wrap_Attribute_Rename, METH_VARARGS, "Attribute_Rename(Attribute self, char const * newName) -> CPLErr"},
   55599             :    { "Attribute_swigregister", Attribute_swigregister, METH_O, NULL},
   55600             :    { "delete_Dimension", _wrap_delete_Dimension, METH_O, "delete_Dimension(Dimension self)"},
   55601             :    { "Dimension_GetName", _wrap_Dimension_GetName, METH_O, "Dimension_GetName(Dimension self) -> char const *"},
   55602             :    { "Dimension_GetFullName", _wrap_Dimension_GetFullName, METH_O, "Dimension_GetFullName(Dimension self) -> char const *"},
   55603             :    { "Dimension_GetType", _wrap_Dimension_GetType, METH_O, "Dimension_GetType(Dimension self) -> char const *"},
   55604             :    { "Dimension_GetDirection", _wrap_Dimension_GetDirection, METH_O, "Dimension_GetDirection(Dimension self) -> char const *"},
   55605             :    { "Dimension_GetSize", _wrap_Dimension_GetSize, METH_O, "Dimension_GetSize(Dimension self) -> GUIntBig"},
   55606             :    { "Dimension_GetIndexingVariable", _wrap_Dimension_GetIndexingVariable, METH_O, "Dimension_GetIndexingVariable(Dimension self) -> MDArray"},
   55607             :    { "Dimension_SetIndexingVariable", _wrap_Dimension_SetIndexingVariable, METH_VARARGS, "Dimension_SetIndexingVariable(Dimension self, MDArray array) -> bool"},
   55608             :    { "Dimension_Rename", _wrap_Dimension_Rename, METH_VARARGS, "Dimension_Rename(Dimension self, char const * newName) -> CPLErr"},
   55609             :    { "Dimension_swigregister", Dimension_swigregister, METH_O, NULL},
   55610             :    { "delete_ExtendedDataType", _wrap_delete_ExtendedDataType, METH_O, "delete_ExtendedDataType(ExtendedDataType self)"},
   55611             :    { "ExtendedDataType_Create", _wrap_ExtendedDataType_Create, METH_O, "ExtendedDataType_Create(GDALDataType dt) -> ExtendedDataType"},
   55612             :    { "ExtendedDataType_CreateString", _wrap_ExtendedDataType_CreateString, METH_VARARGS, "ExtendedDataType_CreateString(size_t nMaxStringLength=0, GDALExtendedDataTypeSubType eSubType=GEDTST_NONE) -> ExtendedDataType"},
   55613             :    { "ExtendedDataType_CreateCompound", _wrap_ExtendedDataType_CreateCompound, METH_VARARGS, "ExtendedDataType_CreateCompound(char const * name, size_t nTotalSize, int nComps) -> ExtendedDataType"},
   55614             :    { "ExtendedDataType_GetName", _wrap_ExtendedDataType_GetName, METH_O, "ExtendedDataType_GetName(ExtendedDataType self) -> char const *"},
   55615             :    { "ExtendedDataType_GetClass", _wrap_ExtendedDataType_GetClass, METH_O, "ExtendedDataType_GetClass(ExtendedDataType self) -> GDALExtendedDataTypeClass"},
   55616             :    { "ExtendedDataType_GetNumericDataType", _wrap_ExtendedDataType_GetNumericDataType, METH_O, "ExtendedDataType_GetNumericDataType(ExtendedDataType self) -> GDALDataType"},
   55617             :    { "ExtendedDataType_GetSize", _wrap_ExtendedDataType_GetSize, METH_O, "ExtendedDataType_GetSize(ExtendedDataType self) -> size_t"},
   55618             :    { "ExtendedDataType_GetMaxStringLength", _wrap_ExtendedDataType_GetMaxStringLength, METH_O, "ExtendedDataType_GetMaxStringLength(ExtendedDataType self) -> size_t"},
   55619             :    { "ExtendedDataType_GetSubType", _wrap_ExtendedDataType_GetSubType, METH_O, "ExtendedDataType_GetSubType(ExtendedDataType self) -> GDALExtendedDataTypeSubType"},
   55620             :    { "ExtendedDataType_GetComponents", _wrap_ExtendedDataType_GetComponents, METH_O, "ExtendedDataType_GetComponents(ExtendedDataType self)"},
   55621             :    { "ExtendedDataType_CanConvertTo", _wrap_ExtendedDataType_CanConvertTo, METH_VARARGS, "ExtendedDataType_CanConvertTo(ExtendedDataType self, ExtendedDataType other) -> bool"},
   55622             :    { "ExtendedDataType_Equals", _wrap_ExtendedDataType_Equals, METH_VARARGS, "ExtendedDataType_Equals(ExtendedDataType self, ExtendedDataType other) -> bool"},
   55623             :    { "ExtendedDataType_swigregister", ExtendedDataType_swigregister, METH_O, NULL},
   55624             :    { "delete_EDTComponent", _wrap_delete_EDTComponent, METH_O, "delete_EDTComponent(EDTComponent self)"},
   55625             :    { "EDTComponent_Create", _wrap_EDTComponent_Create, METH_VARARGS, "EDTComponent_Create(char const * name, size_t offset, ExtendedDataType type) -> EDTComponent"},
   55626             :    { "EDTComponent_GetName", _wrap_EDTComponent_GetName, METH_O, "EDTComponent_GetName(EDTComponent self) -> char const *"},
   55627             :    { "EDTComponent_GetOffset", _wrap_EDTComponent_GetOffset, METH_O, "EDTComponent_GetOffset(EDTComponent self) -> size_t"},
   55628             :    { "EDTComponent_GetType", _wrap_EDTComponent_GetType, METH_O, "EDTComponent_GetType(EDTComponent self) -> ExtendedDataType"},
   55629             :    { "EDTComponent_swigregister", EDTComponent_swigregister, METH_O, NULL},
   55630             :    { "CreateRasterAttributeTableFromMDArrays", _wrap_CreateRasterAttributeTableFromMDArrays, METH_VARARGS, "CreateRasterAttributeTableFromMDArrays(GDALRATTableType eTableType, int nArrays, int nUsages=0) -> RasterAttributeTable"},
   55631             :    { "Band_XSize_get", _wrap_Band_XSize_get, METH_O, "Band_XSize_get(Band self) -> int"},
   55632             :    { "Band_YSize_get", _wrap_Band_YSize_get, METH_O, "Band_YSize_get(Band self) -> int"},
   55633             :    { "Band_DataType_get", _wrap_Band_DataType_get, METH_O, "Band_DataType_get(Band self) -> GDALDataType"},
   55634             :    { "Band_GetDataset", _wrap_Band_GetDataset, METH_O, "\n"
   55635             :     "Band_GetDataset(Band self) -> Dataset\n"
   55636             :     "\n"
   55637             :     "\n"
   55638             :     "Fetch the :py:class:`Dataset` associated with this Band.\n"
   55639             :     "See :cpp:func:`GDALRasterBand::GetDataset`.\n"
   55640             :     "\n"
   55641             :     ""},
   55642             :    { "Band_GetBand", _wrap_Band_GetBand, METH_O, "\n"
   55643             :     "Band_GetBand(Band self) -> int\n"
   55644             :     "\n"
   55645             :     "\n"
   55646             :     "Return the index of this band.\n"
   55647             :     "See :cpp:func:`GDALRasterBand::GetBand`.\n"
   55648             :     "\n"
   55649             :     "Returns\n"
   55650             :     "-------\n"
   55651             :     "int\n"
   55652             :     "    the (1-based) index of this band\n"
   55653             :     "\n"
   55654             :     ""},
   55655             :    { "Band_GetBlockSize", _wrap_Band_GetBlockSize, METH_O, "\n"
   55656             :     "Band_GetBlockSize(Band self)\n"
   55657             :     "\n"
   55658             :     "\n"
   55659             :     "Fetch the natural block size of this band.\n"
   55660             :     "See :cpp:func:`GDALRasterBand::GetBlockSize`.\n"
   55661             :     "\n"
   55662             :     "Returns\n"
   55663             :     "-------\n"
   55664             :     "list\n"
   55665             :     "    list with the x and y dimensions of a block\n"
   55666             :     "\n"
   55667             :     ""},
   55668             :    { "Band_GetActualBlockSize", _wrap_Band_GetActualBlockSize, METH_VARARGS, "\n"
   55669             :     "Band_GetActualBlockSize(Band self, int nXBlockOff, int nYBlockOff)\n"
   55670             :     "\n"
   55671             :     "\n"
   55672             :     "Fetch the actual block size for a given block offset.\n"
   55673             :     "See :cpp:func:`GDALRasterBand::GetActualBlockSize`.\n"
   55674             :     "\n"
   55675             :     "Parameters\n"
   55676             :     "----------\n"
   55677             :     "nXBlockOff : int\n"
   55678             :     "    the horizontal block offset for which to calculate the\n"
   55679             :     "    number of valid pixels, with zero indicating the left most block, 1 the next\n"
   55680             :     "    block and so forth.\n"
   55681             :     "nYBlockOff : int\n"
   55682             :     "    the vertical block offset, with zero indicating\n"
   55683             :     "    the top most block, 1 the next block and so forth.\n"
   55684             :     "\n"
   55685             :     "Returns\n"
   55686             :     "-------\n"
   55687             :     "tuple\n"
   55688             :     "    tuple with the x and y dimensions of the block\n"
   55689             :     "\n"
   55690             :     ""},
   55691             :    { "Band_GetColorInterpretation", _wrap_Band_GetColorInterpretation, METH_O, "\n"
   55692             :     "Band_GetColorInterpretation(Band self) -> GDALColorInterp\n"
   55693             :     "\n"
   55694             :     "\n"
   55695             :     "Get the :cpp:enum:`GDALColorInterp` value for this band.\n"
   55696             :     "See :cpp:func:`GDALRasterBand::GetColorInterpretation`.\n"
   55697             :     "\n"
   55698             :     "Returns\n"
   55699             :     "-------\n"
   55700             :     "int\n"
   55701             :     "\n"
   55702             :     ""},
   55703             :    { "Band_GetRasterColorInterpretation", _wrap_Band_GetRasterColorInterpretation, METH_O, "\n"
   55704             :     "Band_GetRasterColorInterpretation(Band self) -> GDALColorInterp\n"
   55705             :     "\n"
   55706             :     "\n"
   55707             :     "Return the color interpretation code for this band.\n"
   55708             :     "See :cpp:func:`GDALRasterBand::GetColorInterpretation`.\n"
   55709             :     "\n"
   55710             :     "Returns\n"
   55711             :     "-------\n"
   55712             :     "int\n"
   55713             :     "    The color interpretation code (default :py:const:`gdal.GCI_Undefined`)\n"
   55714             :     "\n"
   55715             :     "\n"
   55716             :     ""},
   55717             :    { "Band_SetColorInterpretation", _wrap_Band_SetColorInterpretation, METH_VARARGS, "\n"
   55718             :     "Band_SetColorInterpretation(Band self, GDALColorInterp val) -> CPLErr\n"
   55719             :     "\n"
   55720             :     "\n"
   55721             :     "Set color interpretation of the band\n"
   55722             :     "See :cpp:func:`GDALRasterBand::SetColorInterpretation`.\n"
   55723             :     "\n"
   55724             :     "Parameters\n"
   55725             :     "----------\n"
   55726             :     "val : int\n"
   55727             :     "    A color interpretation code such as :py:const:`gdal.GCI_RedBand`\n"
   55728             :     "\n"
   55729             :     "Returns\n"
   55730             :     "-------\n"
   55731             :     "int:\n"
   55732             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   55733             :     "\n"
   55734             :     ""},
   55735             :    { "Band_SetRasterColorInterpretation", _wrap_Band_SetRasterColorInterpretation, METH_VARARGS, "\n"
   55736             :     "Band_SetRasterColorInterpretation(Band self, GDALColorInterp val) -> CPLErr\n"
   55737             :     "\n"
   55738             :     "Deprecated.  Alternate name for :py:meth:`SetColorInterpretation`.\n"
   55739             :     "\n"
   55740             :     ""},
   55741             :    { "Band_GetNoDataValue", _wrap_Band_GetNoDataValue, METH_O, "Band_GetNoDataValue(Band self)"},
   55742             :    { "Band_GetNoDataValueAsInt64", _wrap_Band_GetNoDataValueAsInt64, METH_O, "\n"
   55743             :     "Band_GetNoDataValueAsInt64(Band self)\n"
   55744             :     "\n"
   55745             :     "\n"
   55746             :     "Fetch the nodata value for this band.\n"
   55747             :     "See :cpp:func:`GDALRasterBand::GetNoDataValueAsInt64`.\n"
   55748             :     "\n"
   55749             :     "Returns\n"
   55750             :     "-------\n"
   55751             :     "int\n"
   55752             :     "    The nodata value, or ``None`` if it has not been set or\n"
   55753             :     "    the data type of this band is not :py:const:`gdal.GDT_Int64`.\n"
   55754             :     "\n"
   55755             :     "\n"
   55756             :     ""},
   55757             :    { "Band_GetNoDataValueAsUInt64", _wrap_Band_GetNoDataValueAsUInt64, METH_O, "\n"
   55758             :     "Band_GetNoDataValueAsUInt64(Band self)\n"
   55759             :     "\n"
   55760             :     "\n"
   55761             :     "Fetch the nodata value for this band.\n"
   55762             :     "See :cpp:func:`GDALRasterBand::GetNoDataValueAsUInt64`.\n"
   55763             :     "\n"
   55764             :     "Returns\n"
   55765             :     "-------\n"
   55766             :     "int\n"
   55767             :     "    The nodata value, or ``None`` if it has not been set or\n"
   55768             :     "    the data type of this band is not :py:const:`gdal.GDT_UInt64`.\n"
   55769             :     "\n"
   55770             :     "\n"
   55771             :     ""},
   55772             :    { "Band_SetNoDataValue", _wrap_Band_SetNoDataValue, METH_VARARGS, "Band_SetNoDataValue(Band self, double d) -> CPLErr"},
   55773             :    { "Band_SetNoDataValueAsInt64", _wrap_Band_SetNoDataValueAsInt64, METH_VARARGS, "Band_SetNoDataValueAsInt64(Band self, GIntBig v) -> CPLErr"},
   55774             :    { "Band_SetNoDataValueAsUInt64", _wrap_Band_SetNoDataValueAsUInt64, METH_VARARGS, "Band_SetNoDataValueAsUInt64(Band self, GUIntBig v) -> CPLErr"},
   55775             :    { "Band_DeleteNoDataValue", _wrap_Band_DeleteNoDataValue, METH_O, "\n"
   55776             :     "Band_DeleteNoDataValue(Band self) -> CPLErr\n"
   55777             :     "\n"
   55778             :     "\n"
   55779             :     "Remove the nodata value for this band.\n"
   55780             :     "\n"
   55781             :     "Returns\n"
   55782             :     "-------\n"
   55783             :     "int:\n"
   55784             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   55785             :     "\n"
   55786             :     "\n"
   55787             :     ""},
   55788             :    { "Band_GetUnitType", _wrap_Band_GetUnitType, METH_O, "\n"
   55789             :     "Band_GetUnitType(Band self) -> char const *\n"
   55790             :     "\n"
   55791             :     "\n"
   55792             :     "Return a name for the units of this raster's values.\n"
   55793             :     "See :cpp:func:`GDALRasterBand::GetUnitType`.\n"
   55794             :     "\n"
   55795             :     "Returns\n"
   55796             :     "-------\n"
   55797             :     "str\n"
   55798             :     "\n"
   55799             :     "Examples\n"
   55800             :     "--------\n"
   55801             :     ">>> ds = gdal.GetDriverByName('MEM').Create('', 10, 10)\n"
   55802             :     ">>> ds.GetRasterBand(1).SetUnitType('ft')\n"
   55803             :     "0\n"
   55804             :     ">>> ds.GetRasterBand(1).GetUnitType()\n"
   55805             :     "'ft'\n"
   55806             :     "\n"
   55807             :     ""},
   55808             :    { "Band_SetUnitType", _wrap_Band_SetUnitType, METH_VARARGS, "\n"
   55809             :     "Band_SetUnitType(Band self, char const * val) -> CPLErr\n"
   55810             :     "\n"
   55811             :     "\n"
   55812             :     "Set unit type.\n"
   55813             :     "See :cpp:func:`GDALRasterBand::SetUnitType`.\n"
   55814             :     "\n"
   55815             :     "Parameters\n"
   55816             :     "----------\n"
   55817             :     "val : str\n"
   55818             :     "\n"
   55819             :     "Returns\n"
   55820             :     "-------\n"
   55821             :     "int:\n"
   55822             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   55823             :     "\n"
   55824             :     ""},
   55825             :    { "Band_GetRasterCategoryNames", _wrap_Band_GetRasterCategoryNames, METH_O, "\n"
   55826             :     "Band_GetRasterCategoryNames(Band self) -> char **\n"
   55827             :     "\n"
   55828             :     "\n"
   55829             :     "Fetch the list of category names for this band.\n"
   55830             :     "See :cpp:func:`GDALRasterBand::GetCategoryNames`.\n"
   55831             :     "\n"
   55832             :     "Returns\n"
   55833             :     "-------\n"
   55834             :     "list\n"
   55835             :     "    The list of names, or ``None`` if no names exist.\n"
   55836             :     "\n"
   55837             :     "\n"
   55838             :     ""},
   55839             :    { "Band_SetRasterCategoryNames", _wrap_Band_SetRasterCategoryNames, METH_VARARGS, "\n"
   55840             :     "Band_SetRasterCategoryNames(Band self, char ** names) -> CPLErr\n"
   55841             :     "\n"
   55842             :     "Deprecated.  Alternate name for :py:meth:`SetCategoryNames`.\n"
   55843             :     "\n"
   55844             :     ""},
   55845             :    { "Band_GetMinimum", _wrap_Band_GetMinimum, METH_O, "\n"
   55846             :     "Band_GetMinimum(Band self)\n"
   55847             :     "\n"
   55848             :     "\n"
   55849             :     "Fetch a previously stored maximum value for this band.\n"
   55850             :     "See :cpp:func:`GDALRasterBand::GetMinimum`.\n"
   55851             :     "\n"
   55852             :     "Returns\n"
   55853             :     "-------\n"
   55854             :     "float\n"
   55855             :     "    The stored minimum value, or ``None`` if no value\n"
   55856             :     "    has been stored.\n"
   55857             :     "\n"
   55858             :     "\n"
   55859             :     ""},
   55860             :    { "Band_GetMaximum", _wrap_Band_GetMaximum, METH_O, "\n"
   55861             :     "Band_GetMaximum(Band self)\n"
   55862             :     "\n"
   55863             :     "\n"
   55864             :     "Fetch a previously stored maximum value for this band.\n"
   55865             :     "See :cpp:func:`GDALRasterBand::GetMaximum`.\n"
   55866             :     "\n"
   55867             :     "Returns\n"
   55868             :     "-------\n"
   55869             :     "float\n"
   55870             :     "    The stored maximum value, or ``None`` if no value\n"
   55871             :     "    has been stored.\n"
   55872             :     "\n"
   55873             :     "\n"
   55874             :     ""},
   55875             :    { "Band_GetOffset", _wrap_Band_GetOffset, METH_O, "\n"
   55876             :     "Band_GetOffset(Band self)\n"
   55877             :     "\n"
   55878             :     "\n"
   55879             :     "Fetch the raster value offset.\n"
   55880             :     "See :cpp:func:`GDALRasterBand::GetOffset`.\n"
   55881             :     "\n"
   55882             :     "Returns\n"
   55883             :     "-------\n"
   55884             :     "double\n"
   55885             :     "    The offset value, or ``0.0``.\n"
   55886             :     "\n"
   55887             :     "\n"
   55888             :     ""},
   55889             :    { "Band_GetScale", _wrap_Band_GetScale, METH_O, "\n"
   55890             :     "Band_GetScale(Band self)\n"
   55891             :     "\n"
   55892             :     "\n"
   55893             :     "Fetch the band scale value.\n"
   55894             :     "See :cpp:func:`GDALRasterBand::GetScale`.\n"
   55895             :     "\n"
   55896             :     "Returns\n"
   55897             :     "-------\n"
   55898             :     "double\n"
   55899             :     "    The scale value, or ``1.0``.\n"
   55900             :     "\n"
   55901             :     ""},
   55902             :    { "Band_SetOffset", _wrap_Band_SetOffset, METH_VARARGS, "\n"
   55903             :     "Band_SetOffset(Band self, double val) -> CPLErr\n"
   55904             :     "\n"
   55905             :     "\n"
   55906             :     "Set scaling offset.\n"
   55907             :     "See :cpp:func:`GDALRasterBand::SetOffset`.\n"
   55908             :     "\n"
   55909             :     "Parameters\n"
   55910             :     "----------\n"
   55911             :     "val : float\n"
   55912             :     "\n"
   55913             :     "Returns\n"
   55914             :     "-------\n"
   55915             :     "int:\n"
   55916             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   55917             :     "\n"
   55918             :     "See Also\n"
   55919             :     "--------\n"
   55920             :     ":py:meth:`SetScale`\n"
   55921             :     "\n"
   55922             :     ""},
   55923             :    { "Band_SetScale", _wrap_Band_SetScale, METH_VARARGS, "\n"
   55924             :     "Band_SetScale(Band self, double val) -> CPLErr\n"
   55925             :     "\n"
   55926             :     "Set scaling ratio.\n"
   55927             :     "See :cpp:func:`GDALRasterBand::SetScale`.\n"
   55928             :     "\n"
   55929             :     "Parameters\n"
   55930             :     "----------\n"
   55931             :     "val : float\n"
   55932             :     "\n"
   55933             :     "Returns\n"
   55934             :     "-------\n"
   55935             :     "int:\n"
   55936             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   55937             :     "\n"
   55938             :     "See Also\n"
   55939             :     "--------\n"
   55940             :     ":py:meth:`SetOffset`\n"
   55941             :     "\n"
   55942             :     ""},
   55943             :    { "Band_GetStatistics", _wrap_Band_GetStatistics, METH_VARARGS, "\n"
   55944             :     "Band_GetStatistics(Band self, int approx_ok, int force) -> CPLErr\n"
   55945             :     "\n"
   55946             :     "\n"
   55947             :     "Return the minimum, maximum, mean, and standard deviation of all pixel values\n"
   55948             :     "in this band.\n"
   55949             :     "See :cpp:func:`GDALRasterBand::GetStatistics`\n"
   55950             :     "\n"
   55951             :     "Parameters\n"
   55952             :     "----------\n"
   55953             :     "approx_ok : bool\n"
   55954             :     "    If ``True``, allow overviews or a subset of image tiles to be used in\n"
   55955             :     "    computing the statistics.\n"
   55956             :     "force : bool\n"
   55957             :     "    If ``False``, only return a result if it can be obtained without scanning\n"
   55958             :     "    the image, i.e. from pre-existing metadata.\n"
   55959             :     "\n"
   55960             :     "Returns\n"
   55961             :     "-------\n"
   55962             :     "list\n"
   55963             :     "   a list with the min, max, mean, and standard deviation of values\n"
   55964             :     "   in the Band.\n"
   55965             :     "\n"
   55966             :     "See Also\n"
   55967             :     "--------\n"
   55968             :     ":py:meth:`ComputeBandStats`\n"
   55969             :     ":py:meth:`ComputeRasterMinMax`\n"
   55970             :     ":py:meth:`GetMaximum`\n"
   55971             :     ":py:meth:`GetMinimum`\n"
   55972             :     ":py:meth:`GetStatistics`\n"
   55973             :     "\n"
   55974             :     ""},
   55975             :    { "Band_ComputeStatistics", (PyCFunction)(void(*)(void))_wrap_Band_ComputeStatistics, METH_VARARGS|METH_KEYWORDS, "Band_ComputeStatistics(Band self, bool approx_ok, GDALProgressFunc callback=0, void * callback_data=None) -> CPLErr"},
   55976             :    { "Band_SetStatistics", _wrap_Band_SetStatistics, METH_VARARGS, "\n"
   55977             :     "Band_SetStatistics(Band self, double min, double max, double mean, double stddev) -> CPLErr\n"
   55978             :     "\n"
   55979             :     "\n"
   55980             :     "Set statistics on band.\n"
   55981             :     "See :cpp:func:`GDALRasterBand::SetStatistics`.\n"
   55982             :     "\n"
   55983             :     "Parameters\n"
   55984             :     "----------\n"
   55985             :     "min : float\n"
   55986             :     "max : float\n"
   55987             :     "mean : float\n"
   55988             :     "stdev : float\n"
   55989             :     "\n"
   55990             :     "Returns\n"
   55991             :     "-------\n"
   55992             :     "int:\n"
   55993             :     "   :py:const:`CE_None` on apparent success or :py:const:`CE_Failure` on\n"
   55994             :     "   failure.  This method cannot detect whether metadata will be properly saved and\n"
   55995             :     "   so may return :py:const:`gdal.`CE_None` even if the statistics will never be\n"
   55996             :     "   saved.\n"
   55997             :     "\n"
   55998             :     "See Also\n"
   55999             :     "--------\n"
   56000             :     ":py:meth:`ComputeBandStats`\n"
   56001             :     ":py:meth:`ComputeRasterMinMax`\n"
   56002             :     ":py:meth:`ComputeStatistics`\n"
   56003             :     ":py:meth:`GetMaximum`\n"
   56004             :     ":py:meth:`GetMinimum`\n"
   56005             :     ":py:meth:`GetStatistics`\n"
   56006             :     "\n"
   56007             :     ""},
   56008             :    { "Band_GetOverviewCount", _wrap_Band_GetOverviewCount, METH_O, "\n"
   56009             :     "Band_GetOverviewCount(Band self) -> int\n"
   56010             :     "\n"
   56011             :     "\n"
   56012             :     "Return the number of overview layers available.\n"
   56013             :     "See :cpp:func:`GDALRasterBand::GetOverviewCount`.\n"
   56014             :     "\n"
   56015             :     "Returns\n"
   56016             :     "-------\n"
   56017             :     "int\n"
   56018             :     "\n"
   56019             :     "\n"
   56020             :     ""},
   56021             :    { "Band_GetOverview", _wrap_Band_GetOverview, METH_VARARGS, "\n"
   56022             :     "Band_GetOverview(Band self, int i) -> Band\n"
   56023             :     "\n"
   56024             :     "\n"
   56025             :     "Fetch a raster overview.\n"
   56026             :     "See :cpp:func:`GDALRasterBand::GetOverview`.\n"
   56027             :     "\n"
   56028             :     "Parameters\n"
   56029             :     "----------\n"
   56030             :     "i : int\n"
   56031             :     "    Overview index between 0 and ``GetOverviewCount() - 1``.\n"
   56032             :     "\n"
   56033             :     "Returns\n"
   56034             :     "-------\n"
   56035             :     "Band\n"
   56036             :     "\n"
   56037             :     "\n"
   56038             :     ""},
   56039             :    { "Band_Checksum", (PyCFunction)(void(*)(void))_wrap_Band_Checksum, METH_VARARGS|METH_KEYWORDS, "\n"
   56040             :     "Band_Checksum(Band self, int xoff=0, int yoff=0, int * xsize=None, int * ysize=None) -> int\n"
   56041             :     "\n"
   56042             :     "\n"
   56043             :     "Computes a checksum from a region of a RasterBand.\n"
   56044             :     "See :cpp:func:`GDALChecksumImage`.\n"
   56045             :     "\n"
   56046             :     "Parameters\n"
   56047             :     "----------\n"
   56048             :     "xoff : int, default=0\n"
   56049             :     "   The pixel offset to left side of the region of the band to\n"
   56050             :     "   be read. This would be zero to start from the left side.\n"
   56051             :     "yoff : int, default=0\n"
   56052             :     "   The line offset to top side of the region of the band to\n"
   56053             :     "   be read. This would be zero to start from the top side.\n"
   56054             :     "xsize : int, optional\n"
   56055             :     "     The number of pixels to read in the x direction. By default,\n"
   56056             :     "     equal to the number of columns in the raster.\n"
   56057             :     "ysize : int, optional\n"
   56058             :     "     The number of rows to read in the y direction. By default,\n"
   56059             :     "     equal to the number of bands in the raster.\n"
   56060             :     "\n"
   56061             :     "Returns\n"
   56062             :     "-------\n"
   56063             :     "int\n"
   56064             :     "    checksum value, or -1 in case of error\n"
   56065             :     "\n"
   56066             :     "\n"
   56067             :     ""},
   56068             :    { "Band_ComputeRasterMinMax", (PyCFunction)(void(*)(void))_wrap_Band_ComputeRasterMinMax, METH_VARARGS|METH_KEYWORDS, "Band_ComputeRasterMinMax(Band self, bool approx_ok=False, bool can_return_none=False)"},
   56069             :    { "Band_ComputeBandStats", _wrap_Band_ComputeBandStats, METH_VARARGS, "\n"
   56070             :     "Band_ComputeBandStats(Band self, int samplestep=1)\n"
   56071             :     "\n"
   56072             :     "\n"
   56073             :     "Computes the mean and standard deviation of values in this Band.\n"
   56074             :     "See :cpp:func:`GDALComputeBandStats`.\n"
   56075             :     "\n"
   56076             :     "Parameters\n"
   56077             :     "----------\n"
   56078             :     "samplestep : int, default=1\n"
   56079             :     "    Step between scanlines used to compute statistics.\n"
   56080             :     "\n"
   56081             :     "Returns\n"
   56082             :     "-------\n"
   56083             :     "tuple\n"
   56084             :     "    tuple of length 2 with value of mean and standard deviation\n"
   56085             :     "\n"
   56086             :     "See Also\n"
   56087             :     "--------\n"
   56088             :     ":py:meth:`ComputeRasterMinMax`\n"
   56089             :     ":py:meth:`ComputeStatistics`\n"
   56090             :     ":py:meth:`GetMaximum`\n"
   56091             :     ":py:meth:`GetMinimum`\n"
   56092             :     ":py:meth:`GetStatistics`\n"
   56093             :     ":py:meth:`SetStatistics`\n"
   56094             :     "\n"
   56095             :     ""},
   56096             :    { "Band_Fill", _wrap_Band_Fill, METH_VARARGS, "\n"
   56097             :     "Band_Fill(Band self, double real_fill, double imag_fill=0.0) -> CPLErr\n"
   56098             :     "\n"
   56099             :     "\n"
   56100             :     "Fill this band with a constant value.\n"
   56101             :     "See :cpp:func:`GDALRasterBand::Fill`.\n"
   56102             :     "\n"
   56103             :     "Parameters\n"
   56104             :     "----------\n"
   56105             :     "real_fill : float\n"
   56106             :     "    real component of the fill value\n"
   56107             :     "imag_fill : float, default = 0.0\n"
   56108             :     "    imaginary component of the fill value\n"
   56109             :     "\n"
   56110             :     "Returns\n"
   56111             :     "-------\n"
   56112             :     "int:\n"
   56113             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   56114             :     "\n"
   56115             :     "\n"
   56116             :     ""},
   56117             :    { "Band_WriteRaster", (PyCFunction)(void(*)(void))_wrap_Band_WriteRaster, METH_VARARGS|METH_KEYWORDS, "Band_WriteRaster(Band self, int xoff, int yoff, int xsize, int ysize, GIntBig buf_len, int * buf_xsize=None, int * buf_ysize=None, GDALDataType * buf_type=None, GIntBig * buf_pixel_space=None, GIntBig * buf_line_space=None) -> CPLErr"},
   56118             :    { "Band_FlushCache", _wrap_Band_FlushCache, METH_O, "\n"
   56119             :     "Band_FlushCache(Band self)\n"
   56120             :     "\n"
   56121             :     "\n"
   56122             :     "Flush raster data cache.\n"
   56123             :     "See :cpp:func:`GDALRasterBand::FlushCache`.\n"
   56124             :     "\n"
   56125             :     ""},
   56126             :    { "Band_GetRasterColorTable", _wrap_Band_GetRasterColorTable, METH_O, "\n"
   56127             :     "Band_GetRasterColorTable(Band self) -> ColorTable\n"
   56128             :     "\n"
   56129             :     "\n"
   56130             :     "Fetch the color table associated with this band.\n"
   56131             :     "See :cpp:func:`GDALRasterBand::GetColorTable`.\n"
   56132             :     "\n"
   56133             :     "Returns\n"
   56134             :     "-------\n"
   56135             :     "ColorTable\n"
   56136             :     "    The :py:class:`ColorTable`, or ``None`` if it has not been defined.\n"
   56137             :     "\n"
   56138             :     ""},
   56139             :    { "Band_GetColorTable", _wrap_Band_GetColorTable, METH_O, "\n"
   56140             :     "Band_GetColorTable(Band self) -> ColorTable\n"
   56141             :     "\n"
   56142             :     "\n"
   56143             :     "Get the color table associated with this band.\n"
   56144             :     "See :cpp:func:`GDALRasterBand::GetColorTable`.\n"
   56145             :     "\n"
   56146             :     "Returns\n"
   56147             :     "-------\n"
   56148             :     "ColorTable or ``None``\n"
   56149             :     "\n"
   56150             :     ""},
   56151             :    { "Band_SetRasterColorTable", _wrap_Band_SetRasterColorTable, METH_VARARGS, "\n"
   56152             :     "Band_SetRasterColorTable(Band self, ColorTable arg) -> int\n"
   56153             :     "\n"
   56154             :     "Deprecated. Alternate name for :py:meth:`SetColorTable`.\n"
   56155             :     "\n"
   56156             :     ""},
   56157             :    { "Band_SetColorTable", _wrap_Band_SetColorTable, METH_VARARGS, "\n"
   56158             :     "Band_SetColorTable(Band self, ColorTable arg) -> int\n"
   56159             :     "\n"
   56160             :     "\n"
   56161             :     "Set the raster color table.\n"
   56162             :     "See :cpp:func:`GDALRasterBand::SetColorTable`.\n"
   56163             :     "\n"
   56164             :     "Parameters\n"
   56165             :     "----------\n"
   56166             :     "arg : ColorTable\n"
   56167             :     "\n"
   56168             :     "Returns\n"
   56169             :     "-------\n"
   56170             :     "int:\n"
   56171             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   56172             :     "\n"
   56173             :     ""},
   56174             :    { "Band_GetDefaultRAT", _wrap_Band_GetDefaultRAT, METH_O, "Band_GetDefaultRAT(Band self) -> RasterAttributeTable"},
   56175             :    { "Band_SetDefaultRAT", _wrap_Band_SetDefaultRAT, METH_VARARGS, "Band_SetDefaultRAT(Band self, RasterAttributeTable table) -> int"},
   56176             :    { "Band_GetMaskBand", _wrap_Band_GetMaskBand, METH_O, "\n"
   56177             :     "Band_GetMaskBand(Band self) -> Band\n"
   56178             :     "\n"
   56179             :     "\n"
   56180             :     "Return the mask band associated with this band.\n"
   56181             :     "See :cpp:func:`GDALRasterBand::GetMaskBand`.\n"
   56182             :     "\n"
   56183             :     "Returns\n"
   56184             :     "-------\n"
   56185             :     "Band\n"
   56186             :     "\n"
   56187             :     "\n"
   56188             :     ""},
   56189             :    { "Band_GetMaskFlags", _wrap_Band_GetMaskFlags, METH_O, "\n"
   56190             :     "Band_GetMaskFlags(Band self) -> int\n"
   56191             :     "\n"
   56192             :     "\n"
   56193             :     "Return the status flags of the mask band.\n"
   56194             :     "See :cpp:func:`GDALRasterBand::GetMaskFlags`.\n"
   56195             :     "\n"
   56196             :     "Returns\n"
   56197             :     "-------\n"
   56198             :     "int\n"
   56199             :     "\n"
   56200             :     "Examples\n"
   56201             :     "--------\n"
   56202             :     ">>> import numpy as np\n"
   56203             :     ">>> ds = gdal.GetDriverByName('MEM').Create('', 10, 10)\n"
   56204             :     ">>> band = ds.GetRasterBand(1)\n"
   56205             :     ">>> band.GetMaskFlags() == gdal.GMF_ALL_VALID\n"
   56206             :     "True\n"
   56207             :     ">>> band.SetNoDataValue(22)\n"
   56208             :     "0\n"
   56209             :     ">>> band.WriteArray(np.array([[22]]))\n"
   56210             :     "0\n"
   56211             :     ">>> band.GetMaskBand().ReadAsArray(win_xsize=2,win_ysize=2)\n"
   56212             :     "array([[  0, 255],\n"
   56213             :     "       [255, 255]], dtype=uint8)\n"
   56214             :     ">>> band.GetMaskFlags() == gdal.GMF_NODATA\n"
   56215             :     "True\n"
   56216             :     "\n"
   56217             :     "\n"
   56218             :     ""},
   56219             :    { "Band_CreateMaskBand", _wrap_Band_CreateMaskBand, METH_VARARGS, "\n"
   56220             :     "Band_CreateMaskBand(Band self, int nFlags) -> CPLErr\n"
   56221             :     "\n"
   56222             :     "\n"
   56223             :     "Add a mask band to the current band.\n"
   56224             :     "See :cpp:func:`GDALRasterBand::CreateMaskBand`.\n"
   56225             :     "\n"
   56226             :     "Parameters\n"
   56227             :     "----------\n"
   56228             :     "nFlags : int\n"
   56229             :     "\n"
   56230             :     "Returns\n"
   56231             :     "-------\n"
   56232             :     "int:\n"
   56233             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   56234             :     "\n"
   56235             :     "\n"
   56236             :     ""},
   56237             :    { "Band_IsMaskBand", _wrap_Band_IsMaskBand, METH_O, "\n"
   56238             :     "Band_IsMaskBand(Band self) -> bool\n"
   56239             :     "\n"
   56240             :     "\n"
   56241             :     "Returns whether the band is a mask band.\n"
   56242             :     "See :cpp:func:`GDALRasterBand::IsMaskBand`.\n"
   56243             :     "\n"
   56244             :     "Returns\n"
   56245             :     "-------\n"
   56246             :     "bool\n"
   56247             :     "\n"
   56248             :     ""},
   56249             :    { "Band_GetHistogram", (PyCFunction)(void(*)(void))_wrap_Band_GetHistogram, METH_VARARGS|METH_KEYWORDS, "\n"
   56250             :     "Band_GetHistogram(Band self, double min=-0.5, double max=255.5, int buckets=256, int include_out_of_range=0, int approx_ok=1, GDALProgressFunc callback=0, void * callback_data=None) -> CPLErr\n"
   56251             :     "\n"
   56252             :     "\n"
   56253             :     "Compute raster histogram.\n"
   56254             :     "See :cpp:func:`GDALRasterBand::GetHistogram`.\n"
   56255             :     "\n"
   56256             :     "Parameters\n"
   56257             :     "----------\n"
   56258             :     "min : float, default=-0.05\n"
   56259             :     "    the lower bound of the histogram\n"
   56260             :     "max : float, default=255.5\n"
   56261             :     "    the upper bound of the histogram\n"
   56262             :     "buckets : int, default=256\n"
   56263             :     "    the number of buckets int he histogram\n"
   56264             :     "include_out_of_range : bool, default=False\n"
   56265             :     "    if ``True``, add out-of-range values into the first and last buckets\n"
   56266             :     "approx_ok : bool, default=True\n"
   56267             :     "    if ``True``, compute an approximate histogram by using subsampling or overviews\n"
   56268             :     "callback : function, optional\n"
   56269             :     "             A progress callback function\n"
   56270             :     "callback_data: optional\n"
   56271             :     "             Optional data to be passed to callback function\n"
   56272             :     "\n"
   56273             :     "Returns\n"
   56274             :     "-------\n"
   56275             :     "list\n"
   56276             :     "    list with length equal to ``buckets``. If ``approx_ok`` is ``False``, each\n"
   56277             :     "    the value of each list item will equal the number of pixels in that bucket.\n"
   56278             :     "\n"
   56279             :     "Examples\n"
   56280             :     "--------\n"
   56281             :     ">>> import numpy as np\n"
   56282             :     ">>> ds = gdal.GetDriverByName('MEM').Create('', 10, 10, eType=gdal.GDT_Float32)\n"
   56283             :     ">>> ds.WriteArray(np.random.normal(size=100).reshape(10, 10))\n"
   56284             :     "0\n"
   56285             :     ">>> ds.GetRasterBand(1).GetHistogram(min=-3.5, max=3.5, buckets=13, approx_ok=False)\n"
   56286             :     "[0, 0, 3, 9, 13, 12, 25, 22, 9, 6, 0, 1, 0]  # random\n"
   56287             :     "\n"
   56288             :     ""},
   56289             :    { "Band_GetDefaultHistogram", (PyCFunction)(void(*)(void))_wrap_Band_GetDefaultHistogram, METH_VARARGS|METH_KEYWORDS, "\n"
   56290             :     "Band_GetDefaultHistogram(Band self, double * min_ret=None, double * max_ret=None, int * buckets_ret=None, GUIntBig ** ppanHistogram=None, int force=1, GDALProgressFunc callback=0, void * callback_data=None) -> CPLErr\n"
   56291             :     "\n"
   56292             :     "\n"
   56293             :     "Fetch the default histogram for this band.\n"
   56294             :     "See :cpp:func:`GDALRasterBand::GetDefaultHistogram`.\n"
   56295             :     "\n"
   56296             :     "Returns\n"
   56297             :     "-------\n"
   56298             :     "list\n"
   56299             :     "    List with the following four elements:\n"
   56300             :     "    - lower bound of histogram\n"
   56301             :     "    - upper bound of histogram\n"
   56302             :     "    - number of buckets in histogram\n"
   56303             :     "    - tuple with counts for each bucket\n"
   56304             :     "\n"
   56305             :     ""},
   56306             :    { "Band_SetDefaultHistogram", _wrap_Band_SetDefaultHistogram, METH_VARARGS, "\n"
   56307             :     "Band_SetDefaultHistogram(Band self, double min, double max, int buckets_in) -> CPLErr\n"
   56308             :     "\n"
   56309             :     "\n"
   56310             :     "Set default histogram.\n"
   56311             :     "See :cpp:func:`GDALRasterBand::SetDefaultHistogram`.\n"
   56312             :     "\n"
   56313             :     "Parameters\n"
   56314             :     "----------\n"
   56315             :     "min : float\n"
   56316             :     "    minimum value\n"
   56317             :     "max : float\n"
   56318             :     "    maximum value\n"
   56319             :     "buckets_in : list\n"
   56320             :     "    list of pixel counts for each bucket\n"
   56321             :     "\n"
   56322             :     "Returns\n"
   56323             :     "-------\n"
   56324             :     "int:\n"
   56325             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   56326             :     "\n"
   56327             :     "See Also\n"
   56328             :     "--------\n"
   56329             :     ":py:meth:`SetHistogram`\n"
   56330             :     "\n"
   56331             :     ""},
   56332             :    { "Band_HasArbitraryOverviews", _wrap_Band_HasArbitraryOverviews, METH_O, "\n"
   56333             :     "Band_HasArbitraryOverviews(Band self) -> bool\n"
   56334             :     "\n"
   56335             :     "\n"
   56336             :     "Check for arbitrary overviews.\n"
   56337             :     "See :cpp:func:`GDALRasterBand::HasArbitraryOverviews`.\n"
   56338             :     "\n"
   56339             :     "Returns\n"
   56340             :     "-------\n"
   56341             :     "bool\n"
   56342             :     "\n"
   56343             :     ""},
   56344             :    { "Band_GetCategoryNames", _wrap_Band_GetCategoryNames, METH_O, "\n"
   56345             :     "Band_GetCategoryNames(Band self) -> char **\n"
   56346             :     "\n"
   56347             :     "\n"
   56348             :     "Fetch the list of category names for this raster.\n"
   56349             :     "See :cpp:func:`GDALRasterBand::GetCategoryNames`.\n"
   56350             :     "\n"
   56351             :     "Returns\n"
   56352             :     "-------\n"
   56353             :     "list\n"
   56354             :     "    A list of category names, or ``None``\n"
   56355             :     "\n"
   56356             :     ""},
   56357             :    { "Band_SetCategoryNames", _wrap_Band_SetCategoryNames, METH_VARARGS, "\n"
   56358             :     "Band_SetCategoryNames(Band self, char ** papszCategoryNames) -> CPLErr\n"
   56359             :     "\n"
   56360             :     "\n"
   56361             :     "Set the category names for this band.\n"
   56362             :     "See :cpp:func:`GDALRasterBand::SetCategoryNames`.\n"
   56363             :     "\n"
   56364             :     "Parameters\n"
   56365             :     "----------\n"
   56366             :     "papszCategoryNames : list\n"
   56367             :     "\n"
   56368             :     "Returns\n"
   56369             :     "-------\n"
   56370             :     "int:\n"
   56371             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   56372             :     "\n"
   56373             :     ""},
   56374             :    { "Band_GetVirtualMem", (PyCFunction)(void(*)(void))_wrap_Band_GetVirtualMem, METH_VARARGS|METH_KEYWORDS, "Band_GetVirtualMem(Band self, GDALRWFlag eRWFlag, int nXOff, int nYOff, int nXSize, int nYSize, int nBufXSize, int nBufYSize, GDALDataType eBufType, size_t nCacheSize, size_t nPageSizeHint, char ** options=None) -> VirtualMem"},
   56375             :    { "Band_GetVirtualMemAuto", (PyCFunction)(void(*)(void))_wrap_Band_GetVirtualMemAuto, METH_VARARGS|METH_KEYWORDS, "Band_GetVirtualMemAuto(Band self, GDALRWFlag eRWFlag, char ** options=None) -> VirtualMem"},
   56376             :    { "Band_GetTiledVirtualMem", (PyCFunction)(void(*)(void))_wrap_Band_GetTiledVirtualMem, METH_VARARGS|METH_KEYWORDS, "Band_GetTiledVirtualMem(Band self, GDALRWFlag eRWFlag, int nXOff, int nYOff, int nXSize, int nYSize, int nTileXSize, int nTileYSize, GDALDataType eBufType, size_t nCacheSize, char ** options=None) -> VirtualMem"},
   56377             :    { "Band_GetDataCoverageStatus", _wrap_Band_GetDataCoverageStatus, METH_VARARGS, "\n"
   56378             :     "Band_GetDataCoverageStatus(Band self, int nXOff, int nYOff, int nXSize, int nYSize, int nMaskFlagStop=0) -> int\n"
   56379             :     "\n"
   56380             :     "\n"
   56381             :     "Determine whether a sub-window of the Band contains only data, only empty blocks, or a mix of both.\n"
   56382             :     "See :cpp:func:`GDALRasterBand::GetDataCoverageStatus`.\n"
   56383             :     "\n"
   56384             :     "Parameters\n"
   56385             :     "----------\n"
   56386             :     "nXOff : int\n"
   56387             :     "nYOff : int\n"
   56388             :     "nXSize : int\n"
   56389             :     "nYSize : int\n"
   56390             :     "nMaskFlagStop : int, default=0\n"
   56391             :     "\n"
   56392             :     "Returns\n"
   56393             :     "-------\n"
   56394             :     "list\n"
   56395             :     "    First value represents a bitwise-or value of the following constants\n"
   56396             :     "    - :py:const:`gdalconst.GDAL_DATA_COVERAGE_STATUS_DATA`\n"
   56397             :     "    - :py:const:`gdalconst.GDAL_DATA_COVERAGE_STATUS_EMPTY`\n"
   56398             :     "    - :py:const:`gdalconst.GDAL_DATA_COVERAGE_STATUS_UNIMPLEMENTED`\n"
   56399             :     "    Second value represents the approximate percentage in [0, 100] of pixels in the window that have valid values\n"
   56400             :     "\n"
   56401             :     "Examples\n"
   56402             :     "--------\n"
   56403             :     ">>> import numpy as np\n"
   56404             :     ">>> # Create a raster with four blocks\n"
   56405             :     ">>> ds = gdal.GetDriverByName('GTiff').Create('test.tif', 64, 64, options = {'SPARSE_OK':True, 'TILED':True, 'BLOCKXSIZE':32, 'BLOCKYSIZE':32})\n"
   56406             :     ">>> band = ds.GetRasterBand(1)\n"
   56407             :     ">>> # Write some data to upper-left block\n"
   56408             :     ">>> band.WriteArray(np.array([[1, 2], [3, 4]]))\n"
   56409             :     "0\n"
   56410             :     ">>> # Check status of upper-left block\n"
   56411             :     ">>> flags, pct = band.GetDataCoverageStatus(0, 0, 32, 32)\n"
   56412             :     ">>> flags == gdal.GDAL_DATA_COVERAGE_STATUS_DATA\n"
   56413             :     "True\n"
   56414             :     ">>> pct\n"
   56415             :     "100.0\n"
   56416             :     ">>> # Check status of upper-right block\n"
   56417             :     ">>> flags, pct = band.GetDataCoverageStatus(32, 0, 32, 32)\n"
   56418             :     ">>> flags == gdal.GDAL_DATA_COVERAGE_STATUS_EMPTY\n"
   56419             :     "True\n"
   56420             :     ">>> pct\n"
   56421             :     "0.0\n"
   56422             :     ">>> # Check status of window touching all four blocks\n"
   56423             :     ">>> flags, pct = band.GetDataCoverageStatus(16, 16, 32, 32)\n"
   56424             :     ">>> flags == gdal.GDAL_DATA_COVERAGE_STATUS_DATA | gdal.GDAL_DATA_COVERAGE_STATUS_EMPTY\n"
   56425             :     "True\n"
   56426             :     ">>> pct\n"
   56427             :     "25.0\n"
   56428             :     "\n"
   56429             :     ""},
   56430             :    { "Band_AdviseRead", _wrap_Band_AdviseRead, METH_VARARGS, "Band_AdviseRead(Band self, int xoff, int yoff, int xsize, int ysize, int * buf_xsize=None, int * buf_ysize=None, GDALDataType * buf_type=None, char ** options=None) -> CPLErr"},
   56431             :    { "Band_AsMDArray", _wrap_Band_AsMDArray, METH_O, "Band_AsMDArray(Band self) -> MDArray"},
   56432             :    { "Band__EnablePixelTypeSignedByteWarning", _wrap_Band__EnablePixelTypeSignedByteWarning, METH_VARARGS, "Band__EnablePixelTypeSignedByteWarning(Band self, bool b)"},
   56433             :    { "Band_ReadRaster1", (PyCFunction)(void(*)(void))_wrap_Band_ReadRaster1, METH_VARARGS|METH_KEYWORDS, "Band_ReadRaster1(Band self, double xoff, double yoff, double xsize, double ysize, int * buf_xsize=None, int * buf_ysize=None, GDALDataType * buf_type=None, GIntBig * buf_pixel_space=None, GIntBig * buf_line_space=None, GDALRIOResampleAlg resample_alg=GRIORA_NearestNeighbour, GDALProgressFunc callback=0, void * callback_data=None, void * inputOutputBuf=None) -> CPLErr"},
   56434             :    { "Band_ReadBlock", (PyCFunction)(void(*)(void))_wrap_Band_ReadBlock, METH_VARARGS|METH_KEYWORDS, "Band_ReadBlock(Band self, int xoff, int yoff, void * buf_obj=None) -> CPLErr"},
   56435             :    { "Band_swigregister", Band_swigregister, METH_O, NULL},
   56436             :    { "new_ColorTable", (PyCFunction)(void(*)(void))_wrap_new_ColorTable, METH_VARARGS|METH_KEYWORDS, "new_ColorTable(GDALPaletteInterp palette=GPI_RGB) -> ColorTable"},
   56437             :    { "delete_ColorTable", _wrap_delete_ColorTable, METH_O, "delete_ColorTable(ColorTable self)"},
   56438             :    { "ColorTable_Clone", _wrap_ColorTable_Clone, METH_O, "ColorTable_Clone(ColorTable self) -> ColorTable"},
   56439             :    { "ColorTable_GetPaletteInterpretation", _wrap_ColorTable_GetPaletteInterpretation, METH_O, "ColorTable_GetPaletteInterpretation(ColorTable self) -> GDALPaletteInterp"},
   56440             :    { "ColorTable_GetCount", _wrap_ColorTable_GetCount, METH_O, "ColorTable_GetCount(ColorTable self) -> int"},
   56441             :    { "ColorTable_GetColorEntry", _wrap_ColorTable_GetColorEntry, METH_VARARGS, "ColorTable_GetColorEntry(ColorTable self, int entry) -> ColorEntry"},
   56442             :    { "ColorTable_GetColorEntryAsRGB", _wrap_ColorTable_GetColorEntryAsRGB, METH_VARARGS, "ColorTable_GetColorEntryAsRGB(ColorTable self, int entry, ColorEntry centry) -> int"},
   56443             :    { "ColorTable_SetColorEntry", _wrap_ColorTable_SetColorEntry, METH_VARARGS, "ColorTable_SetColorEntry(ColorTable self, int entry, ColorEntry centry)"},
   56444             :    { "ColorTable_CreateColorRamp", _wrap_ColorTable_CreateColorRamp, METH_VARARGS, "ColorTable_CreateColorRamp(ColorTable self, int nStartIndex, ColorEntry startcolor, int nEndIndex, ColorEntry endcolor)"},
   56445             :    { "ColorTable_swigregister", ColorTable_swigregister, METH_O, NULL},
   56446             :    { "ColorTable_swiginit", ColorTable_swiginit, METH_VARARGS, NULL},
   56447             :    { "delete_SubdatasetInfo", _wrap_delete_SubdatasetInfo, METH_O, "delete_SubdatasetInfo(SubdatasetInfo self)"},
   56448             :    { "SubdatasetInfo_GetPathComponent", _wrap_SubdatasetInfo_GetPathComponent, METH_O, "SubdatasetInfo_GetPathComponent(SubdatasetInfo self) -> retStringAndCPLFree *"},
   56449             :    { "SubdatasetInfo_GetSubdatasetComponent", _wrap_SubdatasetInfo_GetSubdatasetComponent, METH_O, "SubdatasetInfo_GetSubdatasetComponent(SubdatasetInfo self) -> retStringAndCPLFree *"},
   56450             :    { "SubdatasetInfo_ModifyPathComponent", _wrap_SubdatasetInfo_ModifyPathComponent, METH_VARARGS, "SubdatasetInfo_ModifyPathComponent(SubdatasetInfo self, char const * pszNewFileName) -> retStringAndCPLFree *"},
   56451             :    { "SubdatasetInfo_swigregister", SubdatasetInfo_swigregister, METH_O, NULL},
   56452             :    { "GetSubdatasetInfo", _wrap_GetSubdatasetInfo, METH_O, "GetSubdatasetInfo(char const * pszFileName) -> GDALSubdatasetInfoShadow *"},
   56453             :    { "new_Relationship", _wrap_new_Relationship, METH_VARARGS, "new_Relationship(char const * name, char const * leftTableName, char const * rightTableName, GDALRelationshipCardinality cardinality) -> Relationship"},
   56454             :    { "delete_Relationship", _wrap_delete_Relationship, METH_O, "delete_Relationship(Relationship self)"},
   56455             :    { "Relationship_GetName", _wrap_Relationship_GetName, METH_O, "Relationship_GetName(Relationship self) -> char const *"},
   56456             :    { "Relationship_GetCardinality", _wrap_Relationship_GetCardinality, METH_O, "Relationship_GetCardinality(Relationship self) -> GDALRelationshipCardinality"},
   56457             :    { "Relationship_GetLeftTableName", _wrap_Relationship_GetLeftTableName, METH_O, "Relationship_GetLeftTableName(Relationship self) -> char const *"},
   56458             :    { "Relationship_GetRightTableName", _wrap_Relationship_GetRightTableName, METH_O, "Relationship_GetRightTableName(Relationship self) -> char const *"},
   56459             :    { "Relationship_GetMappingTableName", _wrap_Relationship_GetMappingTableName, METH_O, "Relationship_GetMappingTableName(Relationship self) -> char const *"},
   56460             :    { "Relationship_SetMappingTableName", _wrap_Relationship_SetMappingTableName, METH_VARARGS, "Relationship_SetMappingTableName(Relationship self, char const * pszName)"},
   56461             :    { "Relationship_GetLeftTableFields", _wrap_Relationship_GetLeftTableFields, METH_O, "Relationship_GetLeftTableFields(Relationship self) -> char **"},
   56462             :    { "Relationship_GetRightTableFields", _wrap_Relationship_GetRightTableFields, METH_O, "Relationship_GetRightTableFields(Relationship self) -> char **"},
   56463             :    { "Relationship_SetLeftTableFields", _wrap_Relationship_SetLeftTableFields, METH_VARARGS, "Relationship_SetLeftTableFields(Relationship self, char ** pFields)"},
   56464             :    { "Relationship_SetRightTableFields", _wrap_Relationship_SetRightTableFields, METH_VARARGS, "Relationship_SetRightTableFields(Relationship self, char ** pFields)"},
   56465             :    { "Relationship_GetLeftMappingTableFields", _wrap_Relationship_GetLeftMappingTableFields, METH_O, "Relationship_GetLeftMappingTableFields(Relationship self) -> char **"},
   56466             :    { "Relationship_GetRightMappingTableFields", _wrap_Relationship_GetRightMappingTableFields, METH_O, "Relationship_GetRightMappingTableFields(Relationship self) -> char **"},
   56467             :    { "Relationship_SetLeftMappingTableFields", _wrap_Relationship_SetLeftMappingTableFields, METH_VARARGS, "Relationship_SetLeftMappingTableFields(Relationship self, char ** pFields)"},
   56468             :    { "Relationship_SetRightMappingTableFields", _wrap_Relationship_SetRightMappingTableFields, METH_VARARGS, "Relationship_SetRightMappingTableFields(Relationship self, char ** pFields)"},
   56469             :    { "Relationship_GetType", _wrap_Relationship_GetType, METH_O, "Relationship_GetType(Relationship self) -> GDALRelationshipType"},
   56470             :    { "Relationship_SetType", _wrap_Relationship_SetType, METH_VARARGS, "Relationship_SetType(Relationship self, GDALRelationshipType type)"},
   56471             :    { "Relationship_GetForwardPathLabel", _wrap_Relationship_GetForwardPathLabel, METH_O, "Relationship_GetForwardPathLabel(Relationship self) -> char const *"},
   56472             :    { "Relationship_SetForwardPathLabel", _wrap_Relationship_SetForwardPathLabel, METH_VARARGS, "Relationship_SetForwardPathLabel(Relationship self, char const * pszLabel)"},
   56473             :    { "Relationship_GetBackwardPathLabel", _wrap_Relationship_GetBackwardPathLabel, METH_O, "Relationship_GetBackwardPathLabel(Relationship self) -> char const *"},
   56474             :    { "Relationship_SetBackwardPathLabel", _wrap_Relationship_SetBackwardPathLabel, METH_VARARGS, "Relationship_SetBackwardPathLabel(Relationship self, char const * pszLabel)"},
   56475             :    { "Relationship_GetRelatedTableType", _wrap_Relationship_GetRelatedTableType, METH_O, "Relationship_GetRelatedTableType(Relationship self) -> char const *"},
   56476             :    { "Relationship_SetRelatedTableType", _wrap_Relationship_SetRelatedTableType, METH_VARARGS, "Relationship_SetRelatedTableType(Relationship self, char const * pszType)"},
   56477             :    { "Relationship_swigregister", Relationship_swigregister, METH_O, NULL},
   56478             :    { "Relationship_swiginit", Relationship_swiginit, METH_VARARGS, NULL},
   56479             :    { "TermProgress_nocb", (PyCFunction)(void(*)(void))_wrap_TermProgress_nocb, METH_VARARGS|METH_KEYWORDS, "TermProgress_nocb(double dfProgress, char const * pszMessage=None, void * pData=None) -> int"},
   56480             :    { "ComputeMedianCutPCT", (PyCFunction)(void(*)(void))_wrap_ComputeMedianCutPCT, METH_VARARGS|METH_KEYWORDS, "ComputeMedianCutPCT(Band red, Band green, Band blue, int num_colors, ColorTable colors, GDALProgressFunc callback=0, void * callback_data=None) -> int"},
   56481             :    { "DitherRGB2PCT", (PyCFunction)(void(*)(void))_wrap_DitherRGB2PCT, METH_VARARGS|METH_KEYWORDS, "DitherRGB2PCT(Band red, Band green, Band blue, Band target, ColorTable colors, GDALProgressFunc callback=0, void * callback_data=None) -> int"},
   56482             :    { "ReprojectImage", (PyCFunction)(void(*)(void))_wrap_ReprojectImage, METH_VARARGS|METH_KEYWORDS, "ReprojectImage(Dataset src_ds, Dataset dst_ds, char const * src_wkt=None, char const * dst_wkt=None, GDALResampleAlg eResampleAlg=GRA_NearestNeighbour, double WarpMemoryLimit=0.0, double maxerror=0.0, GDALProgressFunc callback=0, void * callback_data=None, char ** options=None) -> CPLErr"},
   56483             :    { "ComputeProximity", (PyCFunction)(void(*)(void))_wrap_ComputeProximity, METH_VARARGS|METH_KEYWORDS, "ComputeProximity(Band srcBand, Band proximityBand, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> int"},
   56484             :    { "RasterizeLayer", (PyCFunction)(void(*)(void))_wrap_RasterizeLayer, METH_VARARGS|METH_KEYWORDS, "RasterizeLayer(Dataset dataset, int bands, Layer layer, void * pfnTransformer=None, void * pTransformArg=None, int burn_values=0, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> int"},
   56485             :    { "Polygonize", (PyCFunction)(void(*)(void))_wrap_Polygonize, METH_VARARGS|METH_KEYWORDS, "Polygonize(Band srcBand, Band maskBand, Layer outLayer, int iPixValField, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> int"},
   56486             :    { "FPolygonize", (PyCFunction)(void(*)(void))_wrap_FPolygonize, METH_VARARGS|METH_KEYWORDS, "FPolygonize(Band srcBand, Band maskBand, Layer outLayer, int iPixValField, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> int"},
   56487             :    { "FillNodata", (PyCFunction)(void(*)(void))_wrap_FillNodata, METH_VARARGS|METH_KEYWORDS, "\n"
   56488             :     "FillNodata(Band targetBand, Band maskBand, double maxSearchDist, int smoothingIterations, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> int\n"
   56489             :     "\n"
   56490             :     "\n"
   56491             :     "Fill selected raster regions by interpolation from the edges.\n"
   56492             :     "\n"
   56493             :     "This algorithm will interpolate values for all designated\n"
   56494             :     "nodata pixels (marked by zeros in ``maskBand``). For each pixel\n"
   56495             :     "a four direction conic search is done to find values to interpolate\n"
   56496             :     "from (using inverse distance weighting by default). Once all values are\n"
   56497             :     "interpolated, zero or more smoothing iterations (3x3 average\n"
   56498             :     "filters on interpolated pixels) are applied to smooth out\n"
   56499             :     "artifacts.\n"
   56500             :     "\n"
   56501             :     "This algorithm is generally suitable for interpolating missing\n"
   56502             :     "regions of fairly continuously varying rasters (such as elevation\n"
   56503             :     "models for instance). It is also suitable for filling small holes\n"
   56504             :     "and cracks in more irregularly varying images (like airphotos). It\n"
   56505             :     "is generally not so great for interpolating a raster from sparse\n"
   56506             :     "point data. See :py:func:`Grid` for that case.\n"
   56507             :     "\n"
   56508             :     "See :cpp:func:`GDALFillNodata`.\n"
   56509             :     "\n"
   56510             :     "Parameters\n"
   56511             :     "----------\n"
   56512             :     "targetBand : Band\n"
   56513             :     "    Band containing values to fill. Will be modified in-place.\n"
   56514             :     "maskBand : Band\n"
   56515             :     "    Mask band with a value of 0 indicating values that should be filled.\n"
   56516             :     "    If not specified, the mask band associated with ``targetBand`` will be used.\n"
   56517             :     "maxSearchDist : float\n"
   56518             :     "    the maximum number of pixels to search in all directions to find values to interpolate from.\n"
   56519             :     "smoothingIterations : int\n"
   56520             :     "    the number of 3x3 smoothing filter passes to run (0 or more)\n"
   56521             :     "options : dict/list, optional\n"
   56522             :     "    A dict or list of name=value options. Available options are\n"
   56523             :     "    described in :cpp:func:`GDALFillNodata`.\n"
   56524             :     "callback : function, optional\n"
   56525             :     "   A progress callback function\n"
   56526             :     "callback_data: optional\n"
   56527             :     "   Optional data to be passed to callback function\n"
   56528             :     "\n"
   56529             :     "Returns\n"
   56530             :     "-------\n"
   56531             :     "int\n"
   56532             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   56533             :     "\n"
   56534             :     "Examples\n"
   56535             :     "--------\n"
   56536             :     ">>> import numpy as np\n"
   56537             :     ">>> data = np.array([[1, 2], [9, 9], [9, 9], [3, 4]], dtype=np.float32)\n"
   56538             :     ">>> ds = gdal.GetDriverByName('MEM').Create('', 2, 4, eType=gdal.GDT_Float32)\n"
   56539             :     ">>> ds.WriteArray(data)\n"
   56540             :     "0\n"
   56541             :     ">>> mask = data != 9  # replace pixels with value = 9\n"
   56542             :     ">>> mask_ds = gdal.GetDriverByName('MEM').Create('', 2, 4, eType=gdal.GDT_Byte)\n"
   56543             :     ">>> mask_ds.WriteArray(mask)\n"
   56544             :     "0\n"
   56545             :     ">>> gdal.FillNodata(ds.GetRasterBand(1), mask_ds.GetRasterBand(1), 5, 0)\n"
   56546             :     "0\n"
   56547             :     ">>> ds.ReadAsArray()\n"
   56548             :     "array([[1.       , 2.       ],\n"
   56549             :     "       [2.1485982, 2.6666667],\n"
   56550             :     "       [2.721169 , 3.3333333],\n"
   56551             :     "       [3.       , 4.       ]], dtype=float32)\n"
   56552             :     ">>> gdal.FillNodata(ds.GetRasterBand(1), mask_ds.GetRasterBand(1), 5, 0, {'INTERPOLATION':'NEAREST'})\n"
   56553             :     "0\n"
   56554             :     ">>> ds.ReadAsArray()\n"
   56555             :     "array([[1., 2.],\n"
   56556             :     "       [1., 2.],\n"
   56557             :     "       [3., 4.],\n"
   56558             :     "       [3., 4.]], dtype=float32)\n"
   56559             :     "\n"
   56560             :     "\n"
   56561             :     ""},
   56562             :    { "SieveFilter", (PyCFunction)(void(*)(void))_wrap_SieveFilter, METH_VARARGS|METH_KEYWORDS, "SieveFilter(Band srcBand, Band maskBand, Band dstBand, int threshold, int connectedness=4, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> int"},
   56563             :    { "RegenerateOverviews", (PyCFunction)(void(*)(void))_wrap_RegenerateOverviews, METH_VARARGS|METH_KEYWORDS, "RegenerateOverviews(Band srcBand, int overviewBandCount, char const * resampling=\"average\", GDALProgressFunc callback=0, void * callback_data=None) -> int"},
   56564             :    { "RegenerateOverview", (PyCFunction)(void(*)(void))_wrap_RegenerateOverview, METH_VARARGS|METH_KEYWORDS, "RegenerateOverview(Band srcBand, Band overviewBand, char const * resampling=\"average\", GDALProgressFunc callback=0, void * callback_data=None) -> int"},
   56565             :    { "ContourGenerate", (PyCFunction)(void(*)(void))_wrap_ContourGenerate, METH_VARARGS|METH_KEYWORDS, "ContourGenerate(Band srcBand, double contourInterval, double contourBase, int fixedLevelCount, int useNoData, double noDataValue, Layer dstLayer, int idField, int elevField, GDALProgressFunc callback=0, void * callback_data=None) -> int"},
   56566             :    { "ContourGenerateEx", (PyCFunction)(void(*)(void))_wrap_ContourGenerateEx, METH_VARARGS|METH_KEYWORDS, "ContourGenerateEx(Band srcBand, Layer dstLayer, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> int"},
   56567             :    { "ViewshedGenerate", (PyCFunction)(void(*)(void))_wrap_ViewshedGenerate, METH_VARARGS|METH_KEYWORDS, "ViewshedGenerate(Band srcBand, char const * driverName, char const * targetRasterName, char ** creationOptions, double observerX, double observerY, double observerHeight, double targetHeight, double visibleVal, double invisibleVal, double outOfRangeVal, double noDataVal, double dfCurvCoeff, GDALViewshedMode mode, double maxDistance, GDALProgressFunc callback=0, void * callback_data=None, GDALViewshedOutputType heightMode=GVOT_NORMAL, char ** options=None) -> Dataset"},
   56568             :    { "IsLineOfSightVisible", (PyCFunction)(void(*)(void))_wrap_IsLineOfSightVisible, METH_VARARGS|METH_KEYWORDS, "\n"
   56569             :     "IsLineOfSightVisible(Band band, int xA, int yA, double zA, int xB, int yB, double zB, char ** options=None)\n"
   56570             :     "\n"
   56571             :     "\n"
   56572             :     "Check Line of Sight between two points.\n"
   56573             :     "Both input coordinates must be within the raster coordinate bounds.\n"
   56574             :     "\n"
   56575             :     " See :cpp:func:`GDALIsLineOfSightVisible`.\n"
   56576             :     "\n"
   56577             :     ".. versionadded:: 3.9\n"
   56578             :     "\n"
   56579             :     "Parameters\n"
   56580             :     "----------\n"
   56581             :     "band : gdal.RasterBand\n"
   56582             :     "    The band to read the DEM data from. This must NOT be null.\n"
   56583             :     "xA : int\n"
   56584             :     "    The X location (raster column) of the first point to check on the raster.\n"
   56585             :     "yA : int\n"
   56586             :     "    The Y location (raster row) of the first point to check on the raster.\n"
   56587             :     "zA : float\n"
   56588             :     "    The Z location (height) of the first point to check.\n"
   56589             :     "xB : int\n"
   56590             :     "    The X location (raster column) of the second point to check on the raster.\n"
   56591             :     "yB : int\n"
   56592             :     "    The Y location (raster row) of the second point to check on the raster.\n"
   56593             :     "zB : float\n"
   56594             :     "    The Z location (height) of the second point to check.\n"
   56595             :     "options : dict/list, optional\n"
   56596             :     "    A dict or list of name=value of options for the line of sight algorithm (currently ignored).\n"
   56597             :     "\n"
   56598             :     "Returns\n"
   56599             :     "-------\n"
   56600             :     "collections.namedtuple(is_visible: bool, col_intersection: int, row_intersection: int)\n"
   56601             :     "    is_visible is True if the two points are within Line of Sight.\n"
   56602             :     "    col_intersection is the raster column index where the LOS line intersects with terrain (will be set in the future, currently set to -1).\n"
   56603             :     "    row_intersection is the raster row index where the LOS line intersects with terrain (will be set in the future, currently set to -1).\n"
   56604             :     "\n"
   56605             :     ""},
   56606             :    { "AutoCreateWarpedVRT", _wrap_AutoCreateWarpedVRT, METH_VARARGS, "AutoCreateWarpedVRT(Dataset src_ds, char const * src_wkt=None, char const * dst_wkt=None, GDALResampleAlg eResampleAlg=GRA_NearestNeighbour, double maxerror=0.0) -> Dataset"},
   56607             :    { "CreatePansharpenedVRT", _wrap_CreatePansharpenedVRT, METH_VARARGS, "CreatePansharpenedVRT(char const * pszXML, Band panchroBand, int nInputSpectralBands) -> Dataset"},
   56608             :    { "delete_GDALTransformerInfoShadow", _wrap_delete_GDALTransformerInfoShadow, METH_O, "delete_GDALTransformerInfoShadow(GDALTransformerInfoShadow self)"},
   56609             :    { "GDALTransformerInfoShadow_TransformPoint", _wrap_GDALTransformerInfoShadow_TransformPoint, METH_VARARGS, "\n"
   56610             :     "GDALTransformerInfoShadow_TransformPoint(GDALTransformerInfoShadow self, int bDstToSrc, double [3] inout) -> int\n"
   56611             :     "GDALTransformerInfoShadow_TransformPoint(GDALTransformerInfoShadow self, int bDstToSrc, double x, double y, double z=0.0) -> int\n"
   56612             :     ""},
   56613             :    { "GDALTransformerInfoShadow_TransformPoints", _wrap_GDALTransformerInfoShadow_TransformPoints, METH_VARARGS, "GDALTransformerInfoShadow_TransformPoints(GDALTransformerInfoShadow self, int bDstToSrc, int nCount) -> int"},
   56614             :    { "GDALTransformerInfoShadow_TransformGeolocations", (PyCFunction)(void(*)(void))_wrap_GDALTransformerInfoShadow_TransformGeolocations, METH_VARARGS|METH_KEYWORDS, "GDALTransformerInfoShadow_TransformGeolocations(GDALTransformerInfoShadow self, Band xBand, Band yBand, Band zBand, GDALProgressFunc callback=0, void * callback_data=None, char ** options=None) -> int"},
   56615             :    { "GDALTransformerInfoShadow_swigregister", GDALTransformerInfoShadow_swigregister, METH_O, NULL},
   56616             :    { "Transformer", _wrap_Transformer, METH_VARARGS, "Transformer(Dataset src, Dataset dst, char ** options) -> GDALTransformerInfoShadow"},
   56617             :    { "SuggestedWarpOutputRes_width_get", _wrap_SuggestedWarpOutputRes_width_get, METH_O, "SuggestedWarpOutputRes_width_get(SuggestedWarpOutputRes self) -> int"},
   56618             :    { "SuggestedWarpOutputRes_height_get", _wrap_SuggestedWarpOutputRes_height_get, METH_O, "SuggestedWarpOutputRes_height_get(SuggestedWarpOutputRes self) -> int"},
   56619             :    { "SuggestedWarpOutputRes_xmin_get", _wrap_SuggestedWarpOutputRes_xmin_get, METH_O, "SuggestedWarpOutputRes_xmin_get(SuggestedWarpOutputRes self) -> double"},
   56620             :    { "SuggestedWarpOutputRes_ymin_get", _wrap_SuggestedWarpOutputRes_ymin_get, METH_O, "SuggestedWarpOutputRes_ymin_get(SuggestedWarpOutputRes self) -> double"},
   56621             :    { "SuggestedWarpOutputRes_xmax_get", _wrap_SuggestedWarpOutputRes_xmax_get, METH_O, "SuggestedWarpOutputRes_xmax_get(SuggestedWarpOutputRes self) -> double"},
   56622             :    { "SuggestedWarpOutputRes_ymax_get", _wrap_SuggestedWarpOutputRes_ymax_get, METH_O, "SuggestedWarpOutputRes_ymax_get(SuggestedWarpOutputRes self) -> double"},
   56623             :    { "delete_SuggestedWarpOutputRes", _wrap_delete_SuggestedWarpOutputRes, METH_O, "delete_SuggestedWarpOutputRes(SuggestedWarpOutputRes self)"},
   56624             :    { "SuggestedWarpOutputRes_GetGeotransform", _wrap_SuggestedWarpOutputRes_GetGeotransform, METH_O, "SuggestedWarpOutputRes_GetGeotransform(SuggestedWarpOutputRes self)"},
   56625             :    { "SuggestedWarpOutputRes_swigregister", SuggestedWarpOutputRes_swigregister, METH_O, NULL},
   56626             :    { "SuggestedWarpOutputFromTransformer", _wrap_SuggestedWarpOutputFromTransformer, METH_VARARGS, "SuggestedWarpOutputFromTransformer(Dataset src, GDALTransformerInfoShadow transformer) -> SuggestedWarpOutputRes"},
   56627             :    { "SuggestedWarpOutputFromOptions", _wrap_SuggestedWarpOutputFromOptions, METH_VARARGS, "SuggestedWarpOutputFromOptions(Dataset src, char ** options) -> SuggestedWarpOutputRes"},
   56628             :    { "_ApplyVerticalShiftGrid", (PyCFunction)(void(*)(void))_wrap__ApplyVerticalShiftGrid, METH_VARARGS|METH_KEYWORDS, "_ApplyVerticalShiftGrid(Dataset src_ds, Dataset grid_ds, bool inverse=False, double srcUnitToMeter=1.0, double dstUnitToMeter=1.0, char ** options=None) -> Dataset"},
   56629             :    { "ApplyGeoTransform", _wrap_ApplyGeoTransform, METH_VARARGS, "ApplyGeoTransform(double [6] padfGeoTransform, double dfPixel, double dfLine)"},
   56630             :    { "InvGeoTransform", _wrap_InvGeoTransform, METH_O, "InvGeoTransform(double [6] gt_in) -> RETURN_NONE"},
   56631             :    { "VersionInfo", _wrap_VersionInfo, METH_VARARGS, "VersionInfo(char const * request=\"VERSION_NUM\") -> char const *"},
   56632             :    { "AllRegister", _wrap_AllRegister, METH_NOARGS, "\n"
   56633             :     "AllRegister()\n"
   56634             :     "\n"
   56635             :     "\n"
   56636             :     "Register all known configured GDAL drivers.\n"
   56637             :     "Automatically called when the :py:mod:`gdal` module is loaded.\n"
   56638             :     "Does not need to be called in user code unless a driver was\n"
   56639             :     "deregistered and needs to be re-registered.\n"
   56640             :     "See :cpp:func:`GDALAllRegister`.\n"
   56641             :     "\n"
   56642             :     "See Also\n"
   56643             :     "--------\n"
   56644             :     ":py:func:`Driver.Register`\n"
   56645             :     "\n"
   56646             :     ""},
   56647             :    { "GDALDestroyDriverManager", _wrap_GDALDestroyDriverManager, METH_NOARGS, "GDALDestroyDriverManager()"},
   56648             :    { "GetCacheMax", _wrap_GetCacheMax, METH_NOARGS, "\n"
   56649             :     "GetCacheMax() -> GIntBig\n"
   56650             :     "\n"
   56651             :     "\n"
   56652             :     "Get the maximum size of the block cache.\n"
   56653             :     "See :cpp:func:`GDALGetCacheMax`.\n"
   56654             :     "\n"
   56655             :     "Returns\n"
   56656             :     "-------\n"
   56657             :     "int\n"
   56658             :     "    maximum cache size in bytes\n"
   56659             :     "\n"
   56660             :     ""},
   56661             :    { "GetCacheUsed", _wrap_GetCacheUsed, METH_NOARGS, "\n"
   56662             :     "GetCacheUsed() -> GIntBig\n"
   56663             :     "\n"
   56664             :     "\n"
   56665             :     "Get the number of bytes in used by the block cache.\n"
   56666             :     "See :cpp:func:`GDALGetCacheUsed`.\n"
   56667             :     "\n"
   56668             :     "Returns\n"
   56669             :     "-------\n"
   56670             :     "int\n"
   56671             :     "    cache size in bytes\n"
   56672             :     "\n"
   56673             :     ""},
   56674             :    { "SetCacheMax", _wrap_SetCacheMax, METH_O, "\n"
   56675             :     "SetCacheMax(GIntBig nBytes)\n"
   56676             :     "\n"
   56677             :     "\n"
   56678             :     "Set the maximum size of the block cache.\n"
   56679             :     "See :cpp:func:`GDALSetCacheMax`.\n"
   56680             :     "\n"
   56681             :     "Parameters\n"
   56682             :     "----------\n"
   56683             :     "nBytes: int\n"
   56684             :     "    Cache size in bytes\n"
   56685             :     "\n"
   56686             :     "See Also\n"
   56687             :     "--------\n"
   56688             :     ":config:`GDAL_CACHEMAX`\n"
   56689             :     "\n"
   56690             :     ""},
   56691             :    { "GetDataTypeSize", _wrap_GetDataTypeSize, METH_O, "\n"
   56692             :     "GetDataTypeSize(GDALDataType eDataType) -> int\n"
   56693             :     "\n"
   56694             :     "\n"
   56695             :     "Return the size of the data type in bits.\n"
   56696             :     "\n"
   56697             :     "Parameters\n"
   56698             :     "----------\n"
   56699             :     "eDataType : int\n"
   56700             :     "    data type code\n"
   56701             :     "\n"
   56702             :     "Returns\n"
   56703             :     "-------\n"
   56704             :     "int\n"
   56705             :     "\n"
   56706             :     "Examples\n"
   56707             :     "--------\n"
   56708             :     ">>> gdal.GetDataTypeSize(gdal.GDT_Byte)\n"
   56709             :     "8\n"
   56710             :     ">>> gdal.GetDataTypeSize(gdal.GDT_Int32)\n"
   56711             :     "32\n"
   56712             :     "\n"
   56713             :     ""},
   56714             :    { "DataTypeIsComplex", _wrap_DataTypeIsComplex, METH_O, "DataTypeIsComplex(GDALDataType eDataType) -> int"},
   56715             :    { "GetDataTypeName", _wrap_GetDataTypeName, METH_O, "\n"
   56716             :     "GetDataTypeName(GDALDataType eDataType) -> char const *\n"
   56717             :     "\n"
   56718             :     "\n"
   56719             :     "Return the name of the data type.\n"
   56720             :     "\n"
   56721             :     "Parameters\n"
   56722             :     "----------\n"
   56723             :     "eDataType : int\n"
   56724             :     "    data type code\n"
   56725             :     "\n"
   56726             :     "Returns\n"
   56727             :     "-------\n"
   56728             :     "str\n"
   56729             :     "\n"
   56730             :     "Examples\n"
   56731             :     "--------\n"
   56732             :     ">>> gdal.GetDataTypeName(gdal.GDT_Int16)\n"
   56733             :     "'Int16'\n"
   56734             :     ">>> gdal.GetDataTypeName(gdal.GDT_Float64)\n"
   56735             :     "'Float64'\n"
   56736             :     "\n"
   56737             :     ""},
   56738             :    { "GetDataTypeByName", _wrap_GetDataTypeByName, METH_O, "\n"
   56739             :     "GetDataTypeByName(char const * pszDataTypeName) -> GDALDataType\n"
   56740             :     "\n"
   56741             :     "\n"
   56742             :     "Return the data type for a given name.\n"
   56743             :     "\n"
   56744             :     "Parameters\n"
   56745             :     "----------\n"
   56746             :     "pszDataTypeName : str\n"
   56747             :     "    data type name\n"
   56748             :     "\n"
   56749             :     "Returns\n"
   56750             :     "-------\n"
   56751             :     "int\n"
   56752             :     "    data type code\n"
   56753             :     "\n"
   56754             :     "Examples\n"
   56755             :     "--------\n"
   56756             :     ">>> gdal.GetDataTypeByName('Int16') == gdal.GDT_Int16\n"
   56757             :     "True\n"
   56758             :     "\n"
   56759             :     "\n"
   56760             :     ""},
   56761             :    { "DataTypeUnion", _wrap_DataTypeUnion, METH_VARARGS, "DataTypeUnion(GDALDataType a, GDALDataType b) -> GDALDataType"},
   56762             :    { "GetColorInterpretationName", _wrap_GetColorInterpretationName, METH_O, "GetColorInterpretationName(GDALColorInterp eColorInterp) -> char const *"},
   56763             :    { "GetPaletteInterpretationName", _wrap_GetPaletteInterpretationName, METH_O, "GetPaletteInterpretationName(GDALPaletteInterp ePaletteInterp) -> char const *"},
   56764             :    { "DecToDMS", _wrap_DecToDMS, METH_VARARGS, "DecToDMS(double arg1, char const * arg2, int arg3=2) -> char const *"},
   56765             :    { "PackedDMSToDec", _wrap_PackedDMSToDec, METH_O, "PackedDMSToDec(double dfPacked) -> double"},
   56766             :    { "DecToPackedDMS", _wrap_DecToPackedDMS, METH_O, "DecToPackedDMS(double dfDec) -> double"},
   56767             :    { "ParseXMLString", _wrap_ParseXMLString, METH_O, "ParseXMLString(char * pszXMLString) -> CPLXMLNode *"},
   56768             :    { "SerializeXMLTree", _wrap_SerializeXMLTree, METH_O, "SerializeXMLTree(CPLXMLNode * xmlnode) -> retStringAndCPLFree *"},
   56769             :    { "GetJPEG2000Structure", _wrap_GetJPEG2000Structure, METH_VARARGS, "GetJPEG2000Structure(char const * pszFilename, char ** options=None) -> CPLXMLNode *"},
   56770             :    { "GetJPEG2000StructureAsString", _wrap_GetJPEG2000StructureAsString, METH_VARARGS, "GetJPEG2000StructureAsString(char const * pszFilename, char ** options=None) -> retStringAndCPLFree *"},
   56771             :    { "HasTriangulation", _wrap_HasTriangulation, METH_NOARGS, "HasTriangulation() -> int"},
   56772             :    { "GetDriverCount", _wrap_GetDriverCount, METH_NOARGS, "\n"
   56773             :     "GetDriverCount() -> int\n"
   56774             :     "\n"
   56775             :     "\n"
   56776             :     "Return the number of registered drivers.\n"
   56777             :     "See :cpp:func:`GDALGetDriverCount`.\n"
   56778             :     "\n"
   56779             :     "Examples\n"
   56780             :     "--------\n"
   56781             :     ">>> gdal.GetDriverCount()\n"
   56782             :     "227\n"
   56783             :     ">>> gdal.GetDriverByName('ESRI Shapefile').Deregister()\n"
   56784             :     ">>> gdal.GetDriverCount()\n"
   56785             :     "226\n"
   56786             :     "\n"
   56787             :     "\n"
   56788             :     ""},
   56789             :    { "GetDriverByName", _wrap_GetDriverByName, METH_O, "GetDriverByName(char const * name) -> Driver"},
   56790             :    { "GetDriver", _wrap_GetDriver, METH_O, "GetDriver(int i) -> Driver"},
   56791             :    { "Open", _wrap_Open, METH_VARARGS, "\n"
   56792             :     "Open(char const * utf8_path, GDALAccess eAccess=GA_ReadOnly) -> Dataset\n"
   56793             :     "\n"
   56794             :     "\n"
   56795             :     "Opens a raster file as a :py:class:`Dataset` using default options.\n"
   56796             :     "See :cpp:func:`GDALOpen`.\n"
   56797             :     "For more control over how the file is opened, use :py:func:`OpenEx`.\n"
   56798             :     "\n"
   56799             :     "Parameters\n"
   56800             :     "----------\n"
   56801             :     "utf8_path : str\n"
   56802             :     "    name of the file to open\n"
   56803             :     "eAccess : int, default = :py:const:`gdal.GA_ReadOnly`\n"
   56804             :     "\n"
   56805             :     "Returns\n"
   56806             :     "-------\n"
   56807             :     "Dataset, or ``None`` on failure\n"
   56808             :     "\n"
   56809             :     "See Also\n"
   56810             :     "--------\n"
   56811             :     ":py:func:`OpenEx`\n"
   56812             :     ":py:func:`OpenShared`\n"
   56813             :     "\n"
   56814             :     "\n"
   56815             :     ""},
   56816             :    { "OpenEx", (PyCFunction)(void(*)(void))_wrap_OpenEx, METH_VARARGS|METH_KEYWORDS, "\n"
   56817             :     "OpenEx(char const * utf8_path, unsigned int nOpenFlags=0, char ** allowed_drivers=None, char ** open_options=None, char ** sibling_files=None) -> Dataset\n"
   56818             :     "\n"
   56819             :     "\n"
   56820             :     "Open a raster or vector file as a :py:class:`Dataset`.\n"
   56821             :     "See :cpp:func:`GDALOpenEx`.\n"
   56822             :     "\n"
   56823             :     "Parameters\n"
   56824             :     "----------\n"
   56825             :     "utf8_path : str\n"
   56826             :     "    name of the file to open\n"
   56827             :     "flags : int\n"
   56828             :     "        Flags controlling how the Dataset is opened. Multiple ``gdal.OF_XXX`` flags\n"
   56829             :     "        may be combined using the ``|`` operator. See :cpp:func:`GDALOpenEx`.\n"
   56830             :     "allowed_drivers : list, optional\n"
   56831             :     "        A list of the names of drivers that may attempt to open the dataset.\n"
   56832             :     "open_options : dict/list, optional\n"
   56833             :     "        A dict or list of name=value driver-specific opening options.\n"
   56834             :     "sibling_files: list, optional\n"
   56835             :     "        A list of filenames that are auxiliary to the main filename\n"
   56836             :     "\n"
   56837             :     "Returns\n"
   56838             :     "-------\n"
   56839             :     "Dataset, or ``None`` on failure.\n"
   56840             :     "\n"
   56841             :     "See Also\n"
   56842             :     "--------\n"
   56843             :     ":py:func:`Open`\n"
   56844             :     ":py:func:`OpenShared`\n"
   56845             :     "\n"
   56846             :     "\n"
   56847             :     ""},
   56848             :    { "OpenShared", _wrap_OpenShared, METH_VARARGS, "\n"
   56849             :     "OpenShared(char const * utf8_path, GDALAccess eAccess=GA_ReadOnly) -> Dataset\n"
   56850             :     "\n"
   56851             :     "\n"
   56852             :     "Open a raster file as a :py:class:`Dataset`. If the file has already been\n"
   56853             :     "opened in the current thread, return a reference to the already-opened\n"
   56854             :     ":py:class:`Dataset`.  See :cpp:func:`GDALOpenShared`.\n"
   56855             :     "\n"
   56856             :     "Parameters\n"
   56857             :     "----------\n"
   56858             :     "utf8_path : str\n"
   56859             :     "    name of the file to open\n"
   56860             :     "eAccess : int, default = :py:const:`gdal.GA_ReadOnly`\n"
   56861             :     "\n"
   56862             :     "Returns\n"
   56863             :     "-------\n"
   56864             :     "Dataset, or ``None`` on failure\n"
   56865             :     "\n"
   56866             :     "See Also\n"
   56867             :     "--------\n"
   56868             :     ":py:func:`Open`\n"
   56869             :     ":py:func:`OpenEx`\n"
   56870             :     "\n"
   56871             :     "\n"
   56872             :     ""},
   56873             :    { "IdentifyDriver", _wrap_IdentifyDriver, METH_VARARGS, "IdentifyDriver(char const * utf8_path, char ** papszSiblings=None) -> Driver"},
   56874             :    { "IdentifyDriverEx", (PyCFunction)(void(*)(void))_wrap_IdentifyDriverEx, METH_VARARGS|METH_KEYWORDS, "IdentifyDriverEx(char const * utf8_path, unsigned int nIdentifyFlags=0, char ** allowed_drivers=None, char ** sibling_files=None) -> Driver"},
   56875             :    { "GeneralCmdLineProcessor", _wrap_GeneralCmdLineProcessor, METH_VARARGS, "GeneralCmdLineProcessor(char ** papszArgv, int nOptions=0) -> char **"},
   56876             :    { "new_GDALInfoOptions", _wrap_new_GDALInfoOptions, METH_O, "new_GDALInfoOptions(char ** options) -> GDALInfoOptions"},
   56877             :    { "delete_GDALInfoOptions", _wrap_delete_GDALInfoOptions, METH_O, "delete_GDALInfoOptions(GDALInfoOptions self)"},
   56878             :    { "GDALInfoOptions_swigregister", GDALInfoOptions_swigregister, METH_O, NULL},
   56879             :    { "GDALInfoOptions_swiginit", GDALInfoOptions_swiginit, METH_VARARGS, NULL},
   56880             :    { "InfoInternal", _wrap_InfoInternal, METH_VARARGS, "InfoInternal(Dataset hDataset, GDALInfoOptions infoOptions) -> retStringAndCPLFree *"},
   56881             :    { "new_GDALVectorInfoOptions", _wrap_new_GDALVectorInfoOptions, METH_O, "new_GDALVectorInfoOptions(char ** options) -> GDALVectorInfoOptions"},
   56882             :    { "delete_GDALVectorInfoOptions", _wrap_delete_GDALVectorInfoOptions, METH_O, "delete_GDALVectorInfoOptions(GDALVectorInfoOptions self)"},
   56883             :    { "GDALVectorInfoOptions_swigregister", GDALVectorInfoOptions_swigregister, METH_O, NULL},
   56884             :    { "GDALVectorInfoOptions_swiginit", GDALVectorInfoOptions_swiginit, METH_VARARGS, NULL},
   56885             :    { "VectorInfoInternal", _wrap_VectorInfoInternal, METH_VARARGS, "VectorInfoInternal(Dataset hDataset, GDALVectorInfoOptions infoOptions) -> retStringAndCPLFree *"},
   56886             :    { "new_GDALMultiDimInfoOptions", _wrap_new_GDALMultiDimInfoOptions, METH_O, "new_GDALMultiDimInfoOptions(char ** options) -> GDALMultiDimInfoOptions"},
   56887             :    { "delete_GDALMultiDimInfoOptions", _wrap_delete_GDALMultiDimInfoOptions, METH_O, "delete_GDALMultiDimInfoOptions(GDALMultiDimInfoOptions self)"},
   56888             :    { "GDALMultiDimInfoOptions_swigregister", GDALMultiDimInfoOptions_swigregister, METH_O, NULL},
   56889             :    { "GDALMultiDimInfoOptions_swiginit", GDALMultiDimInfoOptions_swiginit, METH_VARARGS, NULL},
   56890             :    { "MultiDimInfoInternal", _wrap_MultiDimInfoInternal, METH_VARARGS, "MultiDimInfoInternal(Dataset hDataset, GDALMultiDimInfoOptions infoOptions) -> retStringAndCPLFree *"},
   56891             :    { "new_GDALTranslateOptions", _wrap_new_GDALTranslateOptions, METH_O, "new_GDALTranslateOptions(char ** options) -> GDALTranslateOptions"},
   56892             :    { "delete_GDALTranslateOptions", _wrap_delete_GDALTranslateOptions, METH_O, "delete_GDALTranslateOptions(GDALTranslateOptions self)"},
   56893             :    { "GDALTranslateOptions_swigregister", GDALTranslateOptions_swigregister, METH_O, NULL},
   56894             :    { "GDALTranslateOptions_swiginit", GDALTranslateOptions_swiginit, METH_VARARGS, NULL},
   56895             :    { "TranslateInternal", _wrap_TranslateInternal, METH_VARARGS, "TranslateInternal(char const * dest, Dataset dataset, GDALTranslateOptions translateOptions, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset"},
   56896             :    { "new_GDALWarpAppOptions", _wrap_new_GDALWarpAppOptions, METH_O, "new_GDALWarpAppOptions(char ** options) -> GDALWarpAppOptions"},
   56897             :    { "delete_GDALWarpAppOptions", _wrap_delete_GDALWarpAppOptions, METH_O, "delete_GDALWarpAppOptions(GDALWarpAppOptions self)"},
   56898             :    { "GDALWarpAppOptions_swigregister", GDALWarpAppOptions_swigregister, METH_O, NULL},
   56899             :    { "GDALWarpAppOptions_swiginit", GDALWarpAppOptions_swiginit, METH_VARARGS, NULL},
   56900             :    { "wrapper_GDALWarpDestDS", _wrap_wrapper_GDALWarpDestDS, METH_VARARGS, "wrapper_GDALWarpDestDS(Dataset dstDS, int object_list_count, GDALWarpAppOptions warpAppOptions, GDALProgressFunc callback=0, void * callback_data=None) -> int"},
   56901             :    { "wrapper_GDALWarpDestName", _wrap_wrapper_GDALWarpDestName, METH_VARARGS, "wrapper_GDALWarpDestName(char const * dest, int object_list_count, GDALWarpAppOptions warpAppOptions, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset"},
   56902             :    { "new_GDALVectorTranslateOptions", _wrap_new_GDALVectorTranslateOptions, METH_O, "new_GDALVectorTranslateOptions(char ** options) -> GDALVectorTranslateOptions"},
   56903             :    { "delete_GDALVectorTranslateOptions", _wrap_delete_GDALVectorTranslateOptions, METH_O, "delete_GDALVectorTranslateOptions(GDALVectorTranslateOptions self)"},
   56904             :    { "GDALVectorTranslateOptions_swigregister", GDALVectorTranslateOptions_swigregister, METH_O, NULL},
   56905             :    { "GDALVectorTranslateOptions_swiginit", GDALVectorTranslateOptions_swiginit, METH_VARARGS, NULL},
   56906             :    { "wrapper_GDALVectorTranslateDestDS", _wrap_wrapper_GDALVectorTranslateDestDS, METH_VARARGS, "wrapper_GDALVectorTranslateDestDS(Dataset dstDS, Dataset srcDS, GDALVectorTranslateOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> int"},
   56907             :    { "wrapper_GDALVectorTranslateDestName", _wrap_wrapper_GDALVectorTranslateDestName, METH_VARARGS, "wrapper_GDALVectorTranslateDestName(char const * dest, Dataset srcDS, GDALVectorTranslateOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset"},
   56908             :    { "new_GDALDEMProcessingOptions", _wrap_new_GDALDEMProcessingOptions, METH_O, "new_GDALDEMProcessingOptions(char ** options) -> GDALDEMProcessingOptions"},
   56909             :    { "delete_GDALDEMProcessingOptions", _wrap_delete_GDALDEMProcessingOptions, METH_O, "delete_GDALDEMProcessingOptions(GDALDEMProcessingOptions self)"},
   56910             :    { "GDALDEMProcessingOptions_swigregister", GDALDEMProcessingOptions_swigregister, METH_O, NULL},
   56911             :    { "GDALDEMProcessingOptions_swiginit", GDALDEMProcessingOptions_swiginit, METH_VARARGS, NULL},
   56912             :    { "DEMProcessingInternal", _wrap_DEMProcessingInternal, METH_VARARGS, "DEMProcessingInternal(char const * dest, Dataset dataset, char const * pszProcessing, char const * pszColorFilename, GDALDEMProcessingOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset"},
   56913             :    { "new_GDALNearblackOptions", _wrap_new_GDALNearblackOptions, METH_O, "new_GDALNearblackOptions(char ** options) -> GDALNearblackOptions"},
   56914             :    { "delete_GDALNearblackOptions", _wrap_delete_GDALNearblackOptions, METH_O, "delete_GDALNearblackOptions(GDALNearblackOptions self)"},
   56915             :    { "GDALNearblackOptions_swigregister", GDALNearblackOptions_swigregister, METH_O, NULL},
   56916             :    { "GDALNearblackOptions_swiginit", GDALNearblackOptions_swiginit, METH_VARARGS, NULL},
   56917             :    { "wrapper_GDALNearblackDestDS", _wrap_wrapper_GDALNearblackDestDS, METH_VARARGS, "wrapper_GDALNearblackDestDS(Dataset dstDS, Dataset srcDS, GDALNearblackOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> int"},
   56918             :    { "wrapper_GDALNearblackDestName", _wrap_wrapper_GDALNearblackDestName, METH_VARARGS, "wrapper_GDALNearblackDestName(char const * dest, Dataset srcDS, GDALNearblackOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset"},
   56919             :    { "new_GDALGridOptions", _wrap_new_GDALGridOptions, METH_O, "new_GDALGridOptions(char ** options) -> GDALGridOptions"},
   56920             :    { "delete_GDALGridOptions", _wrap_delete_GDALGridOptions, METH_O, "delete_GDALGridOptions(GDALGridOptions self)"},
   56921             :    { "GDALGridOptions_swigregister", GDALGridOptions_swigregister, METH_O, NULL},
   56922             :    { "GDALGridOptions_swiginit", GDALGridOptions_swiginit, METH_VARARGS, NULL},
   56923             :    { "GridInternal", _wrap_GridInternal, METH_VARARGS, "GridInternal(char const * dest, Dataset dataset, GDALGridOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset"},
   56924             :    { "new_GDALRasterizeOptions", _wrap_new_GDALRasterizeOptions, METH_O, "new_GDALRasterizeOptions(char ** options) -> GDALRasterizeOptions"},
   56925             :    { "delete_GDALRasterizeOptions", _wrap_delete_GDALRasterizeOptions, METH_O, "delete_GDALRasterizeOptions(GDALRasterizeOptions self)"},
   56926             :    { "GDALRasterizeOptions_swigregister", GDALRasterizeOptions_swigregister, METH_O, NULL},
   56927             :    { "GDALRasterizeOptions_swiginit", GDALRasterizeOptions_swiginit, METH_VARARGS, NULL},
   56928             :    { "wrapper_GDALRasterizeDestDS", _wrap_wrapper_GDALRasterizeDestDS, METH_VARARGS, "wrapper_GDALRasterizeDestDS(Dataset dstDS, Dataset srcDS, GDALRasterizeOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> int"},
   56929             :    { "wrapper_GDALRasterizeDestName", _wrap_wrapper_GDALRasterizeDestName, METH_VARARGS, "wrapper_GDALRasterizeDestName(char const * dest, Dataset srcDS, GDALRasterizeOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset"},
   56930             :    { "new_GDALFootprintOptions", _wrap_new_GDALFootprintOptions, METH_O, "new_GDALFootprintOptions(char ** options) -> GDALFootprintOptions"},
   56931             :    { "delete_GDALFootprintOptions", _wrap_delete_GDALFootprintOptions, METH_O, "delete_GDALFootprintOptions(GDALFootprintOptions self)"},
   56932             :    { "GDALFootprintOptions_swigregister", GDALFootprintOptions_swigregister, METH_O, NULL},
   56933             :    { "GDALFootprintOptions_swiginit", GDALFootprintOptions_swiginit, METH_VARARGS, NULL},
   56934             :    { "wrapper_GDALFootprintDestDS", _wrap_wrapper_GDALFootprintDestDS, METH_VARARGS, "wrapper_GDALFootprintDestDS(Dataset dstDS, Dataset srcDS, GDALFootprintOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> int"},
   56935             :    { "wrapper_GDALFootprintDestName", _wrap_wrapper_GDALFootprintDestName, METH_VARARGS, "wrapper_GDALFootprintDestName(char const * dest, Dataset srcDS, GDALFootprintOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset"},
   56936             :    { "new_GDALBuildVRTOptions", _wrap_new_GDALBuildVRTOptions, METH_O, "new_GDALBuildVRTOptions(char ** options) -> GDALBuildVRTOptions"},
   56937             :    { "delete_GDALBuildVRTOptions", _wrap_delete_GDALBuildVRTOptions, METH_O, "delete_GDALBuildVRTOptions(GDALBuildVRTOptions self)"},
   56938             :    { "GDALBuildVRTOptions_swigregister", GDALBuildVRTOptions_swigregister, METH_O, NULL},
   56939             :    { "GDALBuildVRTOptions_swiginit", GDALBuildVRTOptions_swiginit, METH_VARARGS, NULL},
   56940             :    { "BuildVRTInternalObjects", _wrap_BuildVRTInternalObjects, METH_VARARGS, "BuildVRTInternalObjects(char const * dest, int object_list_count, GDALBuildVRTOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset"},
   56941             :    { "BuildVRTInternalNames", _wrap_BuildVRTInternalNames, METH_VARARGS, "BuildVRTInternalNames(char const * dest, char ** source_filenames, GDALBuildVRTOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset"},
   56942             :    { "new_GDALTileIndexOptions", _wrap_new_GDALTileIndexOptions, METH_O, "new_GDALTileIndexOptions(char ** options) -> GDALTileIndexOptions"},
   56943             :    { "delete_GDALTileIndexOptions", _wrap_delete_GDALTileIndexOptions, METH_O, "delete_GDALTileIndexOptions(GDALTileIndexOptions self)"},
   56944             :    { "GDALTileIndexOptions_swigregister", GDALTileIndexOptions_swigregister, METH_O, NULL},
   56945             :    { "GDALTileIndexOptions_swiginit", GDALTileIndexOptions_swiginit, METH_VARARGS, NULL},
   56946             :    { "TileIndexInternalNames", _wrap_TileIndexInternalNames, METH_VARARGS, "TileIndexInternalNames(char const * dest, char ** source_filenames, GDALTileIndexOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset"},
   56947             :    { "new_GDALMultiDimTranslateOptions", _wrap_new_GDALMultiDimTranslateOptions, METH_O, "new_GDALMultiDimTranslateOptions(char ** options) -> GDALMultiDimTranslateOptions"},
   56948             :    { "delete_GDALMultiDimTranslateOptions", _wrap_delete_GDALMultiDimTranslateOptions, METH_O, "delete_GDALMultiDimTranslateOptions(GDALMultiDimTranslateOptions self)"},
   56949             :    { "GDALMultiDimTranslateOptions_swigregister", GDALMultiDimTranslateOptions_swigregister, METH_O, NULL},
   56950             :    { "GDALMultiDimTranslateOptions_swiginit", GDALMultiDimTranslateOptions_swiginit, METH_VARARGS, NULL},
   56951             :    { "wrapper_GDALMultiDimTranslateDestName", _wrap_wrapper_GDALMultiDimTranslateDestName, METH_VARARGS, "wrapper_GDALMultiDimTranslateDestName(char const * dest, int object_list_count, GDALMultiDimTranslateOptions multiDimTranslateOptions, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset"},
   56952             :    { NULL, NULL, 0, NULL }
   56953             : };
   56954             : 
   56955             : static PyMethodDef SwigMethods_proxydocs[] = {
   56956             :    { NULL, NULL, 0, NULL }
   56957             : };
   56958             : 
   56959             : 
   56960             : /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
   56961             : 
   56962       54988 : static void *_p_GDALDriverShadowTo_p_GDALMajorObjectShadow(void *x, int *SWIGUNUSEDPARM(newmemory)) {
   56963       54988 :     return (void *)((GDALMajorObjectShadow *)  ((GDALDriverShadow *) x));
   56964             : }
   56965         876 : static void *_p_OGRLayerShadowTo_p_GDALMajorObjectShadow(void *x, int *SWIGUNUSEDPARM(newmemory)) {
   56966         876 :     return (void *)((GDALMajorObjectShadow *)  ((OGRLayerShadow *) x));
   56967             : }
   56968        5998 : static void *_p_GDALDatasetShadowTo_p_GDALMajorObjectShadow(void *x, int *SWIGUNUSEDPARM(newmemory)) {
   56969        5998 :     return (void *)((GDALMajorObjectShadow *)  ((GDALDatasetShadow *) x));
   56970             : }
   56971        5998 : static void *_p_GDALRasterBandShadowTo_p_GDALMajorObjectShadow(void *x, int *SWIGUNUSEDPARM(newmemory)) {
   56972        5998 :     return (void *)((GDALMajorObjectShadow *)  ((GDALRasterBandShadow *) x));
   56973             : }
   56974             : static swig_type_info _swigt__p_CPLErrorHandler = {"_p_CPLErrorHandler", "CPLErrorHandler *", 0, 0, (void*)0, 0};
   56975             : static swig_type_info _swigt__p_CPLVirtualMemShadow = {"_p_CPLVirtualMemShadow", "CPLVirtualMemShadow *", 0, 0, (void*)0, 0};
   56976             : static swig_type_info _swigt__p_CPLXMLNode = {"_p_CPLXMLNode", "CPLXMLNode *", 0, 0, (void*)0, 0};
   56977             : static swig_type_info _swigt__p_DirEntry = {"_p_DirEntry", "DirEntry *", 0, 0, (void*)0, 0};
   56978             : static swig_type_info _swigt__p_GByte = {"_p_GByte", "GByte *", 0, 0, (void*)0, 0};
   56979             : static swig_type_info _swigt__p_GDALAsyncReaderShadow = {"_p_GDALAsyncReaderShadow", "GDALAsyncReaderShadow *", 0, 0, (void*)0, 0};
   56980             : static swig_type_info _swigt__p_GDALAttributeHS = {"_p_GDALAttributeHS", "GDALAttributeHS *", 0, 0, (void*)0, 0};
   56981             : static swig_type_info _swigt__p_GDALBuildVRTOptions = {"_p_GDALBuildVRTOptions", "GDALBuildVRTOptions *", 0, 0, (void*)0, 0};
   56982             : static swig_type_info _swigt__p_GDALColorEntry = {"_p_GDALColorEntry", "GDALColorEntry *", 0, 0, (void*)0, 0};
   56983             : static swig_type_info _swigt__p_GDALColorTableShadow = {"_p_GDALColorTableShadow", "GDALColorTableShadow *", 0, 0, (void*)0, 0};
   56984             : static swig_type_info _swigt__p_GDALDEMProcessingOptions = {"_p_GDALDEMProcessingOptions", "GDALDEMProcessingOptions *", 0, 0, (void*)0, 0};
   56985             : static swig_type_info _swigt__p_GDALDatasetShadow = {"_p_GDALDatasetShadow", "GDALDatasetShadow *", 0, 0, (void*)0, 0};
   56986             : static swig_type_info _swigt__p_GDALDimensionHS = {"_p_GDALDimensionHS", "GDALDimensionHS *", 0, 0, (void*)0, 0};
   56987             : static swig_type_info _swigt__p_GDALDriverShadow = {"_p_GDALDriverShadow", "GDALDriverShadow *", 0, 0, (void*)0, 0};
   56988             : static swig_type_info _swigt__p_GDALEDTComponentHS = {"_p_GDALEDTComponentHS", "GDALEDTComponentHS *", 0, 0, (void*)0, 0};
   56989             : static swig_type_info _swigt__p_GDALExtendedDataTypeClass = {"_p_GDALExtendedDataTypeClass", "enum GDALExtendedDataTypeClass *|GDALExtendedDataTypeClass *", 0, 0, (void*)0, 0};
   56990             : static swig_type_info _swigt__p_GDALExtendedDataTypeHS = {"_p_GDALExtendedDataTypeHS", "GDALExtendedDataTypeHS *", 0, 0, (void*)0, 0};
   56991             : static swig_type_info _swigt__p_GDALExtendedDataTypeSubType = {"_p_GDALExtendedDataTypeSubType", "enum GDALExtendedDataTypeSubType *|GDALExtendedDataTypeSubType *", 0, 0, (void*)0, 0};
   56992             : static swig_type_info _swigt__p_GDALFootprintOptions = {"_p_GDALFootprintOptions", "GDALFootprintOptions *", 0, 0, (void*)0, 0};
   56993             : static swig_type_info _swigt__p_GDALGridOptions = {"_p_GDALGridOptions", "GDALGridOptions *", 0, 0, (void*)0, 0};
   56994             : static swig_type_info _swigt__p_GDALGroupHS = {"_p_GDALGroupHS", "GDALGroupHS *", 0, 0, (void*)0, 0};
   56995             : static swig_type_info _swigt__p_GDALInfoOptions = {"_p_GDALInfoOptions", "GDALInfoOptions *", 0, 0, (void*)0, 0};
   56996             : static swig_type_info _swigt__p_GDALMDArrayHS = {"_p_GDALMDArrayHS", "GDALMDArrayHS *", 0, 0, (void*)0, 0};
   56997             : static swig_type_info _swigt__p_GDALMajorObjectShadow = {"_p_GDALMajorObjectShadow", "GDALMajorObjectShadow *", 0, 0, (void*)0, 0};
   56998             : static swig_type_info _swigt__p_GDALMultiDimInfoOptions = {"_p_GDALMultiDimInfoOptions", "GDALMultiDimInfoOptions *", 0, 0, (void*)0, 0};
   56999             : static swig_type_info _swigt__p_GDALMultiDimTranslateOptions = {"_p_GDALMultiDimTranslateOptions", "GDALMultiDimTranslateOptions *", 0, 0, (void*)0, 0};
   57000             : static swig_type_info _swigt__p_GDALNearblackOptions = {"_p_GDALNearblackOptions", "GDALNearblackOptions *", 0, 0, (void*)0, 0};
   57001             : static swig_type_info _swigt__p_GDALProgressFunc = {"_p_GDALProgressFunc", "GDALProgressFunc *", 0, 0, (void*)0, 0};
   57002             : static swig_type_info _swigt__p_GDALRasterAttributeTableShadow = {"_p_GDALRasterAttributeTableShadow", "GDALRasterAttributeTableShadow *", 0, 0, (void*)0, 0};
   57003             : static swig_type_info _swigt__p_GDALRasterBandShadow = {"_p_GDALRasterBandShadow", "GDALRasterBandShadow *", 0, 0, (void*)0, 0};
   57004             : static swig_type_info _swigt__p_GDALRasterizeOptions = {"_p_GDALRasterizeOptions", "GDALRasterizeOptions *", 0, 0, (void*)0, 0};
   57005             : static swig_type_info _swigt__p_GDALRelationshipShadow = {"_p_GDALRelationshipShadow", "GDALRelationshipShadow *", 0, 0, (void*)0, 0};
   57006             : static swig_type_info _swigt__p_GDALSubdatasetInfo = {"_p_GDALSubdatasetInfo", "GDALSubdatasetInfo *|GDALSubdatasetInfoShadow *", 0, 0, (void*)0, 0};
   57007             : static swig_type_info _swigt__p_GDALTileIndexOptions = {"_p_GDALTileIndexOptions", "GDALTileIndexOptions *", 0, 0, (void*)0, 0};
   57008             : static swig_type_info _swigt__p_GDALTransformerInfoShadow = {"_p_GDALTransformerInfoShadow", "GDALTransformerInfoShadow *", 0, 0, (void*)0, 0};
   57009             : static swig_type_info _swigt__p_GDALTranslateOptions = {"_p_GDALTranslateOptions", "GDALTranslateOptions *", 0, 0, (void*)0, 0};
   57010             : static swig_type_info _swigt__p_GDALVectorInfoOptions = {"_p_GDALVectorInfoOptions", "GDALVectorInfoOptions *", 0, 0, (void*)0, 0};
   57011             : static swig_type_info _swigt__p_GDALVectorTranslateOptions = {"_p_GDALVectorTranslateOptions", "GDALVectorTranslateOptions *", 0, 0, (void*)0, 0};
   57012             : static swig_type_info _swigt__p_GDALViewshedMode = {"_p_GDALViewshedMode", "enum GDALViewshedMode *|GDALViewshedMode *", 0, 0, (void*)0, 0};
   57013             : static swig_type_info _swigt__p_GDALViewshedOutputType = {"_p_GDALViewshedOutputType", "enum GDALViewshedOutputType *|GDALViewshedOutputType *", 0, 0, (void*)0, 0};
   57014             : static swig_type_info _swigt__p_GDALWarpAppOptions = {"_p_GDALWarpAppOptions", "GDALWarpAppOptions *", 0, 0, (void*)0, 0};
   57015             : static swig_type_info _swigt__p_GDAL_GCP = {"_p_GDAL_GCP", "GDAL_GCP *", 0, 0, (void*)0, 0};
   57016             : static swig_type_info _swigt__p_GIntBig = {"_p_GIntBig", "GIntBig *", 0, 0, (void*)0, 0};
   57017             : static swig_type_info _swigt__p_GUIntBig = {"_p_GUIntBig", "GUIntBig *", 0, 0, (void*)0, 0};
   57018             : static swig_type_info _swigt__p_OGRFeatureShadow = {"_p_OGRFeatureShadow", "OGRFeatureShadow *", 0, 0, (void*)0, 0};
   57019             : static swig_type_info _swigt__p_OGRFieldDomainShadow = {"_p_OGRFieldDomainShadow", "OGRFieldDomainShadow *", 0, 0, (void*)0, 0};
   57020             : static swig_type_info _swigt__p_OGRGeomFieldDefnShadow = {"_p_OGRGeomFieldDefnShadow", "OGRGeomFieldDefnShadow *", 0, 0, (void*)0, 0};
   57021             : static swig_type_info _swigt__p_OGRGeometryShadow = {"_p_OGRGeometryShadow", "OGRGeometryShadow *", 0, 0, (void*)0, 0};
   57022             : static swig_type_info _swigt__p_OGRLayerShadow = {"_p_OGRLayerShadow", "OGRLayerShadow *", 0, 0, (void*)0, 0};
   57023             : static swig_type_info _swigt__p_OGRStyleTableShadow = {"_p_OGRStyleTableShadow", "OGRStyleTableShadow *", 0, 0, (void*)0, 0};
   57024             : static swig_type_info _swigt__p_OSRSpatialReferenceShadow = {"_p_OSRSpatialReferenceShadow", "OSRSpatialReferenceShadow *", 0, 0, (void*)0, 0};
   57025             : static swig_type_info _swigt__p_StatBuf = {"_p_StatBuf", "StatBuf *", 0, 0, (void*)0, 0};
   57026             : static swig_type_info _swigt__p_Statistics = {"_p_Statistics", "Statistics *", 0, 0, (void*)0, 0};
   57027             : static swig_type_info _swigt__p_SuggestedWarpOutputRes = {"_p_SuggestedWarpOutputRes", "SuggestedWarpOutputRes *", 0, 0, (void*)0, 0};
   57028             : static swig_type_info _swigt__p_VSIDIR = {"_p_VSIDIR", "VSIDIR *", 0, 0, (void*)0, 0};
   57029             : static swig_type_info _swigt__p_VSILFILE = {"_p_VSILFILE", "VSILFILE *", 0, 0, (void*)0, 0};
   57030             : static swig_type_info _swigt__p_bool = {"_p_bool", "bool *", 0, 0, (void*)0, 0};
   57031             : static swig_type_info _swigt__p_char = {"_p_char", "char *|retStringAndCPLFree *", 0, 0, (void*)0, 0};
   57032             : static swig_type_info _swigt__p_double = {"_p_double", "double *", 0, 0, (void*)0, 0};
   57033             : static swig_type_info _swigt__p_f_double_p_q_const__char_p_void__int = {"_p_f_double_p_q_const__char_p_void__int", "int (*)(double,char const *,void *)", 0, 0, (void*)0, 0};
   57034             : static swig_type_info _swigt__p_int = {"_p_int", "OGRFieldSubType *|OGRFieldDomainType *|GDALRATFieldType *|OGRFieldType *|RETURN_NONE *|GDALRelationshipType *|int *|GDALAccess *|OSRAxisMappingStrategy *|OGRwkbByteOrder *|CPLErr *|GDALRWFlag *|OGRJustification *|GDALRATFieldUsage *|GDALTileOrganization *|OGRAxisOrientation *|GDALPaletteInterp *|GDALColorInterp *|GDALRIOResampleAlg *|GDALResampleAlg *|OGRErr *|OGRwkbGeometryType *|GDALDataType *|GDALAsyncStatusType *|GDALRATTableType *|GDALRelationshipCardinality *|OGRFieldDomainMergePolicy *|OGRFieldDomainSplitPolicy *", 0, 0, (void*)0, 0};
   57035             : static swig_type_info _swigt__p_p_GByte = {"_p_p_GByte", "GByte **", 0, 0, (void*)0, 0};
   57036             : static swig_type_info _swigt__p_p_GDALDatasetShadow = {"_p_p_GDALDatasetShadow", "GDALDatasetShadow **", 0, 0, (void*)0, 0};
   57037             : static swig_type_info _swigt__p_p_GDALDimensionHS = {"_p_p_GDALDimensionHS", "GDALDimensionHS **", 0, 0, (void*)0, 0};
   57038             : static swig_type_info _swigt__p_p_GDALEDTComponentHS = {"_p_p_GDALEDTComponentHS", "GDALEDTComponentHS **", 0, 0, (void*)0, 0};
   57039             : static swig_type_info _swigt__p_p_GDALMDArrayHS = {"_p_p_GDALMDArrayHS", "GDALMDArrayHS **", 0, 0, (void*)0, 0};
   57040             : static swig_type_info _swigt__p_p_GDALRasterBandShadow = {"_p_p_GDALRasterBandShadow", "GDALRasterBandShadow **", 0, 0, (void*)0, 0};
   57041             : static swig_type_info _swigt__p_p_GDAL_GCP = {"_p_p_GDAL_GCP", "GDAL_GCP **", 0, 0, (void*)0, 0};
   57042             : static swig_type_info _swigt__p_p_GUIntBig = {"_p_p_GUIntBig", "GUIntBig **", 0, 0, (void*)0, 0};
   57043             : static swig_type_info _swigt__p_p_OGRLayerShadow = {"_p_p_OGRLayerShadow", "OGRLayerShadow **", 0, 0, (void*)0, 0};
   57044             : static swig_type_info _swigt__p_p_OSRSpatialReferenceShadow = {"_p_p_OSRSpatialReferenceShadow", "OSRSpatialReferenceShadow **", 0, 0, (void*)0, 0};
   57045             : static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0};
   57046             : static swig_type_info _swigt__p_p_double = {"_p_p_double", "double **", 0, 0, (void*)0, 0};
   57047             : static swig_type_info _swigt__p_p_int = {"_p_p_int", "int **", 0, 0, (void*)0, 0};
   57048             : static swig_type_info _swigt__p_p_p_GDALAttributeHS = {"_p_p_p_GDALAttributeHS", "GDALAttributeHS ***", 0, 0, (void*)0, 0};
   57049             : static swig_type_info _swigt__p_p_p_GDALDimensionHS = {"_p_p_p_GDALDimensionHS", "GDALDimensionHS ***", 0, 0, (void*)0, 0};
   57050             : static swig_type_info _swigt__p_p_p_GDALEDTComponentHS = {"_p_p_p_GDALEDTComponentHS", "GDALEDTComponentHS ***", 0, 0, (void*)0, 0};
   57051             : static swig_type_info _swigt__p_p_p_GDALMDArrayHS = {"_p_p_p_GDALMDArrayHS", "GDALMDArrayHS ***", 0, 0, (void*)0, 0};
   57052             : static swig_type_info _swigt__p_p_void = {"_p_p_void", "void **", 0, 0, (void*)0, 0};
   57053             : static swig_type_info _swigt__p_size_t = {"_p_size_t", "size_t *", 0, 0, (void*)0, 0};
   57054             : static swig_type_info _swigt__p_vsi_l_offset = {"_p_vsi_l_offset", "vsi_l_offset *", 0, 0, (void*)0, 0};
   57055             : 
   57056             : static swig_type_info *swig_type_initial[] = {
   57057             :   &_swigt__p_CPLErrorHandler,
   57058             :   &_swigt__p_CPLVirtualMemShadow,
   57059             :   &_swigt__p_CPLXMLNode,
   57060             :   &_swigt__p_DirEntry,
   57061             :   &_swigt__p_GByte,
   57062             :   &_swigt__p_GDALAsyncReaderShadow,
   57063             :   &_swigt__p_GDALAttributeHS,
   57064             :   &_swigt__p_GDALBuildVRTOptions,
   57065             :   &_swigt__p_GDALColorEntry,
   57066             :   &_swigt__p_GDALColorTableShadow,
   57067             :   &_swigt__p_GDALDEMProcessingOptions,
   57068             :   &_swigt__p_GDALDatasetShadow,
   57069             :   &_swigt__p_GDALDimensionHS,
   57070             :   &_swigt__p_GDALDriverShadow,
   57071             :   &_swigt__p_GDALEDTComponentHS,
   57072             :   &_swigt__p_GDALExtendedDataTypeClass,
   57073             :   &_swigt__p_GDALExtendedDataTypeHS,
   57074             :   &_swigt__p_GDALExtendedDataTypeSubType,
   57075             :   &_swigt__p_GDALFootprintOptions,
   57076             :   &_swigt__p_GDALGridOptions,
   57077             :   &_swigt__p_GDALGroupHS,
   57078             :   &_swigt__p_GDALInfoOptions,
   57079             :   &_swigt__p_GDALMDArrayHS,
   57080             :   &_swigt__p_GDALMajorObjectShadow,
   57081             :   &_swigt__p_GDALMultiDimInfoOptions,
   57082             :   &_swigt__p_GDALMultiDimTranslateOptions,
   57083             :   &_swigt__p_GDALNearblackOptions,
   57084             :   &_swigt__p_GDALProgressFunc,
   57085             :   &_swigt__p_GDALRasterAttributeTableShadow,
   57086             :   &_swigt__p_GDALRasterBandShadow,
   57087             :   &_swigt__p_GDALRasterizeOptions,
   57088             :   &_swigt__p_GDALRelationshipShadow,
   57089             :   &_swigt__p_GDALSubdatasetInfo,
   57090             :   &_swigt__p_GDALTileIndexOptions,
   57091             :   &_swigt__p_GDALTransformerInfoShadow,
   57092             :   &_swigt__p_GDALTranslateOptions,
   57093             :   &_swigt__p_GDALVectorInfoOptions,
   57094             :   &_swigt__p_GDALVectorTranslateOptions,
   57095             :   &_swigt__p_GDALViewshedMode,
   57096             :   &_swigt__p_GDALViewshedOutputType,
   57097             :   &_swigt__p_GDALWarpAppOptions,
   57098             :   &_swigt__p_GDAL_GCP,
   57099             :   &_swigt__p_GIntBig,
   57100             :   &_swigt__p_GUIntBig,
   57101             :   &_swigt__p_OGRFeatureShadow,
   57102             :   &_swigt__p_OGRFieldDomainShadow,
   57103             :   &_swigt__p_OGRGeomFieldDefnShadow,
   57104             :   &_swigt__p_OGRGeometryShadow,
   57105             :   &_swigt__p_OGRLayerShadow,
   57106             :   &_swigt__p_OGRStyleTableShadow,
   57107             :   &_swigt__p_OSRSpatialReferenceShadow,
   57108             :   &_swigt__p_StatBuf,
   57109             :   &_swigt__p_Statistics,
   57110             :   &_swigt__p_SuggestedWarpOutputRes,
   57111             :   &_swigt__p_VSIDIR,
   57112             :   &_swigt__p_VSILFILE,
   57113             :   &_swigt__p_bool,
   57114             :   &_swigt__p_char,
   57115             :   &_swigt__p_double,
   57116             :   &_swigt__p_f_double_p_q_const__char_p_void__int,
   57117             :   &_swigt__p_int,
   57118             :   &_swigt__p_p_GByte,
   57119             :   &_swigt__p_p_GDALDatasetShadow,
   57120             :   &_swigt__p_p_GDALDimensionHS,
   57121             :   &_swigt__p_p_GDALEDTComponentHS,
   57122             :   &_swigt__p_p_GDALMDArrayHS,
   57123             :   &_swigt__p_p_GDALRasterBandShadow,
   57124             :   &_swigt__p_p_GDAL_GCP,
   57125             :   &_swigt__p_p_GUIntBig,
   57126             :   &_swigt__p_p_OGRLayerShadow,
   57127             :   &_swigt__p_p_OSRSpatialReferenceShadow,
   57128             :   &_swigt__p_p_char,
   57129             :   &_swigt__p_p_double,
   57130             :   &_swigt__p_p_int,
   57131             :   &_swigt__p_p_p_GDALAttributeHS,
   57132             :   &_swigt__p_p_p_GDALDimensionHS,
   57133             :   &_swigt__p_p_p_GDALEDTComponentHS,
   57134             :   &_swigt__p_p_p_GDALMDArrayHS,
   57135             :   &_swigt__p_p_void,
   57136             :   &_swigt__p_size_t,
   57137             :   &_swigt__p_vsi_l_offset,
   57138             : };
   57139             : 
   57140             : static swig_cast_info _swigc__p_CPLErrorHandler[] = {  {&_swigt__p_CPLErrorHandler, 0, 0, 0},{0, 0, 0, 0}};
   57141             : static swig_cast_info _swigc__p_CPLVirtualMemShadow[] = {  {&_swigt__p_CPLVirtualMemShadow, 0, 0, 0},{0, 0, 0, 0}};
   57142             : static swig_cast_info _swigc__p_CPLXMLNode[] = {  {&_swigt__p_CPLXMLNode, 0, 0, 0},{0, 0, 0, 0}};
   57143             : static swig_cast_info _swigc__p_DirEntry[] = {  {&_swigt__p_DirEntry, 0, 0, 0},{0, 0, 0, 0}};
   57144             : static swig_cast_info _swigc__p_GByte[] = {  {&_swigt__p_GByte, 0, 0, 0},{0, 0, 0, 0}};
   57145             : static swig_cast_info _swigc__p_GDALAsyncReaderShadow[] = {  {&_swigt__p_GDALAsyncReaderShadow, 0, 0, 0},{0, 0, 0, 0}};
   57146             : static swig_cast_info _swigc__p_GDALAttributeHS[] = {  {&_swigt__p_GDALAttributeHS, 0, 0, 0},{0, 0, 0, 0}};
   57147             : static swig_cast_info _swigc__p_GDALBuildVRTOptions[] = {  {&_swigt__p_GDALBuildVRTOptions, 0, 0, 0},{0, 0, 0, 0}};
   57148             : static swig_cast_info _swigc__p_GDALColorEntry[] = {  {&_swigt__p_GDALColorEntry, 0, 0, 0},{0, 0, 0, 0}};
   57149             : static swig_cast_info _swigc__p_GDALColorTableShadow[] = {  {&_swigt__p_GDALColorTableShadow, 0, 0, 0},{0, 0, 0, 0}};
   57150             : static swig_cast_info _swigc__p_GDALDEMProcessingOptions[] = {  {&_swigt__p_GDALDEMProcessingOptions, 0, 0, 0},{0, 0, 0, 0}};
   57151             : static swig_cast_info _swigc__p_GDALDatasetShadow[] = {  {&_swigt__p_GDALDatasetShadow, 0, 0, 0},{0, 0, 0, 0}};
   57152             : static swig_cast_info _swigc__p_GDALDimensionHS[] = {  {&_swigt__p_GDALDimensionHS, 0, 0, 0},{0, 0, 0, 0}};
   57153             : static swig_cast_info _swigc__p_GDALDriverShadow[] = {  {&_swigt__p_GDALDriverShadow, 0, 0, 0},{0, 0, 0, 0}};
   57154             : static swig_cast_info _swigc__p_GDALEDTComponentHS[] = {  {&_swigt__p_GDALEDTComponentHS, 0, 0, 0},{0, 0, 0, 0}};
   57155             : static swig_cast_info _swigc__p_GDALExtendedDataTypeClass[] = {  {&_swigt__p_GDALExtendedDataTypeClass, 0, 0, 0},{0, 0, 0, 0}};
   57156             : static swig_cast_info _swigc__p_GDALExtendedDataTypeHS[] = {  {&_swigt__p_GDALExtendedDataTypeHS, 0, 0, 0},{0, 0, 0, 0}};
   57157             : static swig_cast_info _swigc__p_GDALExtendedDataTypeSubType[] = {  {&_swigt__p_GDALExtendedDataTypeSubType, 0, 0, 0},{0, 0, 0, 0}};
   57158             : static swig_cast_info _swigc__p_GDALFootprintOptions[] = {  {&_swigt__p_GDALFootprintOptions, 0, 0, 0},{0, 0, 0, 0}};
   57159             : static swig_cast_info _swigc__p_GDALGridOptions[] = {  {&_swigt__p_GDALGridOptions, 0, 0, 0},{0, 0, 0, 0}};
   57160             : static swig_cast_info _swigc__p_GDALGroupHS[] = {  {&_swigt__p_GDALGroupHS, 0, 0, 0},{0, 0, 0, 0}};
   57161             : static swig_cast_info _swigc__p_GDALInfoOptions[] = {  {&_swigt__p_GDALInfoOptions, 0, 0, 0},{0, 0, 0, 0}};
   57162             : static swig_cast_info _swigc__p_GDALMDArrayHS[] = {  {&_swigt__p_GDALMDArrayHS, 0, 0, 0},{0, 0, 0, 0}};
   57163             : static swig_cast_info _swigc__p_GDALMajorObjectShadow[] = {  {&_swigt__p_GDALMajorObjectShadow, 0, 0, 0},  {&_swigt__p_GDALDriverShadow, _p_GDALDriverShadowTo_p_GDALMajorObjectShadow, 0, 0},  {&_swigt__p_OGRLayerShadow, _p_OGRLayerShadowTo_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}};
   57164             : static swig_cast_info _swigc__p_GDALMultiDimInfoOptions[] = {  {&_swigt__p_GDALMultiDimInfoOptions, 0, 0, 0},{0, 0, 0, 0}};
   57165             : static swig_cast_info _swigc__p_GDALMultiDimTranslateOptions[] = {  {&_swigt__p_GDALMultiDimTranslateOptions, 0, 0, 0},{0, 0, 0, 0}};
   57166             : static swig_cast_info _swigc__p_GDALNearblackOptions[] = {  {&_swigt__p_GDALNearblackOptions, 0, 0, 0},{0, 0, 0, 0}};
   57167             : static swig_cast_info _swigc__p_GDALProgressFunc[] = {  {&_swigt__p_GDALProgressFunc, 0, 0, 0},{0, 0, 0, 0}};
   57168             : static swig_cast_info _swigc__p_GDALRasterAttributeTableShadow[] = {  {&_swigt__p_GDALRasterAttributeTableShadow, 0, 0, 0},{0, 0, 0, 0}};
   57169             : static swig_cast_info _swigc__p_GDALRasterBandShadow[] = {  {&_swigt__p_GDALRasterBandShadow, 0, 0, 0},{0, 0, 0, 0}};
   57170             : static swig_cast_info _swigc__p_GDALRasterizeOptions[] = {  {&_swigt__p_GDALRasterizeOptions, 0, 0, 0},{0, 0, 0, 0}};
   57171             : static swig_cast_info _swigc__p_GDALRelationshipShadow[] = {  {&_swigt__p_GDALRelationshipShadow, 0, 0, 0},{0, 0, 0, 0}};
   57172             : static swig_cast_info _swigc__p_GDALSubdatasetInfo[] = {  {&_swigt__p_GDALSubdatasetInfo, 0, 0, 0},{0, 0, 0, 0}};
   57173             : static swig_cast_info _swigc__p_GDALTileIndexOptions[] = {  {&_swigt__p_GDALTileIndexOptions, 0, 0, 0},{0, 0, 0, 0}};
   57174             : static swig_cast_info _swigc__p_GDALTransformerInfoShadow[] = {  {&_swigt__p_GDALTransformerInfoShadow, 0, 0, 0},{0, 0, 0, 0}};
   57175             : static swig_cast_info _swigc__p_GDALTranslateOptions[] = {  {&_swigt__p_GDALTranslateOptions, 0, 0, 0},{0, 0, 0, 0}};
   57176             : static swig_cast_info _swigc__p_GDALVectorInfoOptions[] = {  {&_swigt__p_GDALVectorInfoOptions, 0, 0, 0},{0, 0, 0, 0}};
   57177             : static swig_cast_info _swigc__p_GDALVectorTranslateOptions[] = {  {&_swigt__p_GDALVectorTranslateOptions, 0, 0, 0},{0, 0, 0, 0}};
   57178             : static swig_cast_info _swigc__p_GDALViewshedMode[] = {  {&_swigt__p_GDALViewshedMode, 0, 0, 0},{0, 0, 0, 0}};
   57179             : static swig_cast_info _swigc__p_GDALViewshedOutputType[] = {  {&_swigt__p_GDALViewshedOutputType, 0, 0, 0},{0, 0, 0, 0}};
   57180             : static swig_cast_info _swigc__p_GDALWarpAppOptions[] = {  {&_swigt__p_GDALWarpAppOptions, 0, 0, 0},{0, 0, 0, 0}};
   57181             : static swig_cast_info _swigc__p_GDAL_GCP[] = {  {&_swigt__p_GDAL_GCP, 0, 0, 0},{0, 0, 0, 0}};
   57182             : static swig_cast_info _swigc__p_GIntBig[] = {  {&_swigt__p_GIntBig, 0, 0, 0},{0, 0, 0, 0}};
   57183             : static swig_cast_info _swigc__p_GUIntBig[] = {  {&_swigt__p_GUIntBig, 0, 0, 0},{0, 0, 0, 0}};
   57184             : static swig_cast_info _swigc__p_OGRFeatureShadow[] = {  {&_swigt__p_OGRFeatureShadow, 0, 0, 0},{0, 0, 0, 0}};
   57185             : static swig_cast_info _swigc__p_OGRFieldDomainShadow[] = {  {&_swigt__p_OGRFieldDomainShadow, 0, 0, 0},{0, 0, 0, 0}};
   57186             : static swig_cast_info _swigc__p_OGRGeomFieldDefnShadow[] = {  {&_swigt__p_OGRGeomFieldDefnShadow, 0, 0, 0},{0, 0, 0, 0}};
   57187             : static swig_cast_info _swigc__p_OGRGeometryShadow[] = {  {&_swigt__p_OGRGeometryShadow, 0, 0, 0},{0, 0, 0, 0}};
   57188             : static swig_cast_info _swigc__p_OGRLayerShadow[] = {  {&_swigt__p_OGRLayerShadow, 0, 0, 0},{0, 0, 0, 0}};
   57189             : static swig_cast_info _swigc__p_OGRStyleTableShadow[] = {  {&_swigt__p_OGRStyleTableShadow, 0, 0, 0},{0, 0, 0, 0}};
   57190             : static swig_cast_info _swigc__p_OSRSpatialReferenceShadow[] = {  {&_swigt__p_OSRSpatialReferenceShadow, 0, 0, 0},{0, 0, 0, 0}};
   57191             : static swig_cast_info _swigc__p_StatBuf[] = {  {&_swigt__p_StatBuf, 0, 0, 0},{0, 0, 0, 0}};
   57192             : static swig_cast_info _swigc__p_Statistics[] = {  {&_swigt__p_Statistics, 0, 0, 0},{0, 0, 0, 0}};
   57193             : static swig_cast_info _swigc__p_SuggestedWarpOutputRes[] = {  {&_swigt__p_SuggestedWarpOutputRes, 0, 0, 0},{0, 0, 0, 0}};
   57194             : static swig_cast_info _swigc__p_VSIDIR[] = {  {&_swigt__p_VSIDIR, 0, 0, 0},{0, 0, 0, 0}};
   57195             : static swig_cast_info _swigc__p_VSILFILE[] = {  {&_swigt__p_VSILFILE, 0, 0, 0},{0, 0, 0, 0}};
   57196             : static swig_cast_info _swigc__p_bool[] = {  {&_swigt__p_bool, 0, 0, 0},{0, 0, 0, 0}};
   57197             : static swig_cast_info _swigc__p_char[] = {  {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
   57198             : static swig_cast_info _swigc__p_double[] = {  {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}};
   57199             : static swig_cast_info _swigc__p_f_double_p_q_const__char_p_void__int[] = {  {&_swigt__p_f_double_p_q_const__char_p_void__int, 0, 0, 0},{0, 0, 0, 0}};
   57200             : static swig_cast_info _swigc__p_int[] = {  {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
   57201             : static swig_cast_info _swigc__p_p_GByte[] = {  {&_swigt__p_p_GByte, 0, 0, 0},{0, 0, 0, 0}};
   57202             : static swig_cast_info _swigc__p_p_GDALDatasetShadow[] = {  {&_swigt__p_p_GDALDatasetShadow, 0, 0, 0},{0, 0, 0, 0}};
   57203             : static swig_cast_info _swigc__p_p_GDALDimensionHS[] = {  {&_swigt__p_p_GDALDimensionHS, 0, 0, 0},{0, 0, 0, 0}};
   57204             : static swig_cast_info _swigc__p_p_GDALEDTComponentHS[] = {  {&_swigt__p_p_GDALEDTComponentHS, 0, 0, 0},{0, 0, 0, 0}};
   57205             : static swig_cast_info _swigc__p_p_GDALMDArrayHS[] = {  {&_swigt__p_p_GDALMDArrayHS, 0, 0, 0},{0, 0, 0, 0}};
   57206             : static swig_cast_info _swigc__p_p_GDALRasterBandShadow[] = {  {&_swigt__p_p_GDALRasterBandShadow, 0, 0, 0},{0, 0, 0, 0}};
   57207             : static swig_cast_info _swigc__p_p_GDAL_GCP[] = {  {&_swigt__p_p_GDAL_GCP, 0, 0, 0},{0, 0, 0, 0}};
   57208             : static swig_cast_info _swigc__p_p_GUIntBig[] = {  {&_swigt__p_p_GUIntBig, 0, 0, 0},{0, 0, 0, 0}};
   57209             : static swig_cast_info _swigc__p_p_OGRLayerShadow[] = {  {&_swigt__p_p_OGRLayerShadow, 0, 0, 0},{0, 0, 0, 0}};
   57210             : static swig_cast_info _swigc__p_p_OSRSpatialReferenceShadow[] = {  {&_swigt__p_p_OSRSpatialReferenceShadow, 0, 0, 0},{0, 0, 0, 0}};
   57211             : static swig_cast_info _swigc__p_p_char[] = {  {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}};
   57212             : static swig_cast_info _swigc__p_p_double[] = {  {&_swigt__p_p_double, 0, 0, 0},{0, 0, 0, 0}};
   57213             : static swig_cast_info _swigc__p_p_int[] = {  {&_swigt__p_p_int, 0, 0, 0},{0, 0, 0, 0}};
   57214             : static swig_cast_info _swigc__p_p_p_GDALAttributeHS[] = {  {&_swigt__p_p_p_GDALAttributeHS, 0, 0, 0},{0, 0, 0, 0}};
   57215             : static swig_cast_info _swigc__p_p_p_GDALDimensionHS[] = {  {&_swigt__p_p_p_GDALDimensionHS, 0, 0, 0},{0, 0, 0, 0}};
   57216             : static swig_cast_info _swigc__p_p_p_GDALEDTComponentHS[] = {  {&_swigt__p_p_p_GDALEDTComponentHS, 0, 0, 0},{0, 0, 0, 0}};
   57217             : static swig_cast_info _swigc__p_p_p_GDALMDArrayHS[] = {  {&_swigt__p_p_p_GDALMDArrayHS, 0, 0, 0},{0, 0, 0, 0}};
   57218             : static swig_cast_info _swigc__p_p_void[] = {  {&_swigt__p_p_void, 0, 0, 0},{0, 0, 0, 0}};
   57219             : static swig_cast_info _swigc__p_size_t[] = {  {&_swigt__p_size_t, 0, 0, 0},{0, 0, 0, 0}};
   57220             : static swig_cast_info _swigc__p_vsi_l_offset[] = {  {&_swigt__p_vsi_l_offset, 0, 0, 0},{0, 0, 0, 0}};
   57221             : 
   57222             : static swig_cast_info *swig_cast_initial[] = {
   57223             :   _swigc__p_CPLErrorHandler,
   57224             :   _swigc__p_CPLVirtualMemShadow,
   57225             :   _swigc__p_CPLXMLNode,
   57226             :   _swigc__p_DirEntry,
   57227             :   _swigc__p_GByte,
   57228             :   _swigc__p_GDALAsyncReaderShadow,
   57229             :   _swigc__p_GDALAttributeHS,
   57230             :   _swigc__p_GDALBuildVRTOptions,
   57231             :   _swigc__p_GDALColorEntry,
   57232             :   _swigc__p_GDALColorTableShadow,
   57233             :   _swigc__p_GDALDEMProcessingOptions,
   57234             :   _swigc__p_GDALDatasetShadow,
   57235             :   _swigc__p_GDALDimensionHS,
   57236             :   _swigc__p_GDALDriverShadow,
   57237             :   _swigc__p_GDALEDTComponentHS,
   57238             :   _swigc__p_GDALExtendedDataTypeClass,
   57239             :   _swigc__p_GDALExtendedDataTypeHS,
   57240             :   _swigc__p_GDALExtendedDataTypeSubType,
   57241             :   _swigc__p_GDALFootprintOptions,
   57242             :   _swigc__p_GDALGridOptions,
   57243             :   _swigc__p_GDALGroupHS,
   57244             :   _swigc__p_GDALInfoOptions,
   57245             :   _swigc__p_GDALMDArrayHS,
   57246             :   _swigc__p_GDALMajorObjectShadow,
   57247             :   _swigc__p_GDALMultiDimInfoOptions,
   57248             :   _swigc__p_GDALMultiDimTranslateOptions,
   57249             :   _swigc__p_GDALNearblackOptions,
   57250             :   _swigc__p_GDALProgressFunc,
   57251             :   _swigc__p_GDALRasterAttributeTableShadow,
   57252             :   _swigc__p_GDALRasterBandShadow,
   57253             :   _swigc__p_GDALRasterizeOptions,
   57254             :   _swigc__p_GDALRelationshipShadow,
   57255             :   _swigc__p_GDALSubdatasetInfo,
   57256             :   _swigc__p_GDALTileIndexOptions,
   57257             :   _swigc__p_GDALTransformerInfoShadow,
   57258             :   _swigc__p_GDALTranslateOptions,
   57259             :   _swigc__p_GDALVectorInfoOptions,
   57260             :   _swigc__p_GDALVectorTranslateOptions,
   57261             :   _swigc__p_GDALViewshedMode,
   57262             :   _swigc__p_GDALViewshedOutputType,
   57263             :   _swigc__p_GDALWarpAppOptions,
   57264             :   _swigc__p_GDAL_GCP,
   57265             :   _swigc__p_GIntBig,
   57266             :   _swigc__p_GUIntBig,
   57267             :   _swigc__p_OGRFeatureShadow,
   57268             :   _swigc__p_OGRFieldDomainShadow,
   57269             :   _swigc__p_OGRGeomFieldDefnShadow,
   57270             :   _swigc__p_OGRGeometryShadow,
   57271             :   _swigc__p_OGRLayerShadow,
   57272             :   _swigc__p_OGRStyleTableShadow,
   57273             :   _swigc__p_OSRSpatialReferenceShadow,
   57274             :   _swigc__p_StatBuf,
   57275             :   _swigc__p_Statistics,
   57276             :   _swigc__p_SuggestedWarpOutputRes,
   57277             :   _swigc__p_VSIDIR,
   57278             :   _swigc__p_VSILFILE,
   57279             :   _swigc__p_bool,
   57280             :   _swigc__p_char,
   57281             :   _swigc__p_double,
   57282             :   _swigc__p_f_double_p_q_const__char_p_void__int,
   57283             :   _swigc__p_int,
   57284             :   _swigc__p_p_GByte,
   57285             :   _swigc__p_p_GDALDatasetShadow,
   57286             :   _swigc__p_p_GDALDimensionHS,
   57287             :   _swigc__p_p_GDALEDTComponentHS,
   57288             :   _swigc__p_p_GDALMDArrayHS,
   57289             :   _swigc__p_p_GDALRasterBandShadow,
   57290             :   _swigc__p_p_GDAL_GCP,
   57291             :   _swigc__p_p_GUIntBig,
   57292             :   _swigc__p_p_OGRLayerShadow,
   57293             :   _swigc__p_p_OSRSpatialReferenceShadow,
   57294             :   _swigc__p_p_char,
   57295             :   _swigc__p_p_double,
   57296             :   _swigc__p_p_int,
   57297             :   _swigc__p_p_p_GDALAttributeHS,
   57298             :   _swigc__p_p_p_GDALDimensionHS,
   57299             :   _swigc__p_p_p_GDALEDTComponentHS,
   57300             :   _swigc__p_p_p_GDALMDArrayHS,
   57301             :   _swigc__p_p_void,
   57302             :   _swigc__p_size_t,
   57303             :   _swigc__p_vsi_l_offset,
   57304             : };
   57305             : 
   57306             : 
   57307             : /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
   57308             : 
   57309             : static swig_const_info swig_const_table[] = {
   57310             : { SWIG_PY_POINTER, "TermProgress", 0, 0, (void *)((int (*)(double,char const *,void *))(GDALTermProgress)), &SWIGTYPE_p_f_double_p_q_const__char_p_void__int },
   57311             : {0, 0, 0, 0.0, 0, 0}};
   57312             : 
   57313             : #ifdef __cplusplus
   57314             : }
   57315             : #endif
   57316             : /* -----------------------------------------------------------------------------
   57317             :  * Type initialization:
   57318             :  * This problem is tough by the requirement that no dynamic
   57319             :  * memory is used. Also, since swig_type_info structures store pointers to
   57320             :  * swig_cast_info structures and swig_cast_info structures store pointers back
   57321             :  * to swig_type_info structures, we need some lookup code at initialization.
   57322             :  * The idea is that swig generates all the structures that are needed.
   57323             :  * The runtime then collects these partially filled structures.
   57324             :  * The SWIG_InitializeModule function takes these initial arrays out of
   57325             :  * swig_module, and does all the lookup, filling in the swig_module.types
   57326             :  * array with the correct data and linking the correct swig_cast_info
   57327             :  * structures together.
   57328             :  *
   57329             :  * The generated swig_type_info structures are assigned statically to an initial
   57330             :  * array. We just loop through that array, and handle each type individually.
   57331             :  * First we lookup if this type has been already loaded, and if so, use the
   57332             :  * loaded structure instead of the generated one. Then we have to fill in the
   57333             :  * cast linked list. The cast data is initially stored in something like a
   57334             :  * two-dimensional array. Each row corresponds to a type (there are the same
   57335             :  * number of rows as there are in the swig_type_initial array). Each entry in
   57336             :  * a column is one of the swig_cast_info structures for that type.
   57337             :  * The cast_initial array is actually an array of arrays, because each row has
   57338             :  * a variable number of columns. So to actually build the cast linked list,
   57339             :  * we find the array of casts associated with the type, and loop through it
   57340             :  * adding the casts to the list. The one last trick we need to do is making
   57341             :  * sure the type pointer in the swig_cast_info struct is correct.
   57342             :  *
   57343             :  * First off, we lookup the cast->type name to see if it is already loaded.
   57344             :  * There are three cases to handle:
   57345             :  *  1) If the cast->type has already been loaded AND the type we are adding
   57346             :  *     casting info to has not been loaded (it is in this module), THEN we
   57347             :  *     replace the cast->type pointer with the type pointer that has already
   57348             :  *     been loaded.
   57349             :  *  2) If BOTH types (the one we are adding casting info to, and the
   57350             :  *     cast->type) are loaded, THEN the cast info has already been loaded by
   57351             :  *     the previous module so we just ignore it.
   57352             :  *  3) Finally, if cast->type has not already been loaded, then we add that
   57353             :  *     swig_cast_info to the linked list (because the cast->type) pointer will
   57354             :  *     be correct.
   57355             :  * ----------------------------------------------------------------------------- */
   57356             : 
   57357             : #ifdef __cplusplus
   57358             : extern "C" {
   57359             : #if 0
   57360             : } /* c-mode */
   57361             : #endif
   57362             : #endif
   57363             : 
   57364             : #if 0
   57365             : #define SWIGRUNTIME_DEBUG
   57366             : #endif
   57367             : 
   57368             : 
   57369             : SWIGRUNTIME void
   57370             : SWIG_InitializeModule(void *clientdata) {
   57371             :   size_t i;
   57372             :   swig_module_info *module_head, *iter;
   57373             :   int init;
   57374             :   
   57375             :   /* check to see if the circular list has been setup, if not, set it up */
   57376             :   if (swig_module.next==0) {
   57377             :     /* Initialize the swig_module */
   57378             :     swig_module.type_initial = swig_type_initial;
   57379             :     swig_module.cast_initial = swig_cast_initial;
   57380             :     swig_module.next = &swig_module;
   57381             :     init = 1;
   57382             :   } else {
   57383             :     init = 0;
   57384             :   }
   57385             :   
   57386             :   /* Try and load any already created modules */
   57387             :   module_head = SWIG_GetModule(clientdata);
   57388             :   if (!module_head) {
   57389             :     /* This is the first module loaded for this interpreter */
   57390             :     /* so set the swig module into the interpreter */
   57391             :     SWIG_SetModule(clientdata, &swig_module);
   57392             :   } else {
   57393             :     /* the interpreter has loaded a SWIG module, but has it loaded this one? */
   57394             :     iter=module_head;
   57395             :     do {
   57396             :       if (iter==&swig_module) {
   57397             :         /* Our module is already in the list, so there's nothing more to do. */
   57398             :         return;
   57399             :       }
   57400             :       iter=iter->next;
   57401             :     } while (iter!= module_head);
   57402             :     
   57403             :     /* otherwise we must add our module into the list */
   57404             :     swig_module.next = module_head->next;
   57405             :     module_head->next = &swig_module;
   57406             :   }
   57407             :   
   57408             :   /* When multiple interpreters are used, a module could have already been initialized in
   57409             :        a different interpreter, but not yet have a pointer in this interpreter.
   57410             :        In this case, we do not want to continue adding types... everything should be
   57411             :        set up already */
   57412             :   if (init == 0) return;
   57413             :   
   57414             :   /* Now work on filling in swig_module.types */
   57415             : #ifdef SWIGRUNTIME_DEBUG
   57416             :   printf("SWIG_InitializeModule: size %lu\n", (unsigned long)swig_module.size);
   57417             : #endif
   57418             :   for (i = 0; i < swig_module.size; ++i) {
   57419             :     swig_type_info *type = 0;
   57420             :     swig_type_info *ret;
   57421             :     swig_cast_info *cast;
   57422             :     
   57423             : #ifdef SWIGRUNTIME_DEBUG
   57424             :     printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
   57425             : #endif
   57426             :     
   57427             :     /* if there is another module already loaded */
   57428             :     if (swig_module.next != &swig_module) {
   57429             :       type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
   57430             :     }
   57431             :     if (type) {
   57432             :       /* Overwrite clientdata field */
   57433             : #ifdef SWIGRUNTIME_DEBUG
   57434             :       printf("SWIG_InitializeModule: found type %s\n", type->name);
   57435             : #endif
   57436             :       if (swig_module.type_initial[i]->clientdata) {
   57437             :         type->clientdata = swig_module.type_initial[i]->clientdata;
   57438             : #ifdef SWIGRUNTIME_DEBUG
   57439             :         printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
   57440             : #endif
   57441             :       }
   57442             :     } else {
   57443             :       type = swig_module.type_initial[i];
   57444             :     }
   57445             :     
   57446             :     /* Insert casting types */
   57447             :     cast = swig_module.cast_initial[i];
   57448             :     while (cast->type) {
   57449             :       /* Don't need to add information already in the list */
   57450             :       ret = 0;
   57451             : #ifdef SWIGRUNTIME_DEBUG
   57452             :       printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
   57453             : #endif
   57454             :       if (swig_module.next != &swig_module) {
   57455             :         ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
   57456             : #ifdef SWIGRUNTIME_DEBUG
   57457             :         if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
   57458             : #endif
   57459             :       }
   57460             :       if (ret) {
   57461             :         if (type == swig_module.type_initial[i]) {
   57462             : #ifdef SWIGRUNTIME_DEBUG
   57463             :           printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
   57464             : #endif
   57465             :           cast->type = ret;
   57466             :           ret = 0;
   57467             :         } else {
   57468             :           /* Check for casting already in the list */
   57469             :           swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
   57470             : #ifdef SWIGRUNTIME_DEBUG
   57471             :           if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
   57472             : #endif
   57473             :           if (!ocast) ret = 0;
   57474             :         }
   57475             :       }
   57476             :       
   57477             :       if (!ret) {
   57478             : #ifdef SWIGRUNTIME_DEBUG
   57479             :         printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
   57480             : #endif
   57481             :         if (type->cast) {
   57482             :           type->cast->prev = cast;
   57483             :           cast->next = type->cast;
   57484             :         }
   57485             :         type->cast = cast;
   57486             :       }
   57487             :       cast++;
   57488             :     }
   57489             :     /* Set entry in modules->types array equal to the type */
   57490             :     swig_module.types[i] = type;
   57491             :   }
   57492             :   swig_module.types[i] = 0;
   57493             :   
   57494             : #ifdef SWIGRUNTIME_DEBUG
   57495             :   printf("**** SWIG_InitializeModule: Cast List ******\n");
   57496             :   for (i = 0; i < swig_module.size; ++i) {
   57497             :     int j = 0;
   57498             :     swig_cast_info *cast = swig_module.cast_initial[i];
   57499             :     printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
   57500             :     while (cast->type) {
   57501             :       printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
   57502             :       cast++;
   57503             :       ++j;
   57504             :     }
   57505             :     printf("---- Total casts: %d\n",j);
   57506             :   }
   57507             :   printf("**** SWIG_InitializeModule: Cast List ******\n");
   57508             : #endif
   57509             : }
   57510             : 
   57511             : /* This function will propagate the clientdata field of type to
   57512             : * any new swig_type_info structures that have been added into the list
   57513             : * of equivalent types.  It is like calling
   57514             : * SWIG_TypeClientData(type, clientdata) a second time.
   57515             : */
   57516             : SWIGRUNTIME void
   57517             : SWIG_PropagateClientData(void) {
   57518             :   size_t i;
   57519             :   swig_cast_info *equiv;
   57520             :   static int init_run = 0;
   57521             :   
   57522             :   if (init_run) return;
   57523             :   init_run = 1;
   57524             :   
   57525             :   for (i = 0; i < swig_module.size; i++) {
   57526             :     if (swig_module.types[i]->clientdata) {
   57527             :       equiv = swig_module.types[i]->cast;
   57528             :       while (equiv) {
   57529             :         if (!equiv->converter) {
   57530             :           if (equiv->type && !equiv->type->clientdata)
   57531             :           SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
   57532             :         }
   57533             :         equiv = equiv->next;
   57534             :       }
   57535             :     }
   57536             :   }
   57537             : }
   57538             : 
   57539             : #ifdef __cplusplus
   57540             : #if 0
   57541             : {
   57542             :   /* c-mode */
   57543             : #endif
   57544             : }
   57545             : #endif
   57546             : 
   57547             : 
   57548             : 
   57549             : #ifdef __cplusplus
   57550             : extern "C" {
   57551             : #endif
   57552             :   
   57553             :   /* Python-specific SWIG API */
   57554             : #define SWIG_newvarlink()                             SWIG_Python_newvarlink()
   57555             : #define SWIG_addvarlink(p, name, get_attr, set_attr)  SWIG_Python_addvarlink(p, name, get_attr, set_attr)
   57556             : #define SWIG_InstallConstants(d, constants)           SWIG_Python_InstallConstants(d, constants)
   57557             :   
   57558             :   /* -----------------------------------------------------------------------------
   57559             :    * global variable support code.
   57560             :    * ----------------------------------------------------------------------------- */
   57561             :   
   57562             :   typedef struct swig_globalvar {
   57563             :     char       *name;                  /* Name of global variable */
   57564             :     PyObject *(*get_attr)(void);       /* Return the current value */
   57565             :     int       (*set_attr)(PyObject *); /* Set the value */
   57566             :     struct swig_globalvar *next;
   57567             :   } swig_globalvar;
   57568             :   
   57569             :   typedef struct swig_varlinkobject {
   57570             :     PyObject_HEAD
   57571             :     swig_globalvar *vars;
   57572             :   } swig_varlinkobject;
   57573             :   
   57574             :   SWIGINTERN PyObject *
   57575             :   swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) {
   57576             : #if PY_VERSION_HEX >= 0x03000000
   57577             :     return PyUnicode_InternFromString("<Swig global variables>");
   57578             : #else
   57579             :     return PyString_FromString("<Swig global variables>");
   57580             : #endif
   57581             :   }
   57582             :   
   57583             :   SWIGINTERN PyObject *
   57584             :   swig_varlink_str(swig_varlinkobject *v) {
   57585             : #if PY_VERSION_HEX >= 0x03000000
   57586             :     PyObject *str = PyUnicode_InternFromString("(");
   57587             :     PyObject *tail;
   57588             :     PyObject *joined;
   57589             :     swig_globalvar *var;
   57590             :     for (var = v->vars; var; var=var->next) {
   57591             :       tail = PyUnicode_FromString(var->name);
   57592             :       joined = PyUnicode_Concat(str, tail);
   57593             :       Py_DecRef(str);
   57594             :       Py_DecRef(tail);
   57595             :       str = joined;
   57596             :       if (var->next) {
   57597             :         tail = PyUnicode_InternFromString(", ");
   57598             :         joined = PyUnicode_Concat(str, tail);
   57599             :         Py_DecRef(str);
   57600             :         Py_DecRef(tail);
   57601             :         str = joined;
   57602             :       }
   57603             :     }
   57604             :     tail = PyUnicode_InternFromString(")");
   57605             :     joined = PyUnicode_Concat(str, tail);
   57606             :     Py_DecRef(str);
   57607             :     Py_DecRef(tail);
   57608             :     str = joined;
   57609             : #else
   57610             :     PyObject *str = PyString_FromString("(");
   57611             :     swig_globalvar *var;
   57612             :     for (var = v->vars; var; var=var->next) {
   57613             :       PyString_ConcatAndDel(&str,PyString_FromString(var->name));
   57614             :       if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", "));
   57615             :     }
   57616             :     PyString_ConcatAndDel(&str,PyString_FromString(")"));
   57617             : #endif
   57618             :     return str;
   57619             :   }
   57620             :   
   57621             :   SWIGINTERN void
   57622             :   swig_varlink_dealloc(swig_varlinkobject *v) {
   57623             :     swig_globalvar *var = v->vars;
   57624             :     while (var) {
   57625             :       swig_globalvar *n = var->next;
   57626             :       free(var->name);
   57627             :       free(var);
   57628             :       var = n;
   57629             :     }
   57630             :   }
   57631             :   
   57632             :   SWIGINTERN PyObject *
   57633             :   swig_varlink_getattr(swig_varlinkobject *v, char *n) {
   57634             :     PyObject *res = NULL;
   57635             :     swig_globalvar *var = v->vars;
   57636             :     while (var) {
   57637             :       if (strcmp(var->name,n) == 0) {
   57638             :         res = (*var->get_attr)();
   57639             :         break;
   57640             :       }
   57641             :       var = var->next;
   57642             :     }
   57643             :     if (res == NULL && !PyErr_Occurred()) {
   57644             :       PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
   57645             :     }
   57646             :     return res;
   57647             :   }
   57648             :   
   57649             :   SWIGINTERN int
   57650             :   swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
   57651             :     int res = 1;
   57652             :     swig_globalvar *var = v->vars;
   57653             :     while (var) {
   57654             :       if (strcmp(var->name,n) == 0) {
   57655             :         res = (*var->set_attr)(p);
   57656             :         break;
   57657             :       }
   57658             :       var = var->next;
   57659             :     }
   57660             :     if (res == 1 && !PyErr_Occurred()) {
   57661             :       PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
   57662             :     }
   57663             :     return res;
   57664             :   }
   57665             :   
   57666             :   SWIGINTERN PyTypeObject*
   57667             :   swig_varlink_type(void) {
   57668             :     static char varlink__doc__[] = "Swig var link object";
   57669             :     static PyTypeObject varlink_type;
   57670             :     static int type_init = 0;
   57671             :     if (!type_init) {
   57672             :       const PyTypeObject tmp = {
   57673             : #if PY_VERSION_HEX >= 0x03000000
   57674             :         PyVarObject_HEAD_INIT(NULL, 0)
   57675             : #else
   57676             :         PyObject_HEAD_INIT(NULL)
   57677             :         0,                                  /* ob_size */
   57678             : #endif
   57679             :         "swigvarlink",                      /* tp_name */
   57680             :         sizeof(swig_varlinkobject),         /* tp_basicsize */
   57681             :         0,                                  /* tp_itemsize */
   57682             :         (destructor) swig_varlink_dealloc,  /* tp_dealloc */
   57683             :         0,                                  /* tp_print */
   57684             :         (getattrfunc) swig_varlink_getattr, /* tp_getattr */
   57685             :         (setattrfunc) swig_varlink_setattr, /* tp_setattr */
   57686             :         0,                                  /* tp_compare */
   57687             :         (reprfunc) swig_varlink_repr,       /* tp_repr */
   57688             :         0,                                  /* tp_as_number */
   57689             :         0,                                  /* tp_as_sequence */
   57690             :         0,                                  /* tp_as_mapping */
   57691             :         0,                                  /* tp_hash */
   57692             :         0,                                  /* tp_call */
   57693             :         (reprfunc) swig_varlink_str,        /* tp_str */
   57694             :         0,                                  /* tp_getattro */
   57695             :         0,                                  /* tp_setattro */
   57696             :         0,                                  /* tp_as_buffer */
   57697             :         0,                                  /* tp_flags */
   57698             :         varlink__doc__,                     /* tp_doc */
   57699             :         0,                                  /* tp_traverse */
   57700             :         0,                                  /* tp_clear */
   57701             :         0,                                  /* tp_richcompare */
   57702             :         0,                                  /* tp_weaklistoffset */
   57703             :         0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
   57704             :         0,                                  /* tp_del */
   57705             :         0,                                  /* tp_version_tag */
   57706             : #if PY_VERSION_HEX >= 0x03040000
   57707             :         0,                                  /* tp_finalize */
   57708             : #endif
   57709             : #ifdef COUNT_ALLOCS
   57710             :         0,                                  /* tp_allocs */
   57711             :         0,                                  /* tp_frees */
   57712             :         0,                                  /* tp_maxalloc */
   57713             :         0,                                  /* tp_prev */
   57714             :         0                                   /* tp_next */
   57715             : #endif
   57716             :       };
   57717             :       varlink_type = tmp;
   57718             :       type_init = 1;
   57719             :       if (PyType_Ready(&varlink_type) < 0)
   57720             :       return NULL;
   57721             :     }
   57722             :     return &varlink_type;
   57723             :   }
   57724             :   
   57725             :   /* Create a variable linking object for use later */
   57726             :   SWIGINTERN PyObject *
   57727             :   SWIG_Python_newvarlink(void) {
   57728             :     swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type());
   57729             :     if (result) {
   57730             :       result->vars = 0;
   57731             :     }
   57732             :     return ((PyObject*) result);
   57733             :   }
   57734             :   
   57735             :   SWIGINTERN void 
   57736             :   SWIG_Python_addvarlink(PyObject *p, const char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
   57737             :     swig_varlinkobject *v = (swig_varlinkobject *) p;
   57738             :     swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
   57739             :     if (gv) {
   57740             :       size_t size = strlen(name)+1;
   57741             :       gv->name = (char *)malloc(size);
   57742             :       if (gv->name) {
   57743             :         memcpy(gv->name, name, size);
   57744             :         gv->get_attr = get_attr;
   57745             :         gv->set_attr = set_attr;
   57746             :         gv->next = v->vars;
   57747             :       }
   57748             :     }
   57749             :     v->vars = gv;
   57750             :   }
   57751             :   
   57752             :   SWIGINTERN PyObject *
   57753             :   SWIG_globals(void) {
   57754             :     static PyObject *globals = 0;
   57755             :     if (!globals) {
   57756             :       globals = SWIG_newvarlink();
   57757             :     }
   57758             :     return globals;
   57759             :   }
   57760             :   
   57761             :   /* -----------------------------------------------------------------------------
   57762             :    * constants/methods manipulation
   57763             :    * ----------------------------------------------------------------------------- */
   57764             :   
   57765             :   /* Install Constants */
   57766             :   SWIGINTERN void
   57767         271 :   SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
   57768         271 :     PyObject *obj = 0;
   57769         271 :     size_t i;
   57770         542 :     for (i = 0; constants[i].type; ++i) {
   57771         271 :       switch(constants[i].type) {
   57772         271 :       case SWIG_PY_POINTER:
   57773         271 :         obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
   57774         271 :         break;
   57775           0 :       case SWIG_PY_BINARY:
   57776           0 :         obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
   57777             :         break;
   57778             :       default:
   57779             :         obj = 0;
   57780             :         break;
   57781             :       }
   57782         271 :       if (obj) {
   57783         271 :         PyDict_SetItemString(d, constants[i].name, obj);
   57784         271 :         Py_DECREF(obj);
   57785             :       }
   57786             :     }
   57787         271 :   }
   57788             :   
   57789             :   /* -----------------------------------------------------------------------------*/
   57790             :   /* Fix SwigMethods to carry the callback ptrs when needed */
   57791             :   /* -----------------------------------------------------------------------------*/
   57792             :   
   57793             :   SWIGINTERN void
   57794         271 :   SWIG_Python_FixMethods(PyMethodDef *methods,
   57795             :     swig_const_info *const_table,
   57796             :     swig_type_info **types,
   57797             :     swig_type_info **types_initial) {
   57798         271 :     size_t i;
   57799      182654 :     for (i = 0; methods[i].ml_name; ++i) {
   57800      182383 :       const char *c = methods[i].ml_doc;
   57801      182383 :       if (!c) continue;
   57802      166123 :       c = strstr(c, "swig_ptr: ");
   57803      166123 :       if (c) {
   57804           0 :         int j;
   57805           0 :         swig_const_info *ci = 0;
   57806           0 :         const char *name = c + 10;
   57807           0 :         for (j = 0; const_table[j].type; ++j) {
   57808           0 :           if (strncmp(const_table[j].name, name, 
   57809             :               strlen(const_table[j].name)) == 0) {
   57810             :             ci = &(const_table[j]);
   57811             :             break;
   57812             :           }
   57813             :         }
   57814           0 :         if (ci) {
   57815      182383 :           void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
   57816           0 :           if (ptr) {
   57817           0 :             size_t shift = (ci->ptype) - types;
   57818           0 :             swig_type_info *ty = types_initial[shift];
   57819           0 :             size_t ldoc = (c - methods[i].ml_doc);
   57820           0 :             size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
   57821           0 :             char *ndoc = (char*)malloc(ldoc + lptr + 10);
   57822           0 :             if (ndoc) {
   57823           0 :               char *buff = ndoc;
   57824           0 :               memcpy(buff, methods[i].ml_doc, ldoc);
   57825           0 :               buff += ldoc;
   57826           0 :               memcpy(buff, "swig_ptr: ", 10);
   57827           0 :               buff += 10;
   57828           0 :               SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
   57829           0 :               methods[i].ml_doc = ndoc;
   57830             :             }
   57831             :           }
   57832             :         }
   57833             :       }
   57834             :     }
   57835         271 :   } 
   57836             :   
   57837             :   /* -----------------------------------------------------------------------------
   57838             :    * Method creation and docstring support functions
   57839             :    * ----------------------------------------------------------------------------- */
   57840             :   
   57841             :   /* -----------------------------------------------------------------------------
   57842             :    * Function to find the method definition with the correct docstring for the
   57843             :    * proxy module as opposed to the low-level API
   57844             :    * ----------------------------------------------------------------------------- */
   57845             :   
   57846           0 :   SWIGINTERN PyMethodDef *SWIG_PythonGetProxyDoc(const char *name) {
   57847             :     /* Find the function in the modified method table */
   57848           0 :     size_t offset = 0;
   57849           0 :     int found = 0;
   57850           0 :     while (SwigMethods_proxydocs[offset].ml_meth != NULL) {
   57851           0 :       if (strcmp(SwigMethods_proxydocs[offset].ml_name, name) == 0) {
   57852             :         found = 1;
   57853             :         break;
   57854             :       }
   57855           0 :       offset++;
   57856             :     }
   57857             :     /* Use the copy with the modified docstring if available */
   57858           0 :     return found ? &SwigMethods_proxydocs[offset] : NULL;
   57859             :   }
   57860             :   
   57861             :   /* -----------------------------------------------------------------------------
   57862             :    * Wrapper of PyInstanceMethod_New() used in Python 3
   57863             :    * It is exported to the generated module, used for -fastproxy
   57864             :    * ----------------------------------------------------------------------------- */
   57865             :   
   57866           0 :   SWIGINTERN PyObject *SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) {
   57867           0 :     if (PyCFunction_Check(func)) {
   57868           0 :       PyCFunctionObject *funcobj = (PyCFunctionObject *)func;
   57869           0 :       PyMethodDef *ml = SWIG_PythonGetProxyDoc(funcobj->m_ml->ml_name);
   57870           0 :       if (ml)
   57871           0 :       func = PyCFunction_NewEx(ml, funcobj->m_self, funcobj->m_module);
   57872             :     }
   57873             : #if PY_VERSION_HEX >= 0x03000000
   57874           0 :     return PyInstanceMethod_New(func);
   57875             : #else
   57876             :     return PyMethod_New(func, NULL, NULL);
   57877             : #endif
   57878             :   }
   57879             :   
   57880             :   /* -----------------------------------------------------------------------------
   57881             :    * Wrapper of PyStaticMethod_New()
   57882             :    * It is exported to the generated module, used for -fastproxy
   57883             :    * ----------------------------------------------------------------------------- */
   57884             :   
   57885             :   SWIGINTERN PyObject *SWIG_PyStaticMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) {
   57886             :     if (PyCFunction_Check(func)) {
   57887             :       PyCFunctionObject *funcobj = (PyCFunctionObject *)func;
   57888             :       PyMethodDef *ml = SWIG_PythonGetProxyDoc(funcobj->m_ml->ml_name);
   57889             :       if (ml)
   57890             :       func = PyCFunction_NewEx(ml, funcobj->m_self, funcobj->m_module);
   57891             :     }
   57892             :     return PyStaticMethod_New(func);
   57893             :   }
   57894             :   
   57895             : #ifdef __cplusplus
   57896             : }
   57897             : #endif
   57898             : 
   57899             : /* -----------------------------------------------------------------------------*
   57900             :  *  Partial Init method
   57901             :  * -----------------------------------------------------------------------------*/
   57902             : 
   57903             : #ifdef __cplusplus
   57904             : extern "C"
   57905             : #endif
   57906             : 
   57907             : SWIGEXPORT 
   57908             : #if PY_VERSION_HEX >= 0x03000000
   57909             : PyObject*
   57910             : #else
   57911             : void
   57912             : #endif
   57913         271 : SWIG_init(void) {
   57914         271 :   PyObject *m, *d, *md, *globals;
   57915             :   
   57916             : #if PY_VERSION_HEX >= 0x03000000
   57917         271 :   static struct PyModuleDef SWIG_module = {
   57918             :     PyModuleDef_HEAD_INIT,
   57919             :     SWIG_name,
   57920             :     NULL,
   57921             :     -1,
   57922             :     SwigMethods,
   57923             :     NULL,
   57924             :     NULL,
   57925             :     NULL,
   57926             :     NULL
   57927             :   };
   57928             : #endif
   57929             :   
   57930             : #if defined(SWIGPYTHON_BUILTIN)
   57931             :   static SwigPyClientData SwigPyObject_clientdata = {
   57932             :     0, 0, 0, 0, 0, 0, 0
   57933             :   };
   57934             :   static PyGetSetDef this_getset_def = {
   57935             :     (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL
   57936             :   };
   57937             :   static SwigPyGetSet thisown_getset_closure = {
   57938             :     SwigPyObject_own,
   57939             :     SwigPyObject_own
   57940             :   };
   57941             :   static PyGetSetDef thisown_getset_def = {
   57942             :     (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure
   57943             :   };
   57944             :   PyTypeObject *builtin_pytype;
   57945             :   int builtin_base_count;
   57946             :   swig_type_info *builtin_basetype;
   57947             :   PyObject *tuple;
   57948             :   PyGetSetDescrObject *static_getset;
   57949             :   PyTypeObject *metatype;
   57950             :   PyTypeObject *swigpyobject;
   57951             :   SwigPyClientData *cd;
   57952             :   PyObject *public_interface, *public_symbol;
   57953             :   PyObject *this_descr;
   57954             :   PyObject *thisown_descr;
   57955             :   PyObject *self = 0;
   57956             :   int i;
   57957             :   
   57958             :   (void)builtin_pytype;
   57959             :   (void)builtin_base_count;
   57960             :   (void)builtin_basetype;
   57961             :   (void)tuple;
   57962             :   (void)static_getset;
   57963             :   (void)self;
   57964             :   
   57965             :   /* Metaclass is used to implement static member variables */
   57966             :   metatype = SwigPyObjectType();
   57967             :   assert(metatype);
   57968             : #endif
   57969             :   
   57970         271 :   (void)globals;
   57971             :   
   57972             :   /* Create singletons now to avoid potential deadlocks with multi-threaded usage after module initialization */
   57973         271 :   SWIG_This();
   57974         271 :   SWIG_Python_TypeCache();
   57975         271 :   SwigPyPacked_type();
   57976             : #ifndef SWIGPYTHON_BUILTIN
   57977         271 :   SwigPyObject_type();
   57978             : #endif
   57979             :   
   57980             :   /* Fix SwigMethods to carry the callback ptrs when needed */
   57981         271 :   SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
   57982             :   
   57983             : #if PY_VERSION_HEX >= 0x03000000
   57984         271 :   m = PyModule_Create(&SWIG_module);
   57985             : #else
   57986             :   m = Py_InitModule(SWIG_name, SwigMethods);
   57987             : #endif
   57988             :   
   57989         271 :   md = d = PyModule_GetDict(m);
   57990         271 :   (void)md;
   57991             :   
   57992         271 :   SWIG_InitializeModule(0);
   57993             :   
   57994             : #ifdef SWIGPYTHON_BUILTIN
   57995             :   swigpyobject = SwigPyObject_TypeOnce();
   57996             :   
   57997             :   SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject");
   57998             :   assert(SwigPyObject_stype);
   57999             :   cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
   58000             :   if (!cd) {
   58001             :     SwigPyObject_stype->clientdata = &SwigPyObject_clientdata;
   58002             :     SwigPyObject_clientdata.pytype = swigpyobject;
   58003             :   } else if (swigpyobject->tp_basicsize != cd->pytype->tp_basicsize) {
   58004             :     PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules.");
   58005             : # if PY_VERSION_HEX >= 0x03000000
   58006             :     return NULL;
   58007             : # else
   58008             :     return;
   58009             : # endif
   58010             :   }
   58011             :   
   58012             :   /* All objects have a 'this' attribute */
   58013             :   this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def);
   58014             :   (void)this_descr;
   58015             :   
   58016             :   /* All objects have a 'thisown' attribute */
   58017             :   thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def);
   58018             :   (void)thisown_descr;
   58019             :   
   58020             :   public_interface = PyList_New(0);
   58021             :   public_symbol = 0;
   58022             :   (void)public_symbol;
   58023             :   
   58024             :   PyDict_SetItemString(md, "__all__", public_interface);
   58025             :   Py_DECREF(public_interface);
   58026             :   for (i = 0; SwigMethods[i].ml_name != NULL; ++i)
   58027             :   SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name);
   58028             :   for (i = 0; swig_const_table[i].name != 0; ++i)
   58029             :   SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name);
   58030             : #endif
   58031             :   
   58032         271 :   SWIG_InstallConstants(d,swig_const_table);
   58033             :   
   58034             :   
   58035             :   /* gdal_python.i %init code */
   58036         271 :   if ( GDALGetDriverCount() == 0 ) {
   58037         271 :     GDALAllRegister();
   58038             :   }
   58039             :   // Will be turned on for GDAL 4.0
   58040             :   // UseExceptions();
   58041             :   
   58042             :   
   58043         271 :   SWIG_Python_SetConstant(d, "VSI_STAT_EXISTS_FLAG",SWIG_From_int(static_cast< int >(0x1)));
   58044         271 :   SWIG_Python_SetConstant(d, "VSI_STAT_NATURE_FLAG",SWIG_From_int(static_cast< int >(0x2)));
   58045         271 :   SWIG_Python_SetConstant(d, "VSI_STAT_SIZE_FLAG",SWIG_From_int(static_cast< int >(0x4)));
   58046         271 :   SWIG_Python_SetConstant(d, "VSI_STAT_SET_ERROR_FLAG",SWIG_From_int(static_cast< int >(0x8)));
   58047         271 :   SWIG_Python_SetConstant(d, "VSI_STAT_CACHE_ONLY",SWIG_From_int(static_cast< int >(0x10)));
   58048         271 :   SWIG_Python_SetConstant(d, "VSI_RANGE_STATUS_UNKNOWN",SWIG_From_int(static_cast< int >(0)));
   58049         271 :   SWIG_Python_SetConstant(d, "VSI_RANGE_STATUS_DATA",SWIG_From_int(static_cast< int >(1)));
   58050         271 :   SWIG_Python_SetConstant(d, "VSI_RANGE_STATUS_HOLE",SWIG_From_int(static_cast< int >(2)));
   58051         271 :   SWIG_Python_SetConstant(d, "GEDTST_NONE",SWIG_From_int(static_cast< int >(GEDTST_NONE)));
   58052         271 :   SWIG_Python_SetConstant(d, "GEDTST_JSON",SWIG_From_int(static_cast< int >(GEDTST_JSON)));
   58053         271 :   SWIG_Python_SetConstant(d, "GEDTC_NUMERIC",SWIG_From_int(static_cast< int >(GEDTC_NUMERIC)));
   58054         271 :   SWIG_Python_SetConstant(d, "GEDTC_STRING",SWIG_From_int(static_cast< int >(GEDTC_STRING)));
   58055         271 :   SWIG_Python_SetConstant(d, "GEDTC_COMPOUND",SWIG_From_int(static_cast< int >(GEDTC_COMPOUND)));
   58056             :   
   58057         271 :   SWIG_Python_SetConstant(d, "GVM_Diagonal",SWIG_From_int(static_cast< int >(GVM_Diagonal)));
   58058         271 :   SWIG_Python_SetConstant(d, "GVM_Edge",SWIG_From_int(static_cast< int >(GVM_Edge)));
   58059         271 :   SWIG_Python_SetConstant(d, "GVM_Max",SWIG_From_int(static_cast< int >(GVM_Max)));
   58060         271 :   SWIG_Python_SetConstant(d, "GVM_Min",SWIG_From_int(static_cast< int >(GVM_Min)));
   58061         271 :   SWIG_Python_SetConstant(d, "GVOT_NORMAL",SWIG_From_int(static_cast< int >(GVOT_NORMAL)));
   58062         271 :   SWIG_Python_SetConstant(d, "GVOT_MIN_TARGET_HEIGHT_FROM_DEM",SWIG_From_int(static_cast< int >(GVOT_MIN_TARGET_HEIGHT_FROM_DEM)));
   58063         271 :   SWIG_Python_SetConstant(d, "GVOT_MIN_TARGET_HEIGHT_FROM_GROUND",SWIG_From_int(static_cast< int >(GVOT_MIN_TARGET_HEIGHT_FROM_GROUND)));
   58064             :   
   58065             :   /* Initialize threading */
   58066         271 :   SWIG_PYTHON_INITIALIZE_THREADS;
   58067             : #if PY_VERSION_HEX >= 0x03000000
   58068         271 :   return m;
   58069             : #else
   58070             :   return;
   58071             : #endif
   58072             : }
   58073             : 

Generated by: LCOV version 1.14